diff options
author | Pali Rohár <pali@kernel.org> | 2021-07-23 11:14:23 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2021-07-31 09:49:32 +0200 |
commit | 4375598c52740c02a6dcde1213a31959c03aca12 (patch) | |
tree | 4b58e482a7fee7313ac67c451c370dc723c2f7d1 /arch/arm | |
parent | 5029d7bf34ec14730faa74d0fa1a229ec21233c9 (diff) | |
download | u-boot-4375598c52740c02a6dcde1213a31959c03aca12.tar.gz |
arm: mvebu: Fix return_to_bootrom()
Register r0 should be set to return value 0x0 - NO_ERR.
Set r0 with return value after all registers are restored from the
stack, so that the return value is always correct.
Signed-off-by: Pali Rohár <pali@kernel.org>
Fixes: 944c7a317675 ("arm: mvebu: Add option to use UART xmodem protocol via kwboot")
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Tested-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-mvebu/lowlevel_spl.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-mvebu/lowlevel_spl.S b/arch/arm/mach-mvebu/lowlevel_spl.S index 8718d7a43e..dde77b7652 100644 --- a/arch/arm/mach-mvebu/lowlevel_spl.S +++ b/arch/arm/mach-mvebu/lowlevel_spl.S @@ -13,8 +13,9 @@ ENDPROC(save_boot_params) ENTRY(return_to_bootrom) ldr r12, =CONFIG_SPL_BOOTROM_SAVE ldr sp, [r12] + ldmfd sp!, {r0 - r12, lr} /* @ restore registers from stack */ mov r0, #0x0 /* @ return value: 0x0 NO_ERR */ - ldmfd sp!, {r0 - r12, pc} /* @ restore regs and return */ + bx lr /* @ return to bootrom */ ENDPROC(return_to_bootrom) /* |