x86: cpu: Don't include the cpu driver in TPL
authorSimon Glass <sjg@chromium.org>
Wed, 25 Sep 2019 14:56:48 +0000 (08:56 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Tue, 8 Oct 2019 05:57:49 +0000 (13:57 +0800)
We don't need this driver very early in boot and it adds code size. Drop
it.

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

index 3f1f62da2b1d23ff7b9096708bd5ae87ee5ab885..6296b55ff8ad2d26928c4c4b2b4ccf47e6f36b59 100644 (file)
@@ -26,7 +26,10 @@ endif
 
 extra-$(CONFIG_$(SPL_TPL_)X86_16BIT_INIT) += resetvec.o start16.o
 
-obj-y  += cpu.o cpu_x86.o
+obj-y  += cpu.o
+ifndef CONFIG_TPL_BUILD
+obj-y  += cpu_x86.o
+endif
 
 ifndef CONFIG_$(SPL_)X86_64
 AFLAGS_REMOVE_call32.o := -mregparm=3 \