[PATCH 57/57] DM: DM_MMC migration is now mandatory for non-SPL

Tom Rini trini at konsulko.com
Sun Feb 21 02:06:34 CET 2021


As it has been now two years past the migration deadline, it is required
to have migrated.  Remove the check from the Makefile and rework some of
the Kconfig logic slightly to get the functional dependencies of DM_MMC
/ BLK right in both the SPL and non-SPL case.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 Makefile              | 10 ----------
 drivers/block/Kconfig |  2 +-
 drivers/mmc/Kconfig   |  4 +++-
 3 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index 4da46dea39b0..bfc353be2d1b 100644
--- a/Makefile
+++ b/Makefile
@@ -1044,16 +1044,6 @@ ifneq ($(CONFIG_DM),y)
 	@echo >&2 "See doc/driver-model/migration.rst for more info."
 	@echo >&2 "===================================================="
 endif
-ifeq ($(CONFIG_MMC),y)
-ifneq ($(CONFIG_DM_MMC)$(CONFIG_BLK),yy)
-	@echo >&2 "===================== WARNING ======================"
-	@echo >&2 "This board does not use CONFIG_DM_MMC. Please update"
-	@echo >&2 "the board to use CONFIG_DM_MMC before the v2019.04 release."
-	@echo >&2 "Failure to update by the deadline may result in board removal."
-	@echo >&2 "See doc/driver-model/migration.rst for more info."
-	@echo >&2 "===================================================="
-endif
-endif
 ifeq ($(CONFIG_USB),y)
 ifneq ($(CONFIG_DM_USB)$(CONFIG_OF_CONTROL)$(CONFIG_BLK),yyy)
 	@echo >&2 "===================== WARNING ======================"
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 1e6dad86927f..ebc638cb0fad 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -18,7 +18,7 @@ config HAVE_BLOCK_DEVICE
 config SPL_BLK
 	bool "Support block devices in SPL"
 	depends on SPL_DM && BLK
-	default y
+	default y if SPL_DM_MMC
 	help
 	  Enable support for block devices, such as SCSI, MMC and USB
 	  flash sticks. These provide a block-level interface which permits
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 59a9999ea01f..ae6cabd093c7 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -4,6 +4,7 @@ config MMC
 	bool "MMC/SD/SDIO card support"
 	default ARM || PPC || SANDBOX
 	select HAVE_BLOCK_DEVICE
+	select DM_MMC if DM
 	help
 	  This selects MultiMediaCard, Secure Digital and Secure
 	  Digital I/O support.
@@ -33,6 +34,7 @@ config MMC_BROKEN_CD
 config DM_MMC
 	bool "Enable MMC controllers using Driver Model"
 	depends on DM
+	select BLK
 	help
 	  This enables the MultiMediaCard (MMC) uclass which supports MMC and
 	  Secure Digital I/O (SDIO) cards. Both removable (SD, micro-SD, etc.)
@@ -42,7 +44,7 @@ config DM_MMC
 
 config SPL_DM_MMC
 	bool "Enable MMC controllers using Driver Model in SPL"
-	depends on SPL_DM && DM_MMC
+	depends on SPL_DM && DM_MMC && SPL_OF_LIBFDT
 	default y
 	help
 	  This enables the MultiMediaCard (MMC) uclass which supports MMC and
-- 
2.17.1



More information about the U-Boot mailing list