diff mbox

[U-Boot,2/5] ARM: spl: atmel: bring in serial device before init

Message ID 20170323044152.10905-3-wenyou.yang@atmel.com
State Accepted
Commit 730a7b47105ad6b6766344e59bb04c0cbb2e586a
Delegated to: Andreas Bießmann
Headers show

Commit Message

Wenyou Yang March 23, 2017, 4:41 a.m. UTC
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 | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox

Patch

diff --git a/arch/arm/mach-at91/spl_atmel.c b/arch/arm/mach-at91/spl_atmel.c
index 688289e7cf..847a30b9a9 100644
--- a/arch/arm/mach-at91/spl_atmel.c
+++ b/arch/arm/mach-at91/spl_atmel.c
@@ -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();