[PATCH 19/28] ARM pbl: setup stack at end of SDRAM
Sascha Hauer
s.hauer at pengutronix.de
Wed Oct 17 17:03:28 EDT 2012
We now have memory information available in barebox_arm_entry,
use it to setup the stack at the end of SDRAM instead of hardcoded
config value.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/cpu/start-pbl.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/cpu/start-pbl.c b/arch/arm/cpu/start-pbl.c
index a2cdbf2..e612d51 100644
--- a/arch/arm/cpu/start-pbl.c
+++ b/arch/arm/cpu/start-pbl.c
@@ -162,9 +162,6 @@ static noinline void __barebox_arm_entry(uint32_t membase, uint32_t memsize,
uint32_t offset;
uint32_t pg_start, pg_end, pg_len;
- /* Setup the stack */
- arm_setup_stack(STACK_BASE + STACK_SIZE - 16);
-
/* Get offset between linked address and runtime address */
offset = get_runtime_offset();
@@ -196,5 +193,7 @@ static noinline void __barebox_arm_entry(uint32_t membase, uint32_t memsize,
void __naked barebox_arm_entry(uint32_t membase, uint32_t memsize,
uint32_t boarddata)
{
+ arm_setup_stack(membase + memsize - 8);
+
__barebox_arm_entry(membase, memsize, boarddata);
}
--
1.7.10.4
More information about the barebox
mailing list