blob: 34c6ab33f058745993221ec2c1c097a86241fc98 [file] [log] [blame]
Peng Fan7de47032015-10-23 10:13:04 +08001#include <config.h>
2#include <linux/linkage.h>
3
4#include <asm/armv7.h>
5#include <asm/arch-armv7/generictimer.h>
6#include <asm/psci.h>
7
8 .pushsection ._secure.text, "ax"
9
10 .arch_extension sec
11
12 @ r1 = target CPU
13 @ r2 = target PC
14
15.globl psci_arch_init
16psci_arch_init:
17 mov r6, lr
18
19 bl psci_get_cpu_id
20 bl psci_get_cpu_stack_top
21 mov sp, r0
22
23 bx r6
24
25 @ r1 = target CPU
26 @ r2 = target PC
27
28.globl psci_cpu_on
29psci_cpu_on:
30 push {lr}
31
32 mov r0, r1
33 bl psci_get_cpu_stack_top
34 str r2, [r0]
35 dsb
36
37 ldr r2, =psci_cpu_entry
38 bl imx_cpu_on
39
40 pop {pc}
41
42.globl psci_cpu_off
43psci_cpu_off:
44
45 bl psci_cpu_off_common
46 bl psci_get_cpu_id
47 bl imx_cpu_off
48
491: wfi
50 b 1b
51
52 .globl psci_text_end
53psci_text_end:
54 .popsection