[U-Boot] [PATCH 10/14] microblaze: Fix gd_t address which is placed at the end of BRAM

Michal Simek michal.simek at xilinx.com
Tue Jan 27 16:20:32 CET 2015


Setup gd from ASM to be availalbe for board_init_r.
Setting it up in spl_board_init is too late when
MALLOC is used.
Space for gd is located behind MALLOC area at the end of BRAM.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 arch/microblaze/cpu/spl.c   | 2 --
 arch/microblaze/cpu/start.S | 1 +
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/microblaze/cpu/spl.c b/arch/microblaze/cpu/spl.c
index 091226133e4f..2cc0a2da89e1 100644
--- a/arch/microblaze/cpu/spl.c
+++ b/arch/microblaze/cpu/spl.c
@@ -25,8 +25,6 @@ u32 spl_boot_device(void)
 /* Board initialization after bss clearance */
 void spl_board_init(void)
 {
-	gd = (gd_t *)CONFIG_SPL_STACK_ADDR;
-
 	/* enable console uart printing */
 	preloader_console_init();
 }
diff --git a/arch/microblaze/cpu/start.S b/arch/microblaze/cpu/start.S
index e0e3470a181a..14c2f12da06b 100644
--- a/arch/microblaze/cpu/start.S
+++ b/arch/microblaze/cpu/start.S
@@ -152,6 +152,7 @@ clear_bss:
 #ifndef CONFIG_SPL_BUILD
 	brai	board_init_f
 #else
+	addi	r31, r0, CONFIG_SYS_SPL_MALLOC_END
 	brai	board_init_r
 #endif
 1:	bri	1b
--
1.8.2.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150127/78f3cb44/attachment.pgp>


More information about the U-Boot mailing list