[PATCH 17/42] x86: Simplify check for SPL

Simon Glass sjg at chromium.org
Fri Sep 27 00:35:42 CEST 2024


Now that SPL means SPL (only) and is not defined for TPL, simplify some
checks for SPL.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 arch/x86/cpu/apollolake/fsp_bindings.c | 2 +-
 arch/x86/cpu/broadwell/cpu_full.c      | 2 +-
 arch/x86/lib/Makefile                  | 9 ++-------
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/arch/x86/cpu/apollolake/fsp_bindings.c b/arch/x86/cpu/apollolake/fsp_bindings.c
index b4bb677f5cd..4b0756e77cc 100644
--- a/arch/x86/cpu/apollolake/fsp_bindings.c
+++ b/arch/x86/cpu/apollolake/fsp_bindings.c
@@ -653,7 +653,7 @@ int fsp_m_update_config_from_dtb(ofnode node, struct fsp_m_config *cfg)
 }
 #endif
 
-#if !defined(CONFIG_XPL_BUILD) && !defined(CONFIG_TPL_BUILD)
+#if !defined(CONFIG_SPL_BUILD)
 const struct fsp_binding fsp_s_bindings[] = {
 	{
 	.type = FSP_UINT8,
diff --git a/arch/x86/cpu/broadwell/cpu_full.c b/arch/x86/cpu/broadwell/cpu_full.c
index 529dab18d5d..46a6436be54 100644
--- a/arch/x86/cpu/broadwell/cpu_full.c
+++ b/arch/x86/cpu/broadwell/cpu_full.c
@@ -84,7 +84,7 @@ static const u8 power_limit_time_msr_to_sec[] = {
 	[0x11] = 128,
 };
 
-#if defined(CONFIG_XPL_BUILD) && !defined(CONFIG_TPL_BUILD)
+#if defined(CONFIG_SPL_BUILD)
 int arch_cpu_init(void)
 {
 	return 0;
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 2738f0b577b..bf0605ad662 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -58,13 +58,8 @@ obj-$(CONFIG_FSP_VERSION1) += fsp1/
 obj-$(CONFIG_FSP_VERSION2) += fsp2/
 endif
 
-ifdef CONFIG_XPL_BUILD
-ifdef CONFIG_TPL_BUILD
-obj-y += tpl.o
-else
-obj-y += spl.o
-endif
-endif
+obj-$(CONFIG_SPL_BUILD) += spl.o
+obj-$(CONFIG_TPL_BUILD) += tpl.o
 
 lib-$(CONFIG_USE_PRIVATE_LIBGCC) += div64.o
 
-- 
2.43.0



More information about the U-Boot mailing list