summaryrefslogtreecommitdiff
path: root/plat/juno/aarch64/juno_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'plat/juno/aarch64/juno_common.c')
-rw-r--r--plat/juno/aarch64/juno_common.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/plat/juno/aarch64/juno_common.c b/plat/juno/aarch64/juno_common.c
index 6ea0b1558..371323e78 100644
--- a/plat/juno/aarch64/juno_common.c
+++ b/plat/juno/aarch64/juno_common.c
@@ -114,7 +114,7 @@ static const mmap_region_t juno_mmap[] = {
};
#endif
-CASSERT((sizeof(juno_mmap)/sizeof(juno_mmap[0])) + JUNO_BL_REGIONS \
+CASSERT(ARRAY_SIZE(juno_mmap) + JUNO_BL_REGIONS \
<= MAX_MMAP_REGIONS, assert_max_mmap_regions);
/* Array of secure interrupts to be configured by the gic driver */
@@ -136,9 +136,6 @@ const unsigned int irq_sec_array[] = {
IRQ_SEC_SGI_7
};
-const unsigned int num_sec_irqs = sizeof(irq_sec_array) /
- sizeof(irq_sec_array[0]);
-
/*******************************************************************************
* Macro generating the code for the function setting up the pagetables as per
* the platform memory map & initialize the mmu, for the given exception level
@@ -211,5 +208,9 @@ uint64_t plat_get_syscnt_freq(void)
void plat_gic_init(void)
{
- arm_gic_init(GICC_BASE, GICD_BASE, 0, irq_sec_array, num_sec_irqs);
+ arm_gic_init(GICC_BASE,
+ GICD_BASE,
+ 0,
+ irq_sec_array,
+ ARRAY_SIZE(irq_sec_array));
}