Attention is currently required from: Fred Reitberger, Jason Glenesk, Matt DeVillier.
Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80221?usp=email )
Change subject: soc/amd/*/acpi: use common soc_acpi_write_tables prototype ......................................................................
soc/amd/*/acpi: use common soc_acpi_write_tables prototype
Since the definition is the same for all SoCs, move it to the common amdblock/acpi.h header. Since the Stoneyridge northbridge.c file also includes this prototype, remove the static attribute of the function there. CZN TODO
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: Ib9aa215f2b4ba58f43fed2c751d989f1719e0a17 --- M src/soc/amd/cezanne/chip.c M src/soc/amd/cezanne/include/soc/acpi.h M src/soc/amd/common/block/include/amdblocks/acpi.h M src/soc/amd/genoa_poc/chip.c M src/soc/amd/genoa_poc/include/soc/acpi.h M src/soc/amd/glinda/chip.c M src/soc/amd/glinda/include/soc/acpi.h M src/soc/amd/mendocino/chip.c M src/soc/amd/mendocino/include/soc/acpi.h M src/soc/amd/phoenix/chip.c M src/soc/amd/phoenix/include/soc/acpi.h M src/soc/amd/picasso/chip.c M src/soc/amd/picasso/include/soc/acpi.h M src/soc/amd/stoneyridge/northbridge.c 14 files changed, 11 insertions(+), 55 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/80221/1
diff --git a/src/soc/amd/cezanne/chip.c b/src/soc/amd/cezanne/chip.c index 1ef8fcc..4be0a82 100644 --- a/src/soc/amd/cezanne/chip.c +++ b/src/soc/amd/cezanne/chip.c @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <amdblocks/acpi.h> #include <amdblocks/data_fabric.h> #include <amdblocks/fsp.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> -#include <soc/acpi.h> #include <soc/cpu.h> #include <soc/pci_devs.h> #include <soc/southbridge.h> diff --git a/src/soc/amd/cezanne/include/soc/acpi.h b/src/soc/amd/cezanne/include/soc/acpi.h index 37655a9..c709b78 100644 --- a/src/soc/amd/cezanne/include/soc/acpi.h +++ b/src/soc/amd/cezanne/include/soc/acpi.h @@ -3,14 +3,6 @@ #ifndef AMD_CEZANNE_ACPI_H #define AMD_CEZANNE_ACPI_H
-#include <acpi/acpi.h> -#include <amdblocks/acpi.h> -#include <device/device.h> -#include <stdint.h> - #define ACPI_SCI_IRQ 9
-unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current, - acpi_rsdp_t *rsdp); - #endif /* AMD_CEZANNE_ACPI_H */ diff --git a/src/soc/amd/common/block/include/amdblocks/acpi.h b/src/soc/amd/common/block/include/amdblocks/acpi.h index f02dbe2..2a29f37 100644 --- a/src/soc/amd/common/block/include/amdblocks/acpi.h +++ b/src/soc/amd/common/block/include/amdblocks/acpi.h @@ -50,6 +50,9 @@ struct gpio_wake_state gpio_state; };
+unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current, + acpi_rsdp_t *rsdp); + unsigned long southbridge_write_acpi_tables(const struct device *device, unsigned long current, struct acpi_rsdp *rsdp);
diff --git a/src/soc/amd/genoa_poc/chip.c b/src/soc/amd/genoa_poc/chip.c index 5f29428..83d2bc9 100644 --- a/src/soc/amd/genoa_poc/chip.c +++ b/src/soc/amd/genoa_poc/chip.c @@ -1,8 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <amdblocks/acpi.h> #include <device/device.h> #include <soc/southbridge.h> -#include <soc/acpi.h> #include <soc/southbridge.h> #include <vendorcode/amd/opensil/genoa_poc/opensil.h>
diff --git a/src/soc/amd/genoa_poc/include/soc/acpi.h b/src/soc/amd/genoa_poc/include/soc/acpi.h index 082386f..a2a9f39 100644 --- a/src/soc/amd/genoa_poc/include/soc/acpi.h +++ b/src/soc/amd/genoa_poc/include/soc/acpi.h @@ -3,12 +3,6 @@ #ifndef AMD_GENOA_POC_ACPI_H #define AMD_GENOA_POC_ACPI_H
-#include <acpi/acpi.h> -#include <device/device.h> - #define ACPI_SCI_IRQ 9
-unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current, - struct acpi_rsdp *rsdp); - #endif /* AMD_GENOA_POC_ACPI_H */ diff --git a/src/soc/amd/glinda/chip.c b/src/soc/amd/glinda/chip.c index ff10b62..0f49f6a 100644 --- a/src/soc/amd/glinda/chip.c +++ b/src/soc/amd/glinda/chip.c @@ -2,12 +2,12 @@
/* TODO: Update for Glinda */
+#include <amdblocks/acpi.h> #include <amdblocks/data_fabric.h> #include <amdblocks/fsp.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> -#include <soc/acpi.h> #include <soc/cpu.h> #include <soc/pci_devs.h> #include <soc/southbridge.h> diff --git a/src/soc/amd/glinda/include/soc/acpi.h b/src/soc/amd/glinda/include/soc/acpi.h index d47ff002..891b658 100644 --- a/src/soc/amd/glinda/include/soc/acpi.h +++ b/src/soc/amd/glinda/include/soc/acpi.h @@ -5,14 +5,6 @@ #ifndef AMD_GLINDA_ACPI_H #define AMD_GLINDA_ACPI_H
-#include <acpi/acpi.h> -#include <amdblocks/acpi.h> -#include <device/device.h> -#include <stdint.h> - #define ACPI_SCI_IRQ 9
-unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current, - acpi_rsdp_t *rsdp); - #endif /* AMD_GLINDA_ACPI_H */ diff --git a/src/soc/amd/mendocino/chip.c b/src/soc/amd/mendocino/chip.c index 50a1edf..f724e20 100644 --- a/src/soc/amd/mendocino/chip.c +++ b/src/soc/amd/mendocino/chip.c @@ -1,11 +1,11 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <amdblocks/acpi.h> #include <amdblocks/data_fabric.h> #include <amdblocks/fsp.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> -#include <soc/acpi.h> #include <soc/cpu.h> #include <soc/pci_devs.h> #include <soc/southbridge.h> diff --git a/src/soc/amd/mendocino/include/soc/acpi.h b/src/soc/amd/mendocino/include/soc/acpi.h index 5b72492..25f9234 100644 --- a/src/soc/amd/mendocino/include/soc/acpi.h +++ b/src/soc/amd/mendocino/include/soc/acpi.h @@ -3,14 +3,6 @@ #ifndef AMD_MENDOCINO_ACPI_H #define AMD_MENDOCINO_ACPI_H
-#include <acpi/acpi.h> -#include <amdblocks/acpi.h> -#include <device/device.h> -#include <stdint.h> - #define ACPI_SCI_IRQ 9
-unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current, - acpi_rsdp_t *rsdp); - #endif /* AMD_MENDOCINO_ACPI_H */ diff --git a/src/soc/amd/phoenix/chip.c b/src/soc/amd/phoenix/chip.c index 970ac6f..173b220 100644 --- a/src/soc/amd/phoenix/chip.c +++ b/src/soc/amd/phoenix/chip.c @@ -2,12 +2,12 @@
/* TODO: Update for Phoenix */
+#include <amdblocks/acpi.h> #include <amdblocks/data_fabric.h> #include <amdblocks/fsp.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> -#include <soc/acpi.h> #include <soc/cpu.h> #include <soc/pci_devs.h> #include <soc/southbridge.h> diff --git a/src/soc/amd/phoenix/include/soc/acpi.h b/src/soc/amd/phoenix/include/soc/acpi.h index b3f7adc..3fea5cc 100644 --- a/src/soc/amd/phoenix/include/soc/acpi.h +++ b/src/soc/amd/phoenix/include/soc/acpi.h @@ -5,14 +5,6 @@ #ifndef AMD_PHOENIX_ACPI_H #define AMD_PHOENIX_ACPI_H
-#include <acpi/acpi.h> -#include <amdblocks/acpi.h> -#include <device/device.h> -#include <stdint.h> - #define ACPI_SCI_IRQ 9
-unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current, - acpi_rsdp_t *rsdp); - #endif /* AMD_PHOENIX_ACPI_H */ diff --git a/src/soc/amd/picasso/chip.c b/src/soc/amd/picasso/chip.c index 45b4ca2..4f30582 100644 --- a/src/soc/amd/picasso/chip.c +++ b/src/soc/amd/picasso/chip.c @@ -1,12 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <amdblocks/acpi.h> #include <amdblocks/data_fabric.h> #include <amdblocks/fsp.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> #include <drivers/i2c/designware/dw_i2c.h> -#include <soc/acpi.h> #include <soc/cpu.h> #include <soc/iomap.h> #include <soc/pci_devs.h> diff --git a/src/soc/amd/picasso/include/soc/acpi.h b/src/soc/amd/picasso/include/soc/acpi.h index 5f7e748..8dee91d 100644 --- a/src/soc/amd/picasso/include/soc/acpi.h +++ b/src/soc/amd/picasso/include/soc/acpi.h @@ -3,14 +3,6 @@ #ifndef AMD_PICASSO_ACPI_H #define AMD_PICASSO_ACPI_H
-#include <acpi/acpi.h> -#include <amdblocks/acpi.h> -#include <device/device.h> -#include <stdint.h> - #define ACPI_SCI_IRQ 9
-unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current, - acpi_rsdp_t *rsdp); - #endif /* AMD_PICASSO_ACPI_H */ diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c index 5ac6909..deebfb3 100644 --- a/src/soc/amd/stoneyridge/northbridge.c +++ b/src/soc/amd/stoneyridge/northbridge.c @@ -131,9 +131,8 @@ return (unsigned long)current; }
-static unsigned long soc_acpi_write_tables(const struct device *device, - unsigned long current, - acpi_rsdp_t *rsdp) +unsigned long soc_acpi_write_tables(const struct device *device, unsigned long current, + acpi_rsdp_t *rsdp) { acpi_srat_t *srat; acpi_slit_t *slit;