summaryrefslogtreecommitdiff
path: root/arch/arm/mach-rockchip/save_boot_param.S
blob: 5e6c8dba13e787d41b2b82257c6ac54bd8c65483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
 * (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)