summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-05-18 16:46:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2014-05-19 09:37:27 +0200
commit558d72dc5116fc6275ea77c783cc65d6d1a5b521 (patch)
treecb80ca26e5803320d6f7df3573460f8183d50861
parent9f297c87543b496894417f3429e310ea857ec6d4 (diff)
downloadbarebox-558d72dc5116fc6275ea77c783cc65d6d1a5b521.tar.gz
barebox-558d72dc5116fc6275ea77c783cc65d6d1a5b521.tar.xz
ARM Samsung: fix booting from NAND with pbl
The ARM pbl is linked at (TEXT_BASE - SZ_2M). This conflicts with the temporary stack used in s3c24x0_nand_boot. Moving the stack to (TEXT_BASE - SZ_2M) fixes this problem. With this patch a compressed barebox with pbl can boot on mini2440 from NAND. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-samsung/lowlevel-s3c24x0.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-samsung/lowlevel-s3c24x0.S b/arch/arm/mach-samsung/lowlevel-s3c24x0.S
index b59ba6746c..e2efd86e8c 100644
--- a/arch/arm/mach-samsung/lowlevel-s3c24x0.S
+++ b/arch/arm/mach-samsung/lowlevel-s3c24x0.S
@@ -15,6 +15,7 @@
*/
#include <config.h>
+#include <sizes.h>
#include <mach/s3c-iomap.h>
.section ".text_bare_init.s3c24x0_disable_wd","ax"
@@ -258,7 +259,7 @@ s3c24x0_nand_boot:
beq 2f
mov pc, lr /* NOR case: nothing to do here */
-2: ldr sp, =TEXT_BASE /* Setup a temporary stack in SDRAM */
+2: ldr sp, =(TEXT_BASE - SZ_2M) /* Setup a temporary stack in SDRAM */
/*
* We still run at a location we are not linked to. But lets still running
* from the internal SRAM, this may speed up the boot
@@ -269,7 +270,7 @@ s3c24x0_nand_boot:
/*
* Adjust the return address to the correct address in SDRAM
*/
- ldr r1, =TEXT_BASE
+ ldr r1, =(TEXT_BASE - SZ_2M)
add lr, lr, r1
mov pc, lr