mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 23:47:24 +00:00
b47ea79219
If we would like to boot from SD card, we have to implement mmc driver in SPL stage, and get a slightly large SPL binary. Rockchip SoC's bootrom code has the ability to load spl and u-boot, then boot. If CONFIG_ROCKCHIP_SPL_BACK_TO_BROM is enabled, the spl will return to bootrom in board_init_f(), then bootrom loads u-boot binary. Loading sequence after rework: bootrom ==> spl ==> bootrom ==> u-boot Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Fixed up spelling of U-Boot, boorom, opinion->option, Rochchip: Signed-off-by: Simon Glass <sjg@chromium.org>
32 lines
525 B
ArmAsm
32 lines
525 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
|
|
ENTRY(back_to_bootrom)
|
|
ldr r0, =SAVE_SP_ADDR
|
|
ldr sp, [r0]
|
|
mov r0, #0
|
|
pop {r1-r12, pc}
|
|
ENDPROC(back_to_bootrom)
|