psci.S 561 B

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