Peng Fan | 7de4703 | 2015-10-23 10:13:04 +0800 | [diff] [blame] | 1 | #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 Fan | 7de4703 | 2015-10-23 10:13:04 +0800 | [diff] [blame] | 12 | .globl psci_cpu_on |
| 13 | psci_cpu_on: |
Chen-Yu Tsai | 6e6622d | 2016-06-19 12:38:44 +0800 | [diff] [blame] | 14 | push {r4, r5, lr} |
Peng Fan | 7de4703 | 2015-10-23 10:13:04 +0800 | [diff] [blame] | 15 | |
Chen-Yu Tsai | 6e6622d | 2016-06-19 12:38:44 +0800 | [diff] [blame] | 16 | mov r4, r0 |
| 17 | mov r5, r1 |
Peng Fan | 7de4703 | 2015-10-23 10:13:04 +0800 | [diff] [blame] | 18 | mov r0, r1 |
Chen-Yu Tsai | 6e6622d | 2016-06-19 12:38:44 +0800 | [diff] [blame] | 19 | mov r1, r2 |
| 20 | bl psci_save_target_pc |
Peng Fan | 7de4703 | 2015-10-23 10:13:04 +0800 | [diff] [blame] | 21 | |
Chen-Yu Tsai | 6e6622d | 2016-06-19 12:38:44 +0800 | [diff] [blame] | 22 | mov r0, r4 |
| 23 | mov r1, r5 |
Peng Fan | 7de4703 | 2015-10-23 10:13:04 +0800 | [diff] [blame] | 24 | ldr r2, =psci_cpu_entry |
| 25 | bl imx_cpu_on |
| 26 | |
Chen-Yu Tsai | 6e6622d | 2016-06-19 12:38:44 +0800 | [diff] [blame] | 27 | pop {r4, r5, pc} |
Peng Fan | 7de4703 | 2015-10-23 10:13:04 +0800 | [diff] [blame] | 28 | |
| 29 | .globl psci_cpu_off |
| 30 | psci_cpu_off: |
| 31 | |
| 32 | bl psci_cpu_off_common |
| 33 | bl psci_get_cpu_id |
| 34 | bl imx_cpu_off |
| 35 | |
| 36 | 1: wfi |
| 37 | b 1b |
| 38 | |
Peng Fan | 7de4703 | 2015-10-23 10:13:04 +0800 | [diff] [blame] | 39 | .popsection |