diff options
author | Jacky Bai <ping.bai@nxp.com> | 2020-10-27 16:43:53 +0800 |
---|---|---|
committer | Jacky Bai <ping.bai@nxp.com> | 2020-10-28 09:39:02 +0800 |
commit | 4b7d472fa3eedc032a1ca4757362d4daa8fe5f9a (patch) | |
tree | 7be060d619bcc2f73ecf29a46488b0a6e7ef1703 | |
parent | ccf1c54f080009827f2b8dd34ed5eb8564bab8b6 (diff) |
MLK-24923-02 plat: imx8m: Put dram into retention when dsp lpa buffer in ocram
when the DSP LPA buffer is in OCRAM, dram can be put into retention to save
power. This support is missed when removing the i.MX8MP A0 support, so add
it back.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
-rw-r--r-- | plat/imx/imx8m/imx8m_psci_common.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plat/imx/imx8m/imx8m_psci_common.c b/plat/imx/imx8m/imx8m_psci_common.c index 452958ce..ca0a5fc3 100644 --- a/plat/imx/imx8m/imx8m_psci_common.c +++ b/plat/imx/imx8m/imx8m_psci_common.c @@ -126,8 +126,13 @@ void imx_domain_suspend(const psci_power_state_t *target_state) dram_enter_retention(); imx_anamix_override(true); imx_noc_wrapper_pre_suspend(core_id); + } else { + /* flag 0xD means DSP LPA buffer is in OCRAM */ + if (mmio_read_32(IMX_SRC_BASE + LPA_STATUS) == 0xD) + dram_enter_retention(); } - imx_set_sys_wakeup(core_id, true); + + imx_set_sys_wakeup(core_id, true); } } @@ -142,8 +147,13 @@ void imx_domain_suspend_finish(const psci_power_state_t *target_state) imx_anamix_override(false); dram_exit_retention(); imx_set_sys_lpm(core_id, false); + } else { + /* flag 0xD means DSP LPA buffer is in OCRAM */ + if (mmio_read_32(IMX_SRC_BASE + LPA_STATUS) == 0xD) + dram_exit_retention(); } - imx_set_sys_wakeup(core_id, false); + + imx_set_sys_wakeup(core_id, false); } if (!is_local_state_run(CLUSTER_PWR_STATE(target_state))) { |