blob: 96e88d6184e40b06a67ade00ac67e309b8f094a7 [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
Peng Fan7de47032015-10-23 10:13:04 +080012.globl psci_cpu_on
13psci_cpu_on:
Chen-Yu Tsai6e6622d2016-06-19 12:38:44 +080014 push {r4, r5, lr}
Peng Fan7de47032015-10-23 10:13:04 +080015
Chen-Yu Tsai6e6622d2016-06-19 12:38:44 +080016 mov r4, r0
17 mov r5, r1
Peng Fan7de47032015-10-23 10:13:04 +080018 mov r0, r1
Chen-Yu Tsai6e6622d2016-06-19 12:38:44 +080019 mov r1, r2
20 bl psci_save_target_pc
Peng Fan7de47032015-10-23 10:13:04 +080021
Chen-Yu Tsai6e6622d2016-06-19 12:38:44 +080022 mov r0, r4
23 mov r1, r5
Peng Fan7de47032015-10-23 10:13:04 +080024 ldr r2, =psci_cpu_entry
25 bl imx_cpu_on
26
Chen-Yu Tsai6e6622d2016-06-19 12:38:44 +080027 pop {r4, r5, pc}
Peng Fan7de47032015-10-23 10:13:04 +080028
29.globl psci_cpu_off
30psci_cpu_off:
31
32 bl psci_cpu_off_common
33 bl psci_get_cpu_id
34 bl imx_cpu_off
35
361: wfi
37 b 1b
38
Peng Fan7de47032015-10-23 10:13:04 +080039 .popsection