[PATCH 02/19] serial: ns16550: Allow clocks to be missing

Simon Glass sjg at chromium.org
Thu Aug 29 16:57:45 CEST 2024


Allow serial init when clock support is not enabled in a particular phase.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 drivers/serial/ns16550.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 6fcb5b523ac..5cda273623d 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -570,7 +570,7 @@ int ns16550_serial_of_to_plat(struct udevice *dev)
 		err = clk_get_rate(&clk);
 		if (!IS_ERR_VALUE(err))
 			plat->clock = err;
-	} else if (err != -ENOENT && err != -ENODEV && err != -ENOSYS) {
+	} else if (err != -ENOENT && err != -ENODEV && err != -ENOSYS && err != -EALREADY) {
 		debug("ns16550 failed to get clock\n");
 		return err;
 	}
-- 
2.34.1



More information about the U-Boot mailing list