Commit deed2b83 authored by Andrew F. Davis's avatar Andrew F. Davis
Browse files

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: default avatarAndrew F. Davis <afd@ti.com>
parent 79a1a849
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment