imx8mm_psci.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 2019, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <stdbool.h>
  7. #include <arch.h>
  8. #include <arch_helpers.h>
  9. #include <common/debug.h>
  10. #include <lib/mmio.h>
  11. #include <lib/psci/psci.h>
  12. #include <gpc.h>
  13. #include <imx8m_psci.h>
  14. #include <plat_imx8.h>
  15. static const plat_psci_ops_t imx_plat_psci_ops = {
  16. .pwr_domain_on = imx_pwr_domain_on,
  17. .pwr_domain_on_finish = imx_pwr_domain_on_finish,
  18. .pwr_domain_off = imx_pwr_domain_off,
  19. .validate_ns_entrypoint = imx_validate_ns_entrypoint,
  20. .validate_power_state = imx_validate_power_state,
  21. .cpu_standby = imx_cpu_standby,
  22. .pwr_domain_suspend = imx_domain_suspend,
  23. .pwr_domain_suspend_finish = imx_domain_suspend_finish,
  24. .pwr_domain_pwr_down_wfi = imx_pwr_domain_pwr_down_wfi,
  25. .get_sys_suspend_power_state = imx_get_sys_suspend_power_state,
  26. .system_reset = imx_system_reset,
  27. .system_reset2 = imx_system_reset2,
  28. .system_off = imx_system_off,
  29. };
  30. /* export the platform specific psci ops */
  31. int plat_setup_psci_ops(uintptr_t sec_entrypoint,
  32. const plat_psci_ops_t **psci_ops)
  33. {
  34. /* sec_entrypoint is used for warm reset */
  35. imx_mailbox_init(sec_entrypoint);
  36. *psci_ops = &imx_plat_psci_ops;
  37. return 0;
  38. }