imx8mn_psci.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright 2019-2020 NXP
  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_off = imx_system_off,
  28. };
  29. /* export the platform specific psci ops */
  30. int plat_setup_psci_ops(uintptr_t sec_entrypoint,
  31. const plat_psci_ops_t **psci_ops)
  32. {
  33. /* sec_entrypoint is used for warm reset */
  34. imx_mailbox_init(sec_entrypoint);
  35. *psci_ops = &imx_plat_psci_ops;
  36. return 0;
  37. }