diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-04-10 17:03:32 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2023-04-26 10:53:16 +0000 |
commit | e742b68f1ac9324ce1f700323f1226e86d068a8c (patch) | |
tree | b7fc74a0d5a1d6b3ba0773b59839d2bc15fddcb0 /src/soc/amd | |
parent | ae1b2d49cf0ad09ff8f1e3904a9e7b23d6fb423b (diff) |
arch/x86/ioapic: Promote ioapic_get_sci_pin()
Platform needs to implement this to provide information about SCI IRQ
pin and polarity, to be used for filling in ACPI FADT and MADT entries.
Change-Id: Icea7e9ca4abf3997c01617d2f78f25036d85a52f
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74337
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/cezanne/acpi.c | 2 | ||||
-rw-r--r-- | src/soc/amd/common/block/lpc/lpc.c | 8 | ||||
-rw-r--r-- | src/soc/amd/glinda/acpi.c | 2 | ||||
-rw-r--r-- | src/soc/amd/mendocino/acpi.c | 2 | ||||
-rw-r--r-- | src/soc/amd/phoenix/acpi.c | 2 | ||||
-rw-r--r-- | src/soc/amd/picasso/acpi.c | 2 | ||||
-rw-r--r-- | src/soc/amd/stoneyridge/acpi.c | 2 |
7 files changed, 8 insertions, 12 deletions
diff --git a/src/soc/amd/cezanne/acpi.c b/src/soc/amd/cezanne/acpi.c index 0d2c517cc8..7a64c11c99 100644 --- a/src/soc/amd/cezanne/acpi.c +++ b/src/soc/amd/cezanne/acpi.c @@ -49,8 +49,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) printk(BIOS_DEBUG, "pm_base: 0x%04x\n", ACPI_IO_BASE); - fadt->sci_int = ACPI_SCI_IRQ; - if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; diff --git a/src/soc/amd/common/block/lpc/lpc.c b/src/soc/amd/common/block/lpc/lpc.c index 09c35db582..1fbff532fd 100644 --- a/src/soc/amd/common/block/lpc/lpc.c +++ b/src/soc/amd/common/block/lpc/lpc.c @@ -16,6 +16,7 @@ #include <amdblocks/ioapic.h> #include <amdblocks/iomap.h> #include <amdblocks/lpc.h> +#include <soc/acpi.h> #include <soc/iomap.h> #include <soc/lpc.h> #include <soc/southbridge.h> @@ -34,6 +35,13 @@ static void setup_serirq(void) pm_write8(PM_SERIRQ_CONF, byte); } +void ioapic_get_sci_pin(u8 *gsi, u8 *irq, u8 *flags) +{ + *gsi = ACPI_SCI_IRQ; + *irq = ACPI_SCI_IRQ; + *flags = MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW; +} + static void fch_ioapic_init(void) { fch_enable_ioapic_decode(); diff --git a/src/soc/amd/glinda/acpi.c b/src/soc/amd/glinda/acpi.c index 2943d7dcd0..d97dc0903f 100644 --- a/src/soc/amd/glinda/acpi.c +++ b/src/soc/amd/glinda/acpi.c @@ -52,8 +52,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) printk(BIOS_DEBUG, "pm_base: 0x%04x\n", ACPI_IO_BASE); - fadt->sci_int = ACPI_SCI_IRQ; - if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; diff --git a/src/soc/amd/mendocino/acpi.c b/src/soc/amd/mendocino/acpi.c index 8fb7237419..94cb246f81 100644 --- a/src/soc/amd/mendocino/acpi.c +++ b/src/soc/amd/mendocino/acpi.c @@ -51,8 +51,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) printk(BIOS_DEBUG, "pm_base: 0x%04x\n", ACPI_IO_BASE); - fadt->sci_int = ACPI_SCI_IRQ; - if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; diff --git a/src/soc/amd/phoenix/acpi.c b/src/soc/amd/phoenix/acpi.c index ea2a997854..427fb74ee9 100644 --- a/src/soc/amd/phoenix/acpi.c +++ b/src/soc/amd/phoenix/acpi.c @@ -52,8 +52,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) printk(BIOS_DEBUG, "pm_base: 0x%04x\n", ACPI_IO_BASE); - fadt->sci_int = ACPI_SCI_IRQ; - if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; diff --git a/src/soc/amd/picasso/acpi.c b/src/soc/amd/picasso/acpi.c index 341d9e059e..5d34f47fd8 100644 --- a/src/soc/amd/picasso/acpi.c +++ b/src/soc/amd/picasso/acpi.c @@ -56,8 +56,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) printk(BIOS_DEBUG, "pm_base: 0x%04x\n", ACPI_IO_BASE); - fadt->sci_int = ACPI_SCI_IRQ; - if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; diff --git a/src/soc/amd/stoneyridge/acpi.c b/src/soc/amd/stoneyridge/acpi.c index 39f13b6f47..9aef6088a1 100644 --- a/src/soc/amd/stoneyridge/acpi.c +++ b/src/soc/amd/stoneyridge/acpi.c @@ -50,8 +50,6 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) { printk(BIOS_DEBUG, "pm_base: 0x%04x\n", ACPI_IO_BASE); - fadt->sci_int = ACPI_SCI_IRQ; - if (permanent_smi_handler()) { fadt->smi_cmd = APM_CNT; fadt->acpi_enable = APM_CNT_ACPI_ENABLE; |