summaryrefslogtreecommitdiff
path: root/plat/imx/common
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2019-11-22 16:41:40 +0800
committerAnson Huang <Anson.Huang@nxp.com>2019-12-13 10:45:49 +0800
commit5f58bdd52bd10bee11abf27c3d1ec79ddecbf192 (patch)
tree76c4ae877d3d8268ad1d3c4bda287b1465058a08 /plat/imx/common
parent85ea25fe359d5868370b2b08add75e00d194cc54 (diff)
plat: imx: Add pwr_domain_pwr_down_wfi callback for i.MX8QX
Add pwr_domain_pwr_down_wfi callback for i.MX8QX. Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'plat/imx/common')
-rw-r--r--plat/imx/common/imx8_psci.c12
-rw-r--r--plat/imx/common/include/plat_imx8.h1
2 files changed, 9 insertions, 4 deletions
diff --git a/plat/imx/common/imx8_psci.c b/plat/imx/common/imx8_psci.c
index 97832b03..5b53e62f 100644
--- a/plat/imx/common/imx8_psci.c
+++ b/plat/imx/common/imx8_psci.c
@@ -80,9 +80,13 @@ void imx_get_sys_suspend_power_state(psci_power_state_t *req_state)
{
unsigned int i;
- /* CPU & cluster off, system in retention */
- for (i = MPIDR_AFFLVL0; i < PLAT_MAX_PWR_LVL; i++)
- req_state->pwr_domain_state[i] = PLAT_MAX_OFF_STATE;
- req_state->pwr_domain_state[PLAT_MAX_PWR_LVL] = PLAT_MAX_RET_STATE;
+ for (i = IMX_PWR_LVL0; i <= PLAT_MAX_PWR_LVL; i++)
+ req_state->pwr_domain_state[i] = PLAT_MAX_RET_STATE;
+}
+
+void __dead2 imx_pwr_domain_pwr_down_wfi(const psci_power_state_t *target_state)
+{
+ while (1)
+ wfi();
}
diff --git a/plat/imx/common/include/plat_imx8.h b/plat/imx/common/include/plat_imx8.h
index 08066a84..253bf229 100644
--- a/plat/imx/common/include/plat_imx8.h
+++ b/plat/imx/common/include/plat_imx8.h
@@ -30,6 +30,7 @@ int imx_validate_power_state(unsigned int power_state,
psci_power_state_t *req_state);
void imx_get_sys_suspend_power_state(psci_power_state_t *req_state);
bool imx_is_wakeup_src_irqsteer(void);
+void __dead2 imx_pwr_domain_pwr_down_wfi(const psci_power_state_t *target_state);
void plat_gic_save(unsigned int proc_num, struct plat_gic_ctx *ctx);
void plat_gic_restore(unsigned int proc_num, struct plat_gic_ctx *ctx);