From e5af91bbf430815b993c98f207d9f119165b1846 Mon Sep 17 00:00:00 2001 From: Anson Huang Date: Fri, 15 Sep 2017 15:26:30 +0800 Subject: imx8qm/imx8qxp: enable standby suspend As suspend with last CPU power down needs SCFW support, and it is NOT ready now, in order to enable kernel suspend function earlier for modules to start debugging suspend resume function, this patch adds standby suspend for now. Will add last CPU power down suspend function when SCFW is ready. Signed-off-by: Anson Huang --- lib/psci/psci_suspend.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/psci/psci_suspend.c') diff --git a/lib/psci/psci_suspend.c b/lib/psci/psci_suspend.c index 47988926..a9428ba1 100644 --- a/lib/psci/psci_suspend.c +++ b/lib/psci/psci_suspend.c @@ -234,8 +234,21 @@ exit: * requested at multiple power levels. This means that the cpu * context will be preserved. */ + +#ifdef SYSTEM_SUSPEND_USE_STANDBY + write_icc_igrpen1_el1(1); + write_scr_el3(read_scr_el3() | 0x4); + isb(); +#endif + wfi(); +#ifdef SYSTEM_SUSPEND_USE_STANDBY + write_icc_igrpen1_el1(0); + write_scr_el3(read_scr_el3() & (~0x4)); + isb(); +#endif + #if ENABLE_PSCI_STAT plat_psci_stat_accounting_stop(state_info); psci_stats_update_pwr_up(end_pwrlvl, state_info); -- cgit v1.2.3