ARM: spl: atmel: bring in serial device before init
authorWenyou Yang <wenyou.yang@atmel.com>
Fri, 24 Mar 2017 03:34:04 +0000 (11:34 +0800)
committerSimon Glass <sjg@chromium.org>
Thu, 13 Apr 2017 20:44:51 +0000 (14:44 -0600)
Before setting up the serial communications, bring in the serial
device from the device tree file.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
arch/arm/mach-at91/spl_atmel.c

index 688289e7cf7b69acc991451706bfcd38c3619b83..847a30b9a93be8c933a93166c061b3c340ab8986 100644 (file)
@@ -77,6 +77,8 @@ void s_init(void)
 
 void board_init_f(ulong dummy)
 {
+       int ret;
+
        switch_to_main_crystal_osc();
 
 #ifdef CONFIG_SAMA5D2
@@ -99,6 +101,12 @@ void board_init_f(ulong dummy)
 
        board_early_init_f();
 
+       ret = spl_init();
+       if (ret) {
+               debug("spl_init() failed: %d\n", ret);
+               hang();
+       }
+
        preloader_console_init();
 
        mem_init();