[PATCH 2/6] drivers/mmc/Kconfig: Make DM_MMC a hidden symbol

Quentin Schulz quentin.schulz at cherry.de
Tue Jan 14 14:43:44 CET 2025


Hi Tom,

On 12/20/24 11:22 PM, Tom Rini wrote:
> At this point in time, DM is always enabled. So if MMC is enabled, it
> should select DM_MMC. No drivers need to depend on DM_MMC being enabled
> now, so remove that from dependency lists. This now means that a number
> of platforms which select'd DM_MMC need to select MMC instead.
> 
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Cc: "NXP i.MX U-Boot Team" <uboot-imx at nxp.com>
> Cc: Fabio Estevam <festevam at gmail.com>
> Cc: Minkyu Kang <mk7.kang at samsung.com>
> Cc: Rayagonda Kokatanur <rayagonda.kokatanur at broadcom.com>
> Cc: Stefano Babic <sbabic at denx.de>
> Cc: Svyatoslav Ryhel <clamor95 at gmail.com>
> Cc: Thierry Reding <treding at nvidia.com>
> ---
>   arch/Kconfig                      |  2 +-
>   arch/arm/Kconfig                  | 18 +++------
>   arch/arm/mach-exynos/Kconfig      |  8 ++--
>   arch/arm/mach-imx/mx5/Kconfig     |  2 +-
>   arch/arm/mach-imx/mx6/Kconfig     | 32 +++++++--------
>   arch/arm/mach-omap2/omap3/Kconfig |  2 +-
>   arch/arm/mach-s5pc1xx/Kconfig     |  2 +-
>   arch/arm/mach-tegra/Kconfig       |  2 +-
>   drivers/mmc/Kconfig               | 65 +++++++++++--------------------
>   9 files changed, 52 insertions(+), 81 deletions(-)
> 
> diff --git a/arch/Kconfig b/arch/Kconfig
> index 6258788f53ff..44ae4b3babdf 100644
> --- a/arch/Kconfig
> +++ b/arch/Kconfig
> @@ -172,13 +172,13 @@ config SANDBOX
>   	select DM_GPIO
>   	select DM_I2C
>   	select DM_KEYBOARD
> -	select DM_MMC
>   	select DM_SERIAL
>   	select DM_SPI
>   	select DM_SPI_FLASH
>   	select GZIP_COMPRESSED
>   	select IO_TRACE
>   	select LZO
> +	select MMC
>   	select MTD
>   	select OF_BOARD_SETUP
>   	select PCI_ENDPOINT
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index ea414fe376a8..ea256f687867 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1163,7 +1163,6 @@ config ARCH_SUNXI
>   	select DM_SPI if SPI
>   	select DM_SPI_FLASH if SPI && MTD
>   	select DM_KEYBOARD
> -	select DM_MMC if MMC
>   	select DM_SERIAL
>   	select OF_BOARD_SETUP
>   	select OF_CONTROL
> @@ -1211,7 +1210,6 @@ config ARCH_U8500
>   	select CPU_V7A
>   	select DM

I guess this can be removed in may places since it defaults to y and we 
are relying on it being set to y?

[...]

> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index 9f2fecce3826..46513db0d6e3 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -3,7 +3,7 @@ menu "MMC Host controller Support"
>   config MMC
>   	bool "MMC/SD/SDIO card support"
>   	default ARM || PPC || SANDBOX
> -	select DM_MMC if DM
> +	select DM_MMC
>   	help
>   	  This selects MultiMediaCard, Secure Digital and Secure
>   	  Digital I/O support.
> @@ -39,14 +39,14 @@ config MMC_BROKEN_CD
>   	  If card  detection feature is broken, just poll to detect.
>   
>   config DM_MMC
> -	bool "Enable MMC controllers using Driver Model"
> +	bool
>   	depends on DM

We can probably remove this depends on as well since DM is implied?

Generally, I'm wondering why we are even keeping this symbol and not 
merging MMC and DM_MMC together? This is not a blocker for this change 
though, we can go babysteps :)

Looks ok to me otherwise.

Cheers,
Quentin


More information about the U-Boot mailing list