From: Simon Glass <sjg@chromium.org>
Date: Fri, 26 Apr 2019 03:58:55 +0000 (-0600)
Subject: x86: broadwell: Select refcode and CPU code for SPL
X-Git-Tag: v2025.01-rc5-pxa1908~2994^2~25
X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=c0052b6efd462ccfd43343b1cbd3460e5e3fe0dc;p=u-boot.git

x86: broadwell: Select refcode and CPU code for SPL

Allow broadwell to build for SPL and include the reference code.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
---

diff --git a/arch/x86/cpu/broadwell/Makefile b/arch/x86/cpu/broadwell/Makefile
index fbc778cda5..52d56c65be 100644
--- a/arch/x86/cpu/broadwell/Makefile
+++ b/arch/x86/cpu/broadwell/Makefile
@@ -3,13 +3,14 @@
 # Copyright (c) 2016 Google, Inc
 
 obj-y += adsp.o
-obj-y += cpu.o
-obj-y += cpu_full.o
+obj-$(CONFIG_$(SPL_TPL_)X86_16BIT_INIT) += cpu.o
+obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += cpu_full.o
 
 ifdef CONFIG_SPL
 ifndef CONFIG_SPL_BUILD
 obj-y += cpu_from_spl.o
 obj-y += cpu_full.o
+obj-y += refcode.o
 endif
 ifndef CONFIG_SPL_BUILD
 # obj-y += cpu_from_spl.o
@@ -27,6 +28,6 @@ obj-y += northbridge.o
 obj-y += pch.o
 obj-y += pinctrl_broadwell.o
 obj-y += power_state.o
-obj-y += refcode.o
+obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += refcode.o
 obj-y += sata.o
 obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += sdram.o