summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authordavidcunado-arm <david.cunado@arm.com>2018-02-01 08:58:23 +0000
committerGitHub <noreply@github.com>2018-02-01 08:58:23 +0000
commit334e1ceb4812982543ce2f77a61087477915042c (patch)
treea5fc2563be325a7741de8a36404bc4bfb7f590c9 /drivers
parente45820dc54ed5df7f22fbeeef9739ac67618ebd6 (diff)
parent3284ce15ba775432900684bca38983b7b34a33b8 (diff)
Merge pull request #1236 from dbasehore/gic-save-restore
RK3399 GIC save/restore
Diffstat (limited to 'drivers')
-rw-r--r--drivers/arm/gic/v3/arm_gicv3_common.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/arm/gic/v3/arm_gicv3_common.c b/drivers/arm/gic/v3/arm_gicv3_common.c
index 8d552ca5..c8097329 100644
--- a/drivers/arm/gic/v3/arm_gicv3_common.c
+++ b/drivers/arm/gic/v3/arm_gicv3_common.c
@@ -84,6 +84,15 @@ void arm_gicv3_distif_post_restore(unsigned int 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
* coming out of sleep and Quiescent should be set, but we assert in