summaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-01-26 14:22:31 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-01-27 16:38:54 +0000
commitd9e826322031f5936231be44e3b2c406be40a304 (patch)
tree5721ca69716d2c0d7ecdf28dcce0e42a4e1e3386 /src/soc/amd
parent3aaf8efdfad7081fa39a679f2f6d28a176c3a005 (diff)
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. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Ib9aa215f2b4ba58f43fed2c751d989f1719e0a17 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80221 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/cezanne/chip.c2
-rw-r--r--src/soc/amd/cezanne/include/soc/acpi.h8
-rw-r--r--src/soc/amd/common/block/include/amdblocks/acpi.h3
-rw-r--r--src/soc/amd/genoa_poc/chip.c2
-rw-r--r--src/soc/amd/genoa_poc/include/soc/acpi.h6
-rw-r--r--src/soc/amd/glinda/chip.c2
-rw-r--r--src/soc/amd/glinda/include/soc/acpi.h8
-rw-r--r--src/soc/amd/mendocino/chip.c2
-rw-r--r--src/soc/amd/mendocino/include/soc/acpi.h8
-rw-r--r--src/soc/amd/phoenix/chip.c2
-rw-r--r--src/soc/amd/phoenix/include/soc/acpi.h8
-rw-r--r--src/soc/amd/picasso/chip.c2
-rw-r--r--src/soc/amd/picasso/include/soc/acpi.h8
-rw-r--r--src/soc/amd/stoneyridge/northbridge.c5
14 files changed, 11 insertions, 55 deletions
diff --git a/src/soc/amd/cezanne/chip.c b/src/soc/amd/cezanne/chip.c
index 1ef8fcc3ea..4be0a829e4 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 37655a904d..c709b7837f 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 f02dbe21e1..2a29f37c4f 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 chipset_power_state {
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 5f29428955..83d2bc9fa6 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 082386fe61..a2a9f39732 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 ff10b622f0..0f49f6a01c 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 d47ff002cc..891b6589a4 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 50a1edf37c..f724e20409 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 5b72492079..25f9234938 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 970ac6f813..173b2208df 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 b3f7adce97..3fea5cc800 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 45b4ca2a6d..4f3058252c 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 5f7e748f8d..8dee91ded3 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 5ac690963a..deebfb351f 100644
--- a/src/soc/amd/stoneyridge/northbridge.c
+++ b/src/soc/amd/stoneyridge/northbridge.c
@@ -131,9 +131,8 @@ static unsigned long acpi_fill_hest(acpi_hest_t *hest)
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;