diff options
author | Mans Rullgard <mans@mansr.com> | 2018-04-21 16:11:07 +0100 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2018-04-27 09:32:54 +0200 |
commit | da372af6e40d84e8a47baa41d22dd3e953469b74 (patch) | |
tree | f16ab16a2dea582fa017b79da269d0b8ac99c003 /arch/arm/cpu/arm926ejs/start.S | |
parent | 9482aeda660cece398cd85938184f727d1404611 (diff) | |
download | u-boot-da372af6e40d84e8a47baa41d22dd3e953469b74.tar.gz |
ARM: arm926ejs: fix lowlevel_init call
The code attempts to preserve the value of LR by storing it in R12/IP
across the lowevel_init() call. However, this register is not saved
by the callee. Use a register that guaranteed to be preserved instead.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/start.S')
-rw-r--r-- | arch/arm/cpu/arm926ejs/start.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index 959d1ed86d..a6f0bdb703 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -105,9 +105,9 @@ flush_dcache: /* * Go setup Memory and board specific bits prior to relocation. */ - mov ip, lr /* perserve link reg across call */ + mov r4, lr /* perserve link reg across call */ bl lowlevel_init /* go setup pll,mux,memory */ - mov lr, ip /* restore link */ + mov lr, r4 /* restore link */ #endif mov pc, lr /* back to my caller */ #endif /* CONFIG_SKIP_LOWLEVEL_INIT */ |