summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/ocp/vpd/Makefile.mk11
-rw-r--r--src/drivers/ocp/vpd/xeonsp_cxl.c (renamed from src/mainboard/inventec/transformers/util.c)2
-rw-r--r--src/mainboard/intel/archercity_crb/Makefile.mk2
-rw-r--r--src/mainboard/intel/archercity_crb/util.c19
-rw-r--r--src/mainboard/inventec/transformers/Makefile.mk2
5 files changed, 9 insertions, 27 deletions
diff --git a/src/drivers/ocp/vpd/Makefile.mk b/src/drivers/ocp/vpd/Makefile.mk
index 1cdc63b524..29aad05374 100644
--- a/src/drivers/ocp/vpd/Makefile.mk
+++ b/src/drivers/ocp/vpd/Makefile.mk
@@ -1,7 +1,14 @@
## SPDX-License-Identifier: GPL-2.0-only
-romstage-$(CONFIG_OCP_VPD) += vpd_util.c
-ramstage-$(CONFIG_OCP_VPD) += vpd_util.c
+ifeq ($(CONFIG_OCP_VPD),y)
+romstage-y += vpd_util.c
+ramstage-y += vpd_util.c
+ifeq ($(CONFIG_XEON_SP_COMMON_BASE),y)
+romstage-$(CONFIG_SOC_INTEL_HAS_CXL) += xeonsp_cxl.c
+ramstage-$(CONFIG_SOC_INTEL_HAS_CXL) += xeonsp_cxl.c
+endif
+endif
+
ramstage-$(CONFIG_LINUXPAYLOAD_CMDLINE_VPD_OVERWRITE) += vpd_cmdline.c
ifeq ($(CONFIG_VPD),y)
all-$(CONFIG_CONSOLE_OVERRIDE_LOGLEVEL) += loglevel_vpd.c
diff --git a/src/mainboard/inventec/transformers/util.c b/src/drivers/ocp/vpd/xeonsp_cxl.c
index 7b9237c639..92a8eba0f8 100644
--- a/src/mainboard/inventec/transformers/util.c
+++ b/src/drivers/ocp/vpd/xeonsp_cxl.c
@@ -3,7 +3,6 @@
#include <drivers/ocp/include/vpd.h>
#include <soc/config.h>
-#if CONFIG(SOC_INTEL_HAS_CXL)
enum xeonsp_cxl_mode get_cxl_mode(void)
{
int ocp_cxl_mode = get_cxl_mode_from_vpd();
@@ -16,4 +15,3 @@ enum xeonsp_cxl_mode get_cxl_mode(void)
return XEONSP_CXL_DISABLED;
}
}
-#endif
diff --git a/src/mainboard/intel/archercity_crb/Makefile.mk b/src/mainboard/intel/archercity_crb/Makefile.mk
index b28d73c27a..4c7a7beee1 100644
--- a/src/mainboard/intel/archercity_crb/Makefile.mk
+++ b/src/mainboard/intel/archercity_crb/Makefile.mk
@@ -2,7 +2,5 @@
bootblock-y += bootblock.c
romstage-y += romstage.c
-romstage-y += util.c
ramstage-y += ramstage.c
-ramstage-y += util.c
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include
diff --git a/src/mainboard/intel/archercity_crb/util.c b/src/mainboard/intel/archercity_crb/util.c
deleted file mode 100644
index 33afeca8d3..0000000000
--- a/src/mainboard/intel/archercity_crb/util.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#include <drivers/ocp/include/vpd.h>
-#include <soc/config.h>
-
-#if CONFIG(SOC_INTEL_HAS_CXL) && CONFIG(OCP_VPD)
-enum xeonsp_cxl_mode get_cxl_mode(void)
-{
- int ocp_cxl_mode = get_cxl_mode_from_vpd();
- switch (ocp_cxl_mode) {
- case CXL_SYSTEM_MEMORY:
- return XEONSP_CXL_SYS_MEM;
- case CXL_SPM:
- return XEONSP_CXL_SP_MEM;
- default:
- return XEONSP_CXL_DISABLED;
- }
-}
-#endif
diff --git a/src/mainboard/inventec/transformers/Makefile.mk b/src/mainboard/inventec/transformers/Makefile.mk
index eb859d3d69..ecb6ef2217 100644
--- a/src/mainboard/inventec/transformers/Makefile.mk
+++ b/src/mainboard/inventec/transformers/Makefile.mk
@@ -2,7 +2,5 @@
bootblock-y += bootblock.c
romstage-y += romstage.c
-romstage-y += util.c
romstage-$(CONFIG_IPMI_KCS_ROMSTAGE) += ipmi.c
-ramstage-y += util.c
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/include