diff options
author | Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com> | 2017-12-13 13:49:55 -0600 |
---|---|---|
committer | Abel Vesa <abel.vesa@nxp.com> | 2018-06-11 10:33:02 +0300 |
commit | 6c0b5030913b7886bcd75247459facb87536cdc3 (patch) | |
tree | c2a37d8b8f3866bced4bb9cecb30bc17d4b9e18b /plat/imx/imx8qxp | |
parent | 6c485ce1f3e62723b1ac2a2b8385126ce8a4fe1d (diff) |
Add low power state requests:
1. Request to DRC switch to STBY in low power.
2. Set GIC to LP mode once GIC interface has been disabled in low power flow.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Diffstat (limited to 'plat/imx/imx8qxp')
-rw-r--r-- | plat/imx/imx8qxp/imx8qxp_psci.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plat/imx/imx8qxp/imx8qxp_psci.c b/plat/imx/imx8qxp/imx8qxp_psci.c index 9957bfe8..5ac033e2 100644 --- a/plat/imx/imx8qxp/imx8qxp_psci.c +++ b/plat/imx/imx8qxp/imx8qxp_psci.c @@ -161,6 +161,9 @@ void imx_domain_suspend(const psci_power_state_t *target_state) plat_gic_cpuif_disable(); + /* Put GIC in LP mode. */ + sc_pm_set_resource_power_mode(ipc_handle, SC_R_GIC, SC_PM_PW_MODE_LP); + 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); } @@ -172,6 +175,8 @@ void imx_domain_suspend_finish(const psci_power_state_t *target_state) sc_pm_req_low_power_mode(ipc_handle, ap_core_index[cpu_id], SC_PM_PW_MODE_ON); + /* Put GIC back to high power mode. */ + sc_pm_set_resource_power_mode(ipc_handle, SC_R_GIC, SC_PM_PW_MODE_ON); plat_gic_cpuif_enable(); } @@ -225,10 +230,9 @@ int plat_setup_psci_ops(uintptr_t sec_entrypoint, sc_pm_req_low_power_mode(ipc_handle, SC_R_A35, SC_PM_PW_MODE_OFF); /* Request RUN and LP modes for DDR, system interconnect etc. */ - sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A35, SC_PM_SYS_IF_DDR, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_ON); + sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A35, SC_PM_SYS_IF_DDR, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_STBY); sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A35, SC_PM_SYS_IF_MU, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_LP); sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A35, SC_PM_SYS_IF_INTERCONNECT, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_OFF); - sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A35, SC_PM_SYS_IF_OCMEM, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_OFF); return 0; } |