summaryrefslogtreecommitdiff
path: root/src/soc/amd/glinda
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2024-01-26 15:33:59 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-01-27 16:40:34 +0000
commit112c2277f51684157f5c46a06b3b038b5b730679 (patch)
tree4ff3ced247ed5e7342f34c00b2314ee22d55bc40 /src/soc/amd/glinda
parent26577d2ecbb8c01635b959d296f70eb251743046 (diff)
soc/amd: move acpi_add_fsp_tables implementation to common FSP code
Since the acpi_add_fsp_tables implementation is identical for all SoCs, factor it out and move it to the common AMD FSP code. Also guard the acpi_add_fsp_tables call in soc_acpi_write_tables with if (CONFIG(PLATFORM_USES_FSP2_0)) to properly handle the FSP dependency. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I8917a346f586e77b3b3278c73aed8cf61f3c9e6a Reviewed-on: https://review.coreboot.org/c/coreboot/+/80225 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/glinda')
-rw-r--r--src/soc/amd/glinda/Makefile.mk1
-rw-r--r--src/soc/amd/glinda/acpi.c3
-rw-r--r--src/soc/amd/glinda/agesa_acpi.c17
3 files changed, 2 insertions, 19 deletions
diff --git a/src/soc/amd/glinda/Makefile.mk b/src/soc/amd/glinda/Makefile.mk
index bc217d36d1..4570e07086 100644
--- a/src/soc/amd/glinda/Makefile.mk
+++ b/src/soc/amd/glinda/Makefile.mk
@@ -24,7 +24,6 @@ verstage-y += espi_util.c
romstage-y += fsp_m_params.c
ramstage-y += acpi.c
-ramstage-y += agesa_acpi.c
ramstage-y += chip.c
ramstage-y += cpu.c
ramstage-y += fch.c
diff --git a/src/soc/amd/glinda/acpi.c b/src/soc/amd/glinda/acpi.c
index 86e9aec766..8b6031c2b1 100644
--- a/src/soc/amd/glinda/acpi.c
+++ b/src/soc/amd/glinda/acpi.c
@@ -66,7 +66,8 @@ unsigned long soc_acpi_write_tables(const struct device *device, unsigned long c
/* IVRS */
current = acpi_add_ivrs_table(current, rsdp);
- current = acpi_add_fsp_tables(current, rsdp);
+ if (CONFIG(PLATFORM_USES_FSP2_0))
+ current = acpi_add_fsp_tables(current, rsdp);
return current;
}
diff --git a/src/soc/amd/glinda/agesa_acpi.c b/src/soc/amd/glinda/agesa_acpi.c
deleted file mode 100644
index 114fdd8095..0000000000
--- a/src/soc/amd/glinda/agesa_acpi.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-/* TODO: Make common? */
-
-#include <acpi/acpi.h>
-#include <amdblocks/acpi.h>
-#include <FspGuids.h>
-#include <types.h>
-
-unsigned long acpi_add_fsp_tables(unsigned long current, acpi_rsdp_t *rsdp)
-{
- /* add ALIB SSDT from HOB */
- current = acpi_align_current(current);
- current = add_agesa_fsp_acpi_table(AMD_FSP_ACPI_ALIB_HOB_GUID, "ALIB", rsdp, current);
-
- return current;
-}