psci.S 561 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright 2016 NXP Semiconductor.
  4. * Author: Wang Dongsheng <dongsheng.wang@freescale.com>
  5. */
  6. #include <config.h>
  7. #include <linux/linkage.h>
  8. #include <asm/armv7.h>
  9. #include <asm/psci.h>
  10. .pushsection ._secure.text, "ax"
  11. .arch_extension sec
  12. .align 5
  13. .globl psci_system_off
  14. psci_system_off:
  15. @ Get QIXIS base address
  16. movw r1, #(QIXIS_BASE & 0xffff)
  17. movt r1, #(QIXIS_BASE >> 16)
  18. ldrb r2, [r1, #QIXIS_PWR_CTL]
  19. orr r2, r2, #QIXIS_PWR_CTL_POWEROFF
  20. strb r2, [r1, #QIXIS_PWR_CTL]
  21. 1: wfi
  22. b 1b
  23. .popsection