dm: ns16550: Allow the driver to be omitted if requested
authorSimon Glass <sjg@chromium.org>
Mon, 14 Dec 2015 04:36:59 +0000 (21:36 -0700)
committerSimon Glass <sjg@chromium.org>
Tue, 12 Jan 2016 17:19:09 +0000 (10:19 -0700)
Allow the ns16550 debug UART to be used without the full driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Thomas Chou <thomas@wytron.com.tw>
drivers/serial/ns16550.c

index 4b3ced6..021b211 100644 (file)
@@ -439,6 +439,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,
@@ -452,4 +453,5 @@ U_BOOT_DRIVER(ns16550_serial) = {
        .ops    = &ns16550_serial_ops,
        .flags  = DM_FLAG_PRE_RELOC,
 };
+#endif
 #endif /* CONFIG_DM_SERIAL */