psci.S 810 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2015-2016 Freescale Semiconductor, Inc.
  4. * Copyright 2017 NXP
  5. */
  6. #include <config.h>
  7. #include <linux/linkage.h>
  8. #include <asm/armv7.h>
  9. #include <asm/arch-armv7/generictimer.h>
  10. #include <asm/psci.h>
  11. .pushsection ._secure.text, "ax"
  12. .arch_extension sec
  13. .globl psci_cpu_on
  14. psci_cpu_on:
  15. push {r4, r5, lr}
  16. mov r4, r0
  17. mov r5, r1
  18. mov r0, r1
  19. mov r1, r2
  20. mov r2, r3
  21. bl psci_save
  22. mov r0, r4
  23. mov r1, r5
  24. ldr r2, =psci_cpu_entry
  25. bl imx_cpu_on
  26. pop {r4, r5, pc}
  27. .globl psci_cpu_off
  28. psci_cpu_off:
  29. bl psci_cpu_off_common
  30. bl psci_get_cpu_id
  31. bl imx_cpu_off
  32. 1: wfi
  33. b 1b
  34. .globl psci_system_reset
  35. psci_system_reset:
  36. bl imx_system_reset
  37. 2: wfi
  38. b 2b
  39. .globl psci_system_off
  40. psci_system_off:
  41. bl imx_system_off
  42. 3: wfi
  43. b 3b
  44. .popsection