[PATCH 16/45] dm: blk: mmc: Tidy up some Makefile rules for SPL

Simon Glass sjg at chromium.org
Sun Sep 25 17:02:19 CEST 2022


Use the correct SPL_TPL_ variable so that these features can be enabled in
TPL and VPL as needed.

Note that the default for TPL is y since some boards boot via MMC, so
this addds 137 bytes on rockchip firefly-rk3288 for example.

Other boards which enable BLK in TPL are:

   chromebook_coral
   chromebook_samus_tpl
   sandbox_vpl

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

 drivers/Makefile       | 1 +
 drivers/block/Makefile | 2 +-
 drivers/mmc/Makefile   | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index 9d9f69a3c9a..41cef4178dd 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -1,5 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
+obj-$(CONFIG_$(SPL_TPL_)BLK) += block/
 obj-$(CONFIG_$(SPL_TPL_)BOOTCOUNT_LIMIT) += bootcount/
 obj-$(CONFIG_$(SPL_TPL_)BUTTON) += button/
 obj-$(CONFIG_$(SPL_TPL_)CACHE) += cache/
diff --git a/drivers/block/Makefile b/drivers/block/Makefile
index f48d3e12140..19d9317c825 100644
--- a/drivers/block/Makefile
+++ b/drivers/block/Makefile
@@ -3,7 +3,7 @@
 # (C) Copyright 2000-2007
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-$(CONFIG_$(SPL_)BLK) += blk-uclass.o
+obj-$(CONFIG_$(SPL_TPL_)BLK) += blk-uclass.o
 
 ifndef CONFIG_$(SPL_)BLK
 obj-$(CONFIG_SPL_LEGACY_BLOCK) += blk_legacy.o
diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile
index 5d5104bbf1d..3a664c2ebbb 100644
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -10,7 +10,7 @@ ifdef CONFIG_$(SPL_TPL_)DM_MMC
 obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += mmc_bootdev.o
 endif
 
-obj-$(CONFIG_$(SPL_)MMC_WRITE) += mmc_write.o
+obj-$(CONFIG_$(SPL_TPL_)MMC_WRITE) += mmc_write.o
 obj-$(CONFIG_MMC_PWRSEQ) += mmc-pwrseq.o
 obj-$(CONFIG_MMC_SDHCI_ADMA_HELPERS) += sdhci-adma.o
 
-- 
2.37.3.998.g577e59143f-goog



More information about the U-Boot mailing list