[U-Boot] [PATCH] ARM: fix address setup in start.S
Darius Augulis
augulis.darius at gmail.com
Mon Oct 25 12:45:35 CEST 2010
Fix address setup bug for ARM.
This bug stops u-boot booting if
CONFIG_SKIP_RELOCATE_UBOOT is defined.
Signed-off-by: Darius Augulis <augulis.darius at gmail.com>
---
arch/arm/cpu/arm1136/start.S | 6 ++++--
arch/arm/cpu/arm926ejs/start.S | 6 ++++--
arch/arm/cpu/armv7/start.S | 6 ++++--
arch/arm/cpu/pxa/start.S | 6 ++++--
4 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/arch/arm/cpu/arm1136/start.S b/arch/arm/cpu/arm1136/start.S
index 29ed065..6a82310 100644
--- a/arch/arm/cpu/arm1136/start.S
+++ b/arch/arm/cpu/arm1136/start.S
@@ -296,8 +296,10 @@ _nand_boot_ofs
jump_2_ram:
ldr r0, _board_init_r_ofs
adr r1, _start
- add r0, r0, r1
- add lr, r0, r9
+ add lr, r0, r1
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
+ add lr, lr, r9
+#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 863de3b..e7e985a 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -286,8 +286,10 @@ _nand_boot_ofs:
#else
ldr r0, _board_init_r_ofs
adr r1, _start
- add r0, r0, r1
- add lr, r0, r9
+ add lr, r0, r1
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
+ add lr, lr, r9
+#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S
index 64c86e9..91e0523 100644
--- a/arch/arm/cpu/armv7/start.S
+++ b/arch/arm/cpu/armv7/start.S
@@ -274,8 +274,10 @@ clbss_l:str r2, [r0] /* clear loop... */
jump_2_ram:
ldr r0, _board_init_r_ofs
adr r1, _start
- add r0, r0, r1
- add lr, r0, r9
+ add lr, r0, r1
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
+ add lr, lr, r9
+#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
diff --git a/arch/arm/cpu/pxa/start.S b/arch/arm/cpu/pxa/start.S
index 3c5bd84..73166c8 100644
--- a/arch/arm/cpu/pxa/start.S
+++ b/arch/arm/cpu/pxa/start.S
@@ -330,8 +330,10 @@ _start_oneboot_ofs
#else
ldr r0, _board_init_r_ofs
adr r1, _start
- add r0, r0, r1
- add lr, r0, r9
+ add lr, r0, r1
+#ifndef CONFIG_SKIP_RELOCATE_UBOOT
+ add lr, lr, r9
+#endif
/* setup parameters for board_init_r */
mov r0, r5 /* gd_t */
mov r1, r7 /* dest_addr */
More information about the U-Boot
mailing list