[U-Boot] [PATCH 11/29] blackfin: Allow cpu_init_f() to return

Simon Glass sjg at chromium.org
Thu Dec 15 04:27:42 CET 2016


Adjust the call sequence a little so that it follows ARM: board_init_f()
is called from assembly code.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/blackfin/cpu/cpu.c   | 6 ------
 arch/blackfin/cpu/start.S | 3 ++-
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/blackfin/cpu/cpu.c b/arch/blackfin/cpu/cpu.c
index 13f083f..0ae5ac6 100644
--- a/arch/blackfin/cpu/cpu.c
+++ b/arch/blackfin/cpu/cpu.c
@@ -301,7 +301,6 @@ int irq_init(void)
 	return 0;
 }
 
-__attribute__ ((__noreturn__))
 void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
 {
 #ifndef CONFIG_BFIN_BOOTROM_USES_EVT1
@@ -359,11 +358,6 @@ void cpu_init_f(ulong bootflag, ulong loaded_from_ldr)
 
 	serial_early_puts("Init global data\n");
 	global_board_data_init();
-
-	board_init_f(0);
-
-	/* should not be reached */
-	while (1);
 }
 
 int arch_cpu_init(void)
diff --git a/arch/blackfin/cpu/start.S b/arch/blackfin/cpu/start.S
index 0bba86b..404e710 100644
--- a/arch/blackfin/cpu/start.S
+++ b/arch/blackfin/cpu/start.S
@@ -228,7 +228,8 @@ ENTRY(_start)
 .Lenable_nested:
 	cli r7;
 	[--sp] = reti;
-	jump.l _cpu_init_f;
+	call _cpu_init_f;
+	call _board_init_f
 
 .LWAIT_HERE:
 	jump .LWAIT_HERE;
-- 
2.8.0.rc3.226.g39d4020



More information about the U-Boot mailing list