[U-Boot] [PATCH 2/3] dm: ns16550: Allow the driver to be omitted if requested

Simon Glass sjg at chromium.org
Mon Dec 14 05:36:59 CET 2015


Allow the ns16550 debug UART to be used without the full driver.

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

 drivers/serial/ns16550.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 3fab3f1..2025423 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -440,6 +440,7 @@ static const struct udevice_id ns16550_serial_ids[] = {
 };
 #endif
 
+#if CONFIG_IS_ENABLED(SERIAL_PRESENT)
 U_BOOT_DRIVER(ns16550_serial) = {
 	.name	= "ns16550_serial",
 	.id	= UCLASS_SERIAL,
@@ -453,4 +454,5 @@ U_BOOT_DRIVER(ns16550_serial) = {
 	.ops	= &ns16550_serial_ops,
 	.flags	= DM_FLAG_PRE_RELOC,
 };
+#endif
 #endif /* CONFIG_DM_SERIAL */
-- 
2.6.0.rc2.230.g3dd15c0



More information about the U-Boot mailing list