2015-11-17 06:20:27 +00:00
|
|
|
/*
|
2016-07-12 11:09:49 +00:00
|
|
|
* (C) Copyright 2016 Rockchip Electronics Co., Ltd
|
2015-11-17 06:20:27 +00:00
|
|
|
*
|
|
|
|
* 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)
|
|
|
|
|
|
|
|
|
2017-04-15 19:11:31 +00:00
|
|
|
.globl _back_to_bootrom_s
|
|
|
|
ENTRY(_back_to_bootrom_s)
|
2015-11-17 06:20:27 +00:00
|
|
|
ldr r0, =SAVE_SP_ADDR
|
|
|
|
ldr sp, [r0]
|
|
|
|
mov r0, #0
|
|
|
|
pop {r1-r12, pc}
|
2017-04-15 19:11:31 +00:00
|
|
|
ENDPROC(_back_to_bootrom_s)
|