diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2017-09-15 15:26:30 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2017-09-15 15:26:30 +0800 |
commit | e5af91bbf430815b993c98f207d9f119165b1846 (patch) | |
tree | 8d4c311fa73d0d7fae8b016c37a694b293f229cf /lib/psci/psci_suspend.c | |
parent | 0a9efa7fafe8d1cc6a36e813e53cced22ed7171e (diff) |
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 <Anson.Huang@nxp.com>
Diffstat (limited to 'lib/psci/psci_suspend.c')
-rw-r--r-- | lib/psci/psci_suspend.c | 13 |
1 files changed, 13 insertions, 0 deletions
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); |