blob: 5e6c8dba13e787d41b2b82257c6ac54bd8c65483 [file] [log] [blame]
huang linbe1d5e02015-11-17 14:20:27 +08001/*
Xu Ziyuanb47ea792016-07-12 19:09:49 +08002 * (C) Copyright 2016 Rockchip Electronics Co., Ltd
huang linbe1d5e02015-11-17 14:20:27 +08003 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <linux/linkage.h>
8
9.globl SAVE_SP_ADDR
10SAVE_SP_ADDR:
11 .word 0
12
13/*
14 * void save_boot_params
15 *
16 * Save sp, lr, r1~r12
17 */
18ENTRY(save_boot_params)
19 push {r1-r12, lr}
20 ldr r0, =SAVE_SP_ADDR
21 str sp, [r0]
22 b save_boot_params_ret @ back to my caller
23ENDPROC(save_boot_params)
24
25
Simon Glasse1bc64e2017-04-15 13:11:31 -060026.globl _back_to_bootrom_s
27ENTRY(_back_to_bootrom_s)
huang linbe1d5e02015-11-17 14:20:27 +080028 ldr r0, =SAVE_SP_ADDR
29 ldr sp, [r0]
30 mov r0, #0
31 pop {r1-r12, pc}
Simon Glasse1bc64e2017-04-15 13:11:31 -060032ENDPROC(_back_to_bootrom_s)