summaryrefslogtreecommitdiff
path: root/plat/ti
diff options
context:
space:
mode:
authorAndrew F. Davis <afd@ti.com>2018-06-25 12:36:25 -0500
committerAndrew F. Davis <afd@ti.com>2018-06-29 16:49:21 -0500
commitdeed2b8398ced11d72d90f4811024a5a99dde953 (patch)
tree7e1cc9d1dfff0d875be85fdf3ef627abe43a1949 /plat/ti
parent79a1a84957f65dab7a3d535a7f6df392884e157d (diff)
ti: k3: common: Enable interrupts before entering standby state
To wake a core from wfi interrupts must be enabled, in some cases they may not be and so we can lock up here. Unconditionally enable interrupts before wfi and then restore interrupt state. Signed-off-by: Andrew F. Davis <afd@ti.com>
Diffstat (limited to 'plat/ti')
-rw-r--r--plat/ti/k3/common/k3_psci.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/plat/ti/k3/common/k3_psci.c b/plat/ti/k3/common/k3_psci.c
index 91602c8c..4d6428b5 100644
--- a/plat/ti/k3/common/k3_psci.c
+++ b/plat/ti/k3/common/k3_psci.c
@@ -17,12 +17,18 @@ uintptr_t k3_sec_entrypoint;
static void k3_cpu_standby(plat_local_state_t cpu_state)
{
- /*
- * Enter standby state
- * dsb is good practice before using wfi to enter low power states
- */
+ unsigned int scr;
+
+ scr = read_scr_el3();
+ /* Enable the Non secure interrupt to wake the CPU */
+ write_scr_el3(scr | SCR_IRQ_BIT | SCR_FIQ_BIT);
+ isb();
+ /* dsb is good practice before using wfi to enter low power states */
dsb();
+ /* Enter standby state */
wfi();
+ /* Restore SCR */
+ write_scr_el3(scr);
}
static int k3_pwr_domain_on(u_register_t mpidr)