diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-08 18:30:42 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-23 23:57:44 +0200 |
commit | 244198ea8bdf592799ebfd430fe9ab165284e480 (patch) | |
tree | e25ec0f971ca0bf0c474e1144d3eb0155bca5c4a /arch/arm/boards/eukrea_cpuimx27 | |
parent | 218dffea800754dcbda323da1c99c7d90c9b9062 (diff) | |
download | barebox-244198ea8bdf592799ebfd430fe9ab165284e480.tar.gz barebox-244198ea8bdf592799ebfd430fe9ab165284e480.tar.xz |
ARM boards: Use _text rather than TEXT_BASE
With compressed image support TEXT_BASE will become the base
address of the uncompressed image. What the boards want instead
is the base address of the decompressor code or, if not compressed,
the base address of the uncompressed image. Use _text which is
the correct one for both cases.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/eukrea_cpuimx27')
-rw-r--r-- | arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c | 4 | ||||
-rw-r--r-- | arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S | 11 |
2 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c index 63e87c9551..193c277561 100644 --- a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c +++ b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c @@ -31,6 +31,7 @@ #include <mach/gpio.h> #include <asm/armlinux.h> #include <asm-generic/sections.h> +#include <asm/barebox-arm.h> #include <generated/mach-types.h> #include <partition.h> #include <fs.h> @@ -264,7 +265,8 @@ late_initcall(eukrea_cpuimx27_late_init); #ifdef CONFIG_NAND_IMX_BOOT void __bare_init nand_boot(void) { - imx_nand_load_image((void *)TEXT_BASE, barebox_image_size); + imx_nand_load_image(_text, barebox_image_size); + board_init_lowlevel_return(); } #endif diff --git a/arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S b/arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S index e31854606d..0dae3ecf20 100644 --- a/arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S +++ b/arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S @@ -1,4 +1,5 @@ #include <config.h> +#include <asm-generic/memory_layout.h> #include <mach/imx-regs.h> #define writel(val, reg) \ @@ -107,7 +108,7 @@ board_init_lowlevel: sdram_init #ifdef CONFIG_NAND_IMX_BOOT - ldr sp, =0xa0f00000 /* Setup a temporary stack in SDRAM */ + ldr sp, =STACK_BASE + STACK_SIZE - 12 /* Setup a temporary stack in SDRAM */ ldr r0, =IMX_NFC_BASE /* start of NFC SRAM */ ldr r2, =IMX_NFC_BASE + 0x1000 /* end of NFC SRAM */ @@ -119,7 +120,7 @@ board_init_lowlevel: bhi ret /* Move ourselves out of NFC SRAM */ - ldr r1, =TEXT_BASE + ldr r1, =_text copy_loop: ldmia r0!, {r3-r9} /* copy from source address [r0] */ @@ -129,12 +130,8 @@ copy_loop: ldr pc, =1f /* Jump to SDRAM */ 1: - bl nand_boot /* Load barebox from NAND Flash */ - - ldr r1, =IMX_NFC_BASE - TEXT_BASE - sub r10, r10, r1 /* adjust return address from NFC SRAM */ + b nand_boot /* Load barebox from NAND Flash */ /* to SDRAM */ - #endif /* CONFIG_NAND_IMX_BOOT */ ret: |