]> git.sur5r.net Git - u-boot/blob - arch/arm/mach-imx/mx7/psci.S
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[u-boot] / 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         mov     r2, r3
27         bl      psci_save
28
29         mov     r0, r4
30         mov     r1, r5
31         ldr     r2, =psci_cpu_entry
32         bl      imx_cpu_on
33
34         pop     {r4, r5, pc}
35
36 .globl psci_cpu_off
37 psci_cpu_off:
38
39         bl      psci_cpu_off_common
40         bl      psci_get_cpu_id
41         bl      imx_cpu_off
42
43 1:      wfi
44         b 1b
45
46 .globl psci_system_reset
47 psci_system_reset:
48         bl      imx_system_reset
49
50 2:      wfi
51         b 2b
52
53 .globl psci_system_off
54 psci_system_off:
55         bl      imx_system_off
56
57 3:      wfi
58         b 3b
59
60         .popsection