diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2017-10-17 18:49:48 +0800 |
---|---|---|
committer | Abel Vesa <abel.vesa@nxp.com> | 2018-06-11 10:08:39 +0300 |
commit | be07f3cd5951283fc0f06f92b79f04e1f22823a4 (patch) | |
tree | 58383fdd377a4f7cb8cc7dfdc5316564a37b9bcb /plat/imx/imx8qxp | |
parent | 56537aef3bbf604e7a5e8e04f3f61198d4df8555 (diff) |
imx8qxp: add suspend/resume support
Add suspend/resume support with all CPUs power down.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'plat/imx/imx8qxp')
-rw-r--r-- | plat/imx/imx8qxp/imx8qxp_psci.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/plat/imx/imx8qxp/imx8qxp_psci.c b/plat/imx/imx8qxp/imx8qxp_psci.c index e14554b5..c9c8fb3a 100644 --- a/plat/imx/imx8qxp/imx8qxp_psci.c +++ b/plat/imx/imx8qxp/imx8qxp_psci.c @@ -156,12 +156,23 @@ void imx_cpu_standby(plat_local_state_t cpu_state) void imx_domain_suspend(const psci_power_state_t *target_state) { - //psci_power_down_wfi(); + u_register_t mpidr = read_mpidr_el1(); + unsigned int cpu_id = MPIDR_AFFLVL0_VAL(mpidr); + + plat_gic_cpuif_disable(); + + sc_pm_set_cpu_resume_addr(ipc_handle, ap_core_index[cpu_id], 0x080000000); + sc_pm_req_low_power_mode(ipc_handle, ap_core_index[cpu_id], SC_PM_PW_MODE_OFF); } void imx_domain_suspend_finish(const psci_power_state_t *target_state) { - //psci_power_down_wfi(); + u_register_t mpidr = read_mpidr_el1(); + unsigned int cpu_id = MPIDR_AFFLVL0_VAL(mpidr); + + sc_pm_req_low_power_mode(ipc_handle, ap_core_index[cpu_id], SC_PM_PW_MODE_ON); + + plat_gic_cpuif_enable(); } void imx_get_sys_suspend_power_state(psci_power_state_t *req_state) |