From f9ee87ffbf6e7e5d7870bd3617c5a3368ac41c54 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 7 Jun 2023 15:29:02 +0200 Subject: [PATCH] acpi/acpi.h: Remove global acpi_fill_ivrs_ioapic() In soc/amd this function is unused so drop it and rename _acpi_fill_ivrs_ioapic(). Signed-off-by: Arthur Heymans Change-Id: Ic403fd84cb9cd5805fbc6f0c5a64cefbf4b0cd81 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75711 Tested-by: build bot (Jenkins) Reviewed-by: Naresh --- src/include/acpi/acpi.h | 1 - src/northbridge/amd/pi/00730F01/northbridge.c | 2 +- src/soc/amd/common/block/acpi/ivrs.c | 18 +++--------------- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/include/acpi/acpi.h b/src/include/acpi/acpi.h index c981ee11f3..09e12115ba 100644 --- a/src/include/acpi/acpi.h +++ b/src/include/acpi/acpi.h @@ -1337,7 +1337,6 @@ unsigned long fw_cfg_acpi_tables(unsigned long start); void preload_acpi_dsdt(void); unsigned long write_acpi_tables(unsigned long addr); unsigned long acpi_fill_madt(unsigned long current); -unsigned long acpi_fill_ivrs_ioapic(acpi_ivrs_t *ivrs, unsigned long current); void acpi_fill_fadt(acpi_fadt_t *fadt); void arch_fill_fadt(acpi_fadt_t *fadt); diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c index 116cf63c68..f1a69c293d 100644 --- a/src/northbridge/amd/pi/00730F01/northbridge.c +++ b/src/northbridge/amd/pi/00730F01/northbridge.c @@ -242,7 +242,7 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest) return (unsigned long)current; } -unsigned long acpi_fill_ivrs_ioapic(acpi_ivrs_t *ivrs, unsigned long current) +static unsigned long acpi_fill_ivrs_ioapic(acpi_ivrs_t *ivrs, unsigned long current) { /* 8-byte IVHD structures must be aligned to the 8-byte boundary. */ current = ALIGN_UP(current, 8); diff --git a/src/soc/amd/common/block/acpi/ivrs.c b/src/soc/amd/common/block/acpi/ivrs.c index 1629ff914f..7f1fe5d6aa 100644 --- a/src/soc/amd/common/block/acpi/ivrs.c +++ b/src/soc/amd/common/block/acpi/ivrs.c @@ -17,7 +17,7 @@ #include #include -static unsigned long _acpi_fill_ivrs_ioapic(unsigned long current, void *ioapic_base, +static unsigned long acpi_fill_ivrs_ioapic(unsigned long current, void *ioapic_base, uint16_t src_devid, uint8_t dte_setting) { ivrs_ivhd_special_t *ivhd_ioapic = (ivrs_ivhd_special_t *)current; @@ -33,18 +33,6 @@ static unsigned long _acpi_fill_ivrs_ioapic(unsigned long current, void *ioapic_ return current; } -unsigned long acpi_fill_ivrs_ioapic(acpi_ivrs_t *ivrs, unsigned long current) -{ - uint32_t dte_setting = IVHD_DTE_LINT_1_PASS | IVHD_DTE_LINT_0_PASS | - IVHD_DTE_SYS_MGT_NO_TRANS | IVHD_DTE_NMI_PASS | - IVHD_DTE_EXT_INT_PASS | IVHD_DTE_INIT_PASS; - - current = _acpi_fill_ivrs_ioapic(current, VIO_APIC_VADDR, - SMBUS_DEVFN, dte_setting); - return _acpi_fill_ivrs_ioapic(current, (u8 *)GNB_IO_APIC_ADDR, - PCI_DEVFN(0, 1), 0); -} - static unsigned long ivhd_describe_hpet(unsigned long current, uint8_t hndl, uint16_t src_devid) { ivrs_ivhd_special_t *ivhd_hpet = (ivrs_ivhd_special_t *)current; @@ -204,7 +192,7 @@ static unsigned long acpi_ivhd_misc(unsigned long current, struct device *dev) res = probe_resource(dev, IOMMU_IOAPIC_IDX); if (res) { /* Describe IOAPIC associated with the IOMMU */ - current = _acpi_fill_ivrs_ioapic(current, (u8 *)(uintptr_t)res->base, + current = acpi_fill_ivrs_ioapic(current, (u8 *)(uintptr_t)res->base, PCI_DEVFN(0, 1) | (dev->link_list->secondary << 8), 0); } @@ -213,7 +201,7 @@ static unsigned long acpi_ivhd_misc(unsigned long current, struct device *dev) /* Describe HPET */ current = ivhd_describe_hpet(current, 0x00, SMBUS_DEVFN); /* Describe FCH IOAPICs */ - current = _acpi_fill_ivrs_ioapic(current, VIO_APIC_VADDR, + current = acpi_fill_ivrs_ioapic(current, VIO_APIC_VADDR, SMBUS_DEVFN, dte_setting); }