summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-06-13 12:59:29 +0200
committerTom Rini <trini@ti.com>2013-07-24 09:51:05 -0400
commit9a28e0d177d7714baccf282071d99f70e087a4e4 (patch)
tree33d8cba99ed4245e20e78371f02c3e8aa0246818 /arch
parent691995f9ab672be1141ca8acfa7ff32508084782 (diff)
downloadtalos-obmc-uboot-9a28e0d177d7714baccf282071d99f70e087a4e4.tar.gz
talos-obmc-uboot-9a28e0d177d7714baccf282071d99f70e087a4e4.zip
MIPS: xburst/start.S: save relocation address in s2 register
Synchronize the code with mips{32,64}/start.S, in order to allow further unifications. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/cpu/xburst/start.S8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/mips/cpu/xburst/start.S b/arch/mips/cpu/xburst/start.S
index be14b3d7eb..052e25ebad 100644
--- a/arch/mips/cpu/xburst/start.S
+++ b/arch/mips/cpu/xburst/start.S
@@ -47,8 +47,10 @@ _start:
relocate_code:
move sp, a0 # set new stack pointer
+ move s2, a2 # save destination address in s2
+
li t0, CONFIG_SYS_MONITOR_BASE
- sub t6, a2, t0 # t6 <-- relocation offset
+ sub t6, s2, t0 # t6 <-- relocation offset
la t3, in_ram
lw t2, -12(t3) # t2 <-- __image_copy_end
@@ -96,7 +98,7 @@ relocate_code:
nop
/* Jump to where we've relocated ourselves */
- addi t0, a2, in_ram - _start
+ addi t0, s2, in_ram - _start
jr t0
nop
@@ -171,6 +173,6 @@ in_ram:
move a0, a1 # a0 <-- gd
la t9, board_init_r
jr t9
- move a1, a2
+ move a1, s2
.end relocate_code
OpenPOWER on IntegriCloud