[U-Boot] [PATCH 08/29] blackfin: Use generic board to set the stack address

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


Rather than using a hard-coded stack address, call
board_init_f_alloc_reserve() and board_init_f_init_reserve() and use the
stack address thus obtained. This makes blackfin more like other archs.

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

 arch/blackfin/cpu/start.S | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/cpu/start.S b/arch/blackfin/cpu/start.S
index 01985ea..5e19ad2 100644
--- a/arch/blackfin/cpu/start.S
+++ b/arch/blackfin/cpu/start.S
@@ -191,11 +191,16 @@ ENTRY(_start)
 #endif
 
 .Lnorelocate:
+	r0.l = LO(CONFIG_SYS_EARLY_SP_TOP)
+	r0.h = HI(CONFIG_SYS_EARLY_SP_TOP)
+	call _board_init_f_alloc_reserve
+
 	/* Setup the actual stack in external memory */
-	sp.h = HI(CONFIG_STACKBASE);
-	sp.l = LO(CONFIG_STACKBASE);
+	sp = r0
 	fp = sp;
 
+	call _board_init_f_init_reserve
+
 	/* Now lower ourselves from the highest interrupt level to
 	 * the lowest.  We do this by masking all interrupts but 15,
 	 * setting the 15 handler to ".Lenable_nested", raising the 15
-- 
2.8.0.rc3.226.g39d4020



More information about the U-Boot mailing list