[PATCH v3 2/3] serial: ns16550: Avoid probing hardware when disabled
Simon Glass
sjg at chromium.org
Wed Nov 20 16:35:53 CET 2024
When a serial port is marked as disabled, don't try to probe it, since
it won't work and will probably hang.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
drivers/serial/ns16550.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 3f6860f3916..6576be4b58e 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -533,7 +533,8 @@ int ns16550_serial_probe(struct udevice *dev)
reset_deassert_bulk(&reset_bulk);
com_port->plat = dev_get_plat(dev);
- ns16550_init(com_port, -1);
+ if (!serial_is_disabled(dev))
+ ns16550_init(com_port, -1);
return 0;
}
--
2.34.1
More information about the U-Boot
mailing list