]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: serial: Don't require device tree to configure a console
authorSimon Glass <sjg@chromium.org>
Wed, 17 Sep 2014 15:02:40 +0000 (09:02 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 23 Sep 2014 18:44:30 +0000 (12:44 -0600)
Allow serial_find_console_or_panic() to work without a device tree.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/serial/serial-uclass.c

index d04104e74700108bf1df0cc232481336c6db1259..1ac943f692882700701d990e3403276334b941b0 100644 (file)
@@ -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