summaryrefslogtreecommitdiffstats
path: root/arch/x86/cpu/intel_common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-23 08:11:30 -0700
committerSimon Glass <sjg@chromium.org>2021-01-05 12:24:41 -0700
commit8b842be10c2d40437b1f24a8dce8718c33045376 (patch)
treed92e428e1be0982f160823d685b9feb218cece85 /arch/x86/cpu/intel_common
parent5e89be1efd4fb4633875f99b1dbe095ff4787c98 (diff)
downloadu-boot-8b842be10c2d40437b1f24a8dce8718c33045376.tar.gz
u-boot-8b842be10c2d40437b1f24a8dce8718c33045376.tar.xz
u-boot-8b842be10c2d40437b1f24a8dce8718c33045376.zip
x86: apl: Reduce size for TPL
Update various drivers to use of_match_ptr() and to avoid including debug strings in TPL. Omit the WiFi driver entirely, since it is not used in TPL. This reduces the TPL binary size by about 608 bytes. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/cpu/intel_common')
-rw-r--r--arch/x86/cpu/intel_common/Makefile2
-rw-r--r--arch/x86/cpu/intel_common/itss.c4
-rw-r--r--arch/x86/cpu/intel_common/p2sb.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/cpu/intel_common/Makefile b/arch/x86/cpu/intel_common/Makefile
index 4a5cf17e41..8b9a810f66 100644
--- a/arch/x86/cpu/intel_common/Makefile
+++ b/arch/x86/cpu/intel_common/Makefile
@@ -26,7 +26,7 @@ obj-y += cpu.o
obj-y += fast_spi.o
obj-y += lpc.o
obj-y += lpss.o
-obj-$(CONFIG_INTEL_GENERIC_WIFI) += generic_wifi.o
+obj-$(CONFIG_$(SPL_)INTEL_GENERIC_WIFI) += generic_wifi.o
ifndef CONFIG_TARGET_EFI_APP
obj-$(CONFIG_$(SPL_TPL_)X86_32BIT_INIT) += microcode.o
ifndef CONFIG_$(SPL_)X86_64
diff --git a/arch/x86/cpu/intel_common/itss.c b/arch/x86/cpu/intel_common/itss.c
index e71ea029e5..6515d1f471 100644
--- a/arch/x86/cpu/intel_common/itss.c
+++ b/arch/x86/cpu/intel_common/itss.c
@@ -230,15 +230,17 @@ static const struct irq_ops itss_ops = {
#endif
};
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
static const struct udevice_id itss_ids[] = {
{ .compatible = "intel,itss", .data = X86_IRQT_ITSS },
{ }
};
+#endif
U_BOOT_DRIVER(intel_itss) = {
.name = "intel_itss",
.id = UCLASS_IRQ,
- .of_match = itss_ids,
+ .of_match = of_match_ptr(itss_ids),
.ops = &itss_ops,
.bind = itss_bind,
.of_to_plat = itss_of_to_plat,
diff --git a/arch/x86/cpu/intel_common/p2sb.c b/arch/x86/cpu/intel_common/p2sb.c
index 3765eeeab0..cb901f265e 100644
--- a/arch/x86/cpu/intel_common/p2sb.c
+++ b/arch/x86/cpu/intel_common/p2sb.c
@@ -184,15 +184,17 @@ static const struct p2sb_ops p2sb_ops = {
.set_hide = intel_p2sb_set_hide,
};
+#if !CONFIG_IS_ENABLED(OF_PLATDATA)
static const struct udevice_id p2sb_ids[] = {
{ .compatible = "intel,p2sb" },
{ }
};
+#endif
U_BOOT_DRIVER(intel_p2sb) = {
.name = "intel_p2sb",
.id = UCLASS_P2SB,
- .of_match = p2sb_ids,
+ .of_match = of_match_ptr(p2sb_ids),
.probe = p2sb_probe,
.remove = p2sb_remove,
.ops = &p2sb_ops,