aboutsummaryrefslogtreecommitdiff
path: root/include/drivers
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2020-03-25 15:50:38 +0000
committerMadhukar Pappireddy <madhukar.pappireddy@arm.com>2020-06-09 17:05:49 +0000
commitb4ad365a4642fb8b2ecb1df73dd69ee4caf58bd2 (patch)
treed185a5907abda0403916cc24fe8dfe78bc54cf03 /include/drivers
parent16af48e4cd4d99ccb8818c6f580b8184198ba0fe (diff)
downloadarm-trusted-firmware-b4ad365a4642fb8b2ecb1df73dd69ee4caf58bd2.tar.gz
GICv3: GIC-600: Detect GIC-600 at runtime
The only difference between GIC-500 and GIC-600 relevant to TF-A is the differing power management sequence. A certain GIC implementation is detectable at runtime, for instance by checking the IIDR register. Let's add that test before initiating the GIC-600 specific sequence, so the code can be used on both GIC-600 and GIC-500 chips alike, without deciding on a GIC chip at compile time. This means that the GIC-500 "driver" is now redundant. To allow minimal platform support, add a switch to disable GIC-600 support. Change-Id: I17ea97d9fb05874772ebaa13e6678b4ba3415557 Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'include/drivers')
-rw-r--r--include/drivers/arm/gicv3.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/drivers/arm/gicv3.h b/include/drivers/arm/gicv3.h
index 03596b96e..77dc350dd 100644
--- a/include/drivers/arm/gicv3.h
+++ b/include/drivers/arm/gicv3.h
@@ -222,6 +222,14 @@
#define TYPER_PPI_NUM_SHIFT U(27)
#define TYPER_PPI_NUM_MASK U(0x1f)
+/* GICR_IIDR bit definitions */
+#define IIDR_PRODUCT_ID_MASK 0xff000000
+#define IIDR_VARIANT_MASK 0x000f0000
+#define IIDR_REVISION_MASK 0x0000f000
+#define IIDR_IMPLEMENTER_MASK 0x00000fff
+#define IIDR_MODEL_MASK (IIDR_PRODUCT_ID_MASK | \
+ IIDR_IMPLEMENTER_MASK)
+
/*******************************************************************************
* GICv3 and 3.1 CPU interface registers & constants
******************************************************************************/