Commit 3580a497 authored by Derek Basehore's avatar Derek Basehore
Browse files

GICv3: Fix Dist restore for when the GIC is reset



If the GIC loses power during suspend, which the restore code was
written for, exit early in the post restore power sequence. This
prevents an assert from tripping, and the power sequence isn't needed
in this case anyways.
Signed-off-by: default avatarDerek Basehore <dbasehore@chromium.org>
parent aa9ee82d
......@@ -83,6 +83,15 @@ void arm_gicv3_distif_post_restore(unsigned int rdist_proc_num)
gicr_base = gicv3_driver_data->rdistif_base_addrs[rdist_proc_num];
assert(gicr_base);
/*
* If the GIC had power removed, the GICR_WAKER state will be reset.
* Since the GICR_WAKER.Sleep and GICR_WAKER.Quiescent bits are cleared,
* we can exit early. This also prevents the following assert from
* erroneously triggering.
*/
if (!(gicr_read_waker(gicr_base) & WAKER_SL_BIT))
return;
/*
* Writes to GICR_WAKER.Sleep bit are ignored if GICR_WAKER.Quiescent
* bit is not set. We should be alright on power on path, therefore
......
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