mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 10:48:51 +00:00
e1bc64eec2
At present if the return to bootrom fails (e.g. because you are not using the Rockchip's bootrom's pointer table in MMC) then the board prints SPL message and hangs. Print a message first if we can, to help in understanding what happened when it hangs. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Heiko Stuebner <heiko@sntech.de>
32 lines
534 B
ArmAsm
32 lines
534 B
ArmAsm
/*
|
|
* (C) Copyright 2016 Rockchip Electronics Co., Ltd
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0+
|
|
*/
|
|
|
|
#include <linux/linkage.h>
|
|
|
|
.globl SAVE_SP_ADDR
|
|
SAVE_SP_ADDR:
|
|
.word 0
|
|
|
|
/*
|
|
* void save_boot_params
|
|
*
|
|
* Save sp, lr, r1~r12
|
|
*/
|
|
ENTRY(save_boot_params)
|
|
push {r1-r12, lr}
|
|
ldr r0, =SAVE_SP_ADDR
|
|
str sp, [r0]
|
|
b save_boot_params_ret @ back to my caller
|
|
ENDPROC(save_boot_params)
|
|
|
|
|
|
.globl _back_to_bootrom_s
|
|
ENTRY(_back_to_bootrom_s)
|
|
ldr r0, =SAVE_SP_ADDR
|
|
ldr sp, [r0]
|
|
mov r0, #0
|
|
pop {r1-r12, pc}
|
|
ENDPROC(_back_to_bootrom_s)
|