SPDX: Convert all of our single license tags to Linux Kernel style
[platform/kernel/u-boot.git] / arch / arm / mach-imx / mx7 / psci.S
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
4  * Copyright 2017 NXP
5  */
6
7 #include <config.h>
8 #include <linux/linkage.h>
9
10 #include <asm/armv7.h>
11 #include <asm/arch-armv7/generictimer.h>
12 #include <asm/psci.h>
13
14         .pushsection ._secure.text, "ax"
15
16         .arch_extension sec
17
18 .globl psci_cpu_on
19 psci_cpu_on:
20         push    {r4, r5, lr}
21
22         mov     r4, r0
23         mov     r5, r1
24         mov     r0, r1
25         mov     r1, r2
26         bl      psci_save_target_pc
27
28         mov     r0, r4
29         mov     r1, r5
30         ldr     r2, =psci_cpu_entry
31         bl      imx_cpu_on
32
33         pop     {r4, r5, pc}
34
35 .globl psci_cpu_off
36 psci_cpu_off:
37
38         bl      psci_cpu_off_common
39         bl      psci_get_cpu_id
40         bl      imx_cpu_off
41
42 1:      wfi
43         b 1b
44
45 .globl psci_system_reset
46 psci_system_reset:
47         bl      imx_system_reset
48
49 2:      wfi
50         b 2b
51
52 .globl psci_system_off
53 psci_system_off:
54         bl      imx_system_off
55
56 3:      wfi
57         b 3b
58
59         .popsection