From aa6becfce576bb663f1f26b481b245f9ca0efe9d Mon Sep 17 00:00:00 2001 From: Anson Huang Date: Thu, 14 Jun 2018 15:42:43 +0800 Subject: imx8qm: support MU power off during suspend Add MU power off support for suspend, it needs to be re-initialized after system resume. Signed-off-by: Anson Huang --- plat/imx/imx8qm/imx8qm_psci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plat/imx/imx8qm/imx8qm_psci.c b/plat/imx/imx8qm/imx8qm_psci.c index 311e5740..283bd649 100644 --- a/plat/imx/imx8qm/imx8qm_psci.c +++ b/plat/imx/imx8qm/imx8qm_psci.c @@ -14,6 +14,7 @@ #include #include #include +#include "../../common/sci/mx8_mu.h" extern sc_ipc_t ipc_handle; /* save gic dist/redist context when GIC is poewr down */ @@ -238,6 +239,8 @@ void imx_domain_suspend_finish(const psci_power_state_t *target_state) unsigned int cluster_id = MPIDR_AFFLVL1_VAL(mpidr); unsigned int cpu_id = MPIDR_AFFLVL0_VAL(mpidr); + MU_Resume(SC_IPC_CH); + if (cluster_id == 0) sc_pm_req_cpu_low_power_mode(ipc_handle, ap_core_index[cpu_id], SC_PM_PW_MODE_ON, SC_PM_WAKE_SRC_GIC); else @@ -319,8 +322,8 @@ int plat_setup_psci_ops(uintptr_t sec_entrypoint, /* Request RUN and LP modes for DDR, system interconnect etc. */ sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A53, 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_A72, 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_A53, SC_PM_SYS_IF_MU, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_STBY); - sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A72, SC_PM_SYS_IF_MU, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_STBY); + sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A53, SC_PM_SYS_IF_MU, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_OFF); + sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A72, SC_PM_SYS_IF_MU, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_OFF); sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A53, SC_PM_SYS_IF_INTERCONNECT, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_STBY); sc_pm_req_sys_if_power_mode(ipc_handle, SC_R_A72, SC_PM_SYS_IF_INTERCONNECT, SC_PM_PW_MODE_ON, SC_PM_PW_MODE_STBY); -- cgit v1.2.3