From bf26485d36600384b10f0a2f934ab2cda47de114 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Tue, 25 Oct 2022 18:18:36 +0200 Subject: soc/amd/common/include: introduce and use FCH_IRQ_ROUTING_ENTRIES Instead of using magic constants for the fch_pic_routing and fch_apic_routing array sizes, define FCH_IRQ_ROUTING_ENTRIES in the common code headers and use this definition. This also allows to drop the static assert for the array sizes. In the Stoneyridge mainboard code the equivalent arrays are named mainboard_picr_data and mainboard_intr_data; also use FCH_IRQ_ROUTING_ENTRIES as fixed array size there. Signed-off-by: Felix Held Change-Id: I2d7ee46bd013ce413189398a144e46ceac0c2a10 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68818 Reviewed-by: Fred Reitberger Tested-by: build bot (Jenkins) --- src/mainboard/google/skyrim/mainboard.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/mainboard/google/skyrim') diff --git a/src/mainboard/google/skyrim/mainboard.c b/src/mainboard/google/skyrim/mainboard.c index 0b707d745b..58e11f5503 100644 --- a/src/mainboard/google/skyrim/mainboard.c +++ b/src/mainboard/google/skyrim/mainboard.c @@ -16,11 +16,8 @@ * Index/Data pair. These values are chipset and mainboard * dependent and should be updated accordingly. */ -static uint8_t fch_pic_routing[0x80]; -static uint8_t fch_apic_routing[0x80]; - -_Static_assert(sizeof(fch_pic_routing) == sizeof(fch_apic_routing), - "PIC and APIC FCH interrupt tables must be the same size"); +static uint8_t fch_pic_routing[FCH_IRQ_ROUTING_ENTRIES]; +static uint8_t fch_apic_routing[FCH_IRQ_ROUTING_ENTRIES]; /* * This controls the device -> IRQ routing. -- cgit v1.2.3