Just check that CONFIG_XPL_BUILD is not set to select files for U-Boot
proper build. Indeed, CONFIG_TPL_BUILD being set implies by design that
CONFIG_XPL_BUILD is set too, therefore CONFIG_XPL_BUILD not set implies
that CONFIG_TPL_BUILD is not set either, making its check needless.
Fixes: 371dc068bbf5 ("drivers: Use CONFIG_XPL_BUILD instead of
CONFIG_SPL_BUILD")
Signed-off-by: Massimo Pegorer <[email protected]>
---
drivers/Makefile | 2 +-
drivers/bus/Makefile | 2 +-
drivers/mtd/Makefile | 2 +-
drivers/mtd/nand/Makefile | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/Makefile b/drivers/Makefile
index 269c3db12e8..da37338fe1f 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -87,7 +87,7 @@ obj-$(CONFIG_TPL_MPC8XXX_INIT_DDR) += ddr/fsl/
endif
-ifeq ($(CONFIG_XPL_BUILD)$(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_XPL_BUILD),)
obj-y += ata/
obj-$(CONFIG_DM_DEMO) += demo/
diff --git a/drivers/bus/Makefile b/drivers/bus/Makefile
index 2d242bc2886..239d9a35fe4 100644
--- a/drivers/bus/Makefile
+++ b/drivers/bus/Makefile
@@ -3,7 +3,7 @@
# Makefile for the bus drivers.
#
-ifeq ($(CONFIG_XPL_BUILD)$(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_XPL_BUILD),)
obj-$(CONFIG_TI_PWMSS) += ti-pwmss.o
obj-$(CONFIG_UNIPHIER_SYSTEM_BUS) += uniphier-system-bus.o
endif
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index ce05e206073..e204f19ff8b 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -16,7 +16,7 @@ mtd-$(CONFIG_RENESAS_RPC_HF) += renesas_rpc_hf.o
mtd-$(CONFIG_HBMC_AM654) += hbmc-am654.o
# U-Boot build
-ifeq ($(CONFIG_XPL_BUILD)$(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_XPL_BUILD),)
ifneq ($(mtd-y),)
obj-y += mtd.o
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index c8169cf7390..cf53c5f601e 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0+
-ifeq ($(CONFIG_XPL_BUILD)$(CONFIG_TPL_BUILD),)
+ifeq ($(CONFIG_XPL_BUILD),)
nandcore-objs := core.o bbt.o
obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
obj-$(CONFIG_MTD_RAW_NAND) += raw/
--
2.34.1