diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-10-25 17:48:30 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-10-26 17:44:33 +0000 |
commit | 886c1ffc652efe7e0d3345dfb34a38669041e467 (patch) | |
tree | 785b916191467c278f5e27311cab13475ad092d2 /src | |
parent | a7b86c33621eb7a45c84aaf81f342f2ea4ccbebc (diff) |
mb/amd,google: move fch_irq_routing struct definition to soc/amd
Define the fch_irq_routing struct once in a common header file instead
of in every mainboard's code.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I11d9000b6ed7529e4afd7f6e8a7332c390da6dab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/68817
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/amd/bilby/mainboard.c | 6 | ||||
-rw-r--r-- | src/mainboard/amd/birman/mainboard.c | 6 | ||||
-rw-r--r-- | src/mainboard/amd/chausie/mainboard.c | 6 | ||||
-rw-r--r-- | src/mainboard/amd/majolica/mainboard.c | 6 | ||||
-rw-r--r-- | src/mainboard/amd/mandolin/mainboard.c | 6 | ||||
-rw-r--r-- | src/mainboard/google/guybrush/mainboard.c | 6 | ||||
-rw-r--r-- | src/mainboard/google/skyrim/mainboard.c | 6 | ||||
-rw-r--r-- | src/mainboard/google/zork/mainboard.c | 6 | ||||
-rw-r--r-- | src/soc/amd/common/block/include/amdblocks/amd_pci_util.h | 6 |
9 files changed, 14 insertions, 40 deletions
diff --git a/src/mainboard/amd/bilby/mainboard.c b/src/mainboard/amd/bilby/mainboard.c index f87046acb3..c402c29a2f 100644 --- a/src/mainboard/amd/bilby/mainboard.c +++ b/src/mainboard/amd/bilby/mainboard.c @@ -33,11 +33,7 @@ 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 const struct fch_irq_routing { - uint8_t intr_index; - uint8_t pic_irq_num; - uint8_t apic_irq_num; -} bilby_fch[] = { +static const struct fch_irq_routing bilby_fch[] = { { PIRQ_A, 8, 16 }, { PIRQ_B, 10, 17 }, { PIRQ_C, 11, 18 }, diff --git a/src/mainboard/amd/birman/mainboard.c b/src/mainboard/amd/birman/mainboard.c index ffb778cf4e..34c3b4dead 100644 --- a/src/mainboard/amd/birman/mainboard.c +++ b/src/mainboard/amd/birman/mainboard.c @@ -34,11 +34,7 @@ _Static_assert(sizeof(fch_pic_routing) == sizeof(fch_apic_routing), * 8: rtc0 <- soc/amd/common/acpi/lpc.asl * 9: acpi <- soc/amd/common/acpi/lpc.asl */ -static const struct fch_irq_routing { - uint8_t intr_index; - uint8_t pic_irq_num; - uint8_t apic_irq_num; -} birman_fch[] = { +static const struct fch_irq_routing birman_fch[] = { { PIRQ_A, 12, PIRQ_NC }, { PIRQ_B, 14, PIRQ_NC }, { PIRQ_C, 15, PIRQ_NC }, diff --git a/src/mainboard/amd/chausie/mainboard.c b/src/mainboard/amd/chausie/mainboard.c index 2966b554b3..9251ff2c91 100644 --- a/src/mainboard/amd/chausie/mainboard.c +++ b/src/mainboard/amd/chausie/mainboard.c @@ -32,11 +32,7 @@ _Static_assert(sizeof(fch_pic_routing) == sizeof(fch_apic_routing), * 8: rtc0 <- soc/amd/common/acpi/lpc.asl * 9: acpi <- soc/amd/common/acpi/lpc.asl */ -static const struct fch_irq_routing { - uint8_t intr_index; - uint8_t pic_irq_num; - uint8_t apic_irq_num; -} chausie_fch[] = { +static const struct fch_irq_routing chausie_fch[] = { { PIRQ_A, 12, PIRQ_NC }, { PIRQ_B, 14, PIRQ_NC }, { PIRQ_C, 15, PIRQ_NC }, diff --git a/src/mainboard/amd/majolica/mainboard.c b/src/mainboard/amd/majolica/mainboard.c index 199cf4702e..58f754655f 100644 --- a/src/mainboard/amd/majolica/mainboard.c +++ b/src/mainboard/amd/majolica/mainboard.c @@ -31,11 +31,7 @@ _Static_assert(sizeof(fch_pic_routing) == sizeof(fch_apic_routing), * 8: rtc0 <- soc/amd/common/acpi/lpc.asl * 9: acpi <- soc/amd/common/acpi/lpc.asl */ -static const struct fch_irq_routing { - uint8_t intr_index; - uint8_t pic_irq_num; - uint8_t apic_irq_num; -} majolica_fch[] = { +static const struct fch_irq_routing majolica_fch[] = { { PIRQ_A, 12, PIRQ_NC }, { PIRQ_B, 14, PIRQ_NC }, { PIRQ_C, 15, PIRQ_NC }, diff --git a/src/mainboard/amd/mandolin/mainboard.c b/src/mainboard/amd/mandolin/mainboard.c index ccea7c7ee4..0f87d9c799 100644 --- a/src/mainboard/amd/mandolin/mainboard.c +++ b/src/mainboard/amd/mandolin/mainboard.c @@ -28,11 +28,7 @@ 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 const struct fch_irq_routing { - uint8_t intr_index; - uint8_t pic_irq_num; - uint8_t apic_irq_num; -} mandolin_fch[] = { +static const struct fch_irq_routing mandolin_fch[] = { { PIRQ_A, 8, 16 }, { PIRQ_B, 10, 17 }, { PIRQ_C, 11, 18 }, diff --git a/src/mainboard/google/guybrush/mainboard.c b/src/mainboard/google/guybrush/mainboard.c index 9a1c24d82c..4bcb52e3fa 100644 --- a/src/mainboard/google/guybrush/mainboard.c +++ b/src/mainboard/google/guybrush/mainboard.c @@ -46,11 +46,7 @@ _Static_assert(sizeof(fch_pic_routing) == sizeof(fch_apic_routing), * 8: rtc0 <- soc/amd/common/acpi/lpc.asl * 9: acpi <- soc/amd/common/acpi/lpc.asl */ -static const struct fch_irq_routing { - uint8_t intr_index; - uint8_t pic_irq_num; - uint8_t apic_irq_num; -} guybrush_fch[] = { +static const struct fch_irq_routing guybrush_fch[] = { { PIRQ_A, 12, PIRQ_NC }, { PIRQ_B, 14, PIRQ_NC }, { PIRQ_C, 15, PIRQ_NC }, diff --git a/src/mainboard/google/skyrim/mainboard.c b/src/mainboard/google/skyrim/mainboard.c index 6af647ca9f..0b707d745b 100644 --- a/src/mainboard/google/skyrim/mainboard.c +++ b/src/mainboard/google/skyrim/mainboard.c @@ -33,11 +33,7 @@ _Static_assert(sizeof(fch_pic_routing) == sizeof(fch_apic_routing), * 9: acpi <- soc/amd/common/acpi/lpc.asl */ -static const struct fch_irq_routing { - uint8_t intr_index; - uint8_t pic_irq_num; - uint8_t apic_irq_num; -} skyrim_fch[] = { +static const struct fch_irq_routing skyrim_fch[] = { { PIRQ_A, 12, PIRQ_NC }, { PIRQ_B, 14, PIRQ_NC }, { PIRQ_C, 15, PIRQ_NC }, diff --git a/src/mainboard/google/zork/mainboard.c b/src/mainboard/google/zork/mainboard.c index 82e5c6aaad..fedf1cce3c 100644 --- a/src/mainboard/google/zork/mainboard.c +++ b/src/mainboard/google/zork/mainboard.c @@ -56,11 +56,7 @@ _Static_assert(sizeof(fch_pic_routing) == sizeof(fch_apic_routing), * 9: acpi <- soc/amd/common/acpi/lpc.asl * 12: i8042 <- ec/google/chromeec/acpi/superio.asl */ -static const struct fch_irq_routing { - uint8_t intr_index; - uint8_t pic_irq_num; - uint8_t apic_irq_num; -} fch_pirq[] = { +static const struct fch_irq_routing fch_pirq[] = { { PIRQ_A, 6, PIRQ_NC }, { PIRQ_B, 13, PIRQ_NC }, { PIRQ_C, 14, PIRQ_NC }, diff --git a/src/soc/amd/common/block/include/amdblocks/amd_pci_util.h b/src/soc/amd/common/block/include/amdblocks/amd_pci_util.h index 0a4061f631..6543853439 100644 --- a/src/soc/amd/common/block/include/amdblocks/amd_pci_util.h +++ b/src/soc/amd/common/block/include/amdblocks/amd_pci_util.h @@ -11,6 +11,12 @@ #define PCI_INTR_INDEX 0xc00 #define PCI_INTR_DATA 0xc01 +struct fch_irq_routing { + uint8_t intr_index; + uint8_t pic_irq_num; + uint8_t apic_irq_num; +}; + struct pirq_struct { u8 devfn; u8 PIN[4]; /* PINA/B/C/D are index 0/1/2/3 */ |