summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-09-17 09:02:40 -0600
committerSimon Glass <sjg@chromium.org>2014-09-23 12:44:30 -0600
commit59990bf0eaa12b123759cb0485f38e156103e93c (patch)
treec40a340ce912d870d185125044bcdef6a5d6f998 /drivers
parent91cbd792c46c916ef196c5b7cd16ff592d2f3632 (diff)
downloadu-boot-imx-59990bf0eaa12b123759cb0485f38e156103e93c.zip
u-boot-imx-59990bf0eaa12b123759cb0485f38e156103e93c.tar.gz
u-boot-imx-59990bf0eaa12b123759cb0485f38e156103e93c.tar.bz2
dm: serial: Don't require device tree to configure a console
Allow serial_find_console_or_panic() to work without a device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/serial-uclass.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index d04104e..1ac943f 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -25,6 +25,7 @@ struct udevice *cur_dev __attribute__ ((section(".data")));
static void serial_find_console_or_panic(void)
{
+#ifdef CONFIG_OF_CONTROL
int node;
/* Check for a chosen console */
@@ -44,7 +45,7 @@ static void serial_find_console_or_panic(void)
return;
cur_dev = NULL;
}
-
+#endif
/*
* Failing that, get the device with sequence number 0, or in extremis
* just the first serial device we can find. But we insist on having