for clarity and it will be easier to understand some follow-up patches.
Also gate gic_v3 structure with HAS_GICV3.
Signed-off-by: Julien Grall <julien.grall@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
HAS_CADENCE_UART := y
HAS_NS16550 := y
HAS_MEM_ACCESS := y
+HAS_GICV3 := y
# Use only if calling $(LD) directly.
LDFLAGS_DIRECT += -EL
obj-y += domain_build.o
obj-y += gic.o gic-v2.o
obj-$(CONFIG_ARM_32) += gic-hip04.o
-obj-$(CONFIG_ARM_64) += gic-v3.o
+obj-$(HAS_GICV3) += gic-v3.o
obj-y += io.o
obj-y += irq.o
obj-y += kernel.o
CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE
endif
+CFLAGS-$(HAS_GICV3) += -DHAS_GICV3
+
EARLY_PRINTK := n
ifeq ($(debug),y)
switch ( gic_hw_version() )
{
-#ifdef CONFIG_ARM_64
+#ifdef HAS_GICV3
case GIC_V3:
if ( vgic_v3_init(d) )
return -ENODEV;
/* Base address for guest GIC */
paddr_t dbase; /* Distributor base address */
paddr_t cbase; /* CPU base address */
-#ifdef CONFIG_ARM_64
+#ifdef HAS_GICV3
/* GIC V3 addressing */
paddr_t dbase_size; /* Distributor base size */
/* List of contiguous occupied by the redistributors */
#define DT_MATCH_GIC_V3 DT_MATCH_COMPATIBLE("arm,gic-v3")
+#ifdef HAS_GICV3
/*
* GICv3 registers that needs to be saved/restored
*/
uint32_t apr1[4];
uint64_t lr[16];
};
+#endif
/*
* GICv2 register that needs to be saved/restored
*/
union gic_state_data {
struct gic_v2 v2;
+#ifdef HAS_GICV3
struct gic_v3 v3;
+#endif
};
/*