diff options
author | Tom Rini <trini@konsulko.com> | 2022-05-24 09:57:18 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-06-06 12:09:12 -0400 |
commit | 3b2979eefaeb46d2f978e13c33bb88ec0e7ee09a (patch) | |
tree | fec9d6d4a8174f84968a10e0117068ff366a212c /arch/arm/mach-mvebu | |
parent | 3135ba642f9a02a3a45d978d2425c1488d6efbbd (diff) |
mvebu: Use CONFIG_SPL_STACK + 4 directly for bootparam location
The definition of CONFIG_SPL_BOOTROM_SAVE is always a fixed
CONFIG_SPL_STACK + 4, while CONFIG_SPL_STACK is not constant. This
change will make it clear where the location is still, once
CONFIG_SPL_STACK moves to Kconfig.
Cc: Stefan Roese <sr@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/mach-mvebu')
-rw-r--r-- | arch/arm/mach-mvebu/lowlevel_spl.S | 8 | ||||
-rw-r--r-- | arch/arm/mach-mvebu/spl.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mach-mvebu/lowlevel_spl.S b/arch/arm/mach-mvebu/lowlevel_spl.S index 501c239e9d3..49891df9ea9 100644 --- a/arch/arm/mach-mvebu/lowlevel_spl.S +++ b/arch/arm/mach-mvebu/lowlevel_spl.S @@ -8,19 +8,19 @@ * contains U-Boot SPL, optionally it can also contain additional arguments. * The number of these arguments is in r0, pointer to the argument array in r1. * BootROM expects executable BIN header code to return to address stored in lr. - * Other registers (r2 - r12) must be preserved. We save all registers to - * CONFIG_SPL_BOOTROM_SAVE address. BIN header arguments (passed via r0 and r1) + * Other registers (r2 - r12) must be preserved. We save all registers to the + * address of CONFIG_SPL_STACK + 4. BIN header arguments (passed via r0 and r1) * are currently not used by U-Boot SPL binary. */ ENTRY(save_boot_params) stmfd sp!, {r0 - r12, lr} /* @ save registers on stack */ - ldr r12, =CONFIG_SPL_BOOTROM_SAVE + ldr r12, =(CONFIG_SPL_STACK + 4) str sp, [r12] b save_boot_params_ret ENDPROC(save_boot_params) ENTRY(return_to_bootrom) - ldr r12, =CONFIG_SPL_BOOTROM_SAVE + ldr r12, =(CONFIG_SPL_STACK + 4) ldr sp, [r12] ldmfd sp!, {r0 - r12, lr} /* @ restore registers from stack */ mov r0, #0x0 /* @ return value: 0x0 NO_ERR */ diff --git a/arch/arm/mach-mvebu/spl.c b/arch/arm/mach-mvebu/spl.c index fa9a1d7ab65..13c99913c38 100644 --- a/arch/arm/mach-mvebu/spl.c +++ b/arch/arm/mach-mvebu/spl.c @@ -283,7 +283,7 @@ u32 spl_boot_device(void) int board_return_to_bootrom(struct spl_image_info *spl_image, struct spl_boot_device *bootdev) { - u32 *regs = *(u32 **)CONFIG_SPL_BOOTROM_SAVE; + u32 *regs = *(u32 **)(CONFIG_SPL_STACK + 4); printf("Returning to BootROM (return address 0x%08x)...\n", regs[13]); return_to_bootrom(); |