Merge branch 'master' of git://git.denx.de/u-boot-video
[oweals/u-boot.git] / board / freescale / ls1021aqds / psci.S
1 /*
2  * Copyright 2016 NXP Semiconductor.
3  * Author: Wang Dongsheng <dongsheng.wang@freescale.com>
4  *
5  * SPDX-License-Identifier:     GPL-2.0+
6  */
7
8 #include <config.h>
9 #include <linux/linkage.h>
10
11 #include <asm/armv7.h>
12 #include <asm/psci.h>
13
14         .pushsection ._secure.text, "ax"
15
16         .arch_extension sec
17
18         .align  5
19
20 .globl  psci_system_off
21 psci_system_off:
22         @ Get QIXIS base address
23         movw    r1, #(QIXIS_BASE & 0xffff)
24         movt    r1, #(QIXIS_BASE >> 16)
25
26         ldrb    r2, [r1, #QIXIS_PWR_CTL]
27         orr     r2, r2, #QIXIS_PWR_CTL_POWEROFF
28         strb    r2, [r1, #QIXIS_PWR_CTL]
29
30 1:      wfi
31         b       1b
32
33         .popsection