diff mbox

[v2,3/6] mmc: make MMC driver entries dependent on MMC

Message ID 1481116230-9495-4-git-send-email-yamada.masahiro@socionext.com
State New
Headers show

Commit Message

Masahiro Yamada Dec. 7, 2016, 1:10 p.m. UTC
Currently, CONFIG_MMC is not related to any other options by
"depends on" or "select".  One of big advantages of using Kconfig
is automatic dependency tracking, but the current state is lacking
it.  As the first step, make the existing MMC driver entries depend
on MMC.

This commit was created by the following steps:

[1] Run the following script:

--------------------8<--------------------
rm -f tmp.txt

for d in $(find . -path './configs/*_defconfig')
do
        if grep -q -e 'CONFIG_MSM_SDHCI=y' $d ||
           grep -q -e 'CONFIG_ATMEL_SDHCI=y' $d ||
           grep -q -e 'CONFIG_ROCKCHIP_DWMMC=y' $d ||
           grep -q -e 'CONFIG_SH_SDHI=y' $d ||
           grep -q -e 'CONFIG_PIC32_SDHCI=y' $d ||
           grep -q -e 'CONFIG_ZYNQ_SDHCI=y' $d ||
           grep -q -e 'CONFIG_ROCKCHIP_SDHCI=y' $d ||
           grep -q -e 'CONFIG_MMC_UNIPHIER=y' $d ||
           grep -q -e 'CONFIG_SANDBOX_MMC=y' $d
        then
                echo CONFIG_MMC=y >> $d
                echo ${d#./configs/} >> tmp.txt
        fi
done

tools/moveconfig.py -y -s -d tmp.txt
rm tmp.txt
--------------------8<--------------------

[2] surround MMC driver entries with "if MMC" and "endif"

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

---

Changes in v2: None

 configs/sama5d2_xplained_mmc_defconfig      | 1 -
 configs/sama5d2_xplained_spiflash_defconfig | 1 -
 configs/uniphier_ld20_defconfig             | 1 -
 configs/uniphier_ld4_sld8_defconfig         | 1 -
 configs/uniphier_pro4_defconfig             | 1 -
 configs/uniphier_pxs2_ld6b_defconfig        | 1 -
 configs/uniphier_sld3_defconfig             | 1 -
 drivers/mmc/Kconfig                         | 4 ++++
 8 files changed, 4 insertions(+), 7 deletions(-)

-- 
2.7.4

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Comments

Jaehoon Chung Dec. 8, 2016, 11:30 p.m. UTC | #1
On 12/07/2016 10:10 PM, Masahiro Yamada wrote:
> Currently, CONFIG_MMC is not related to any other options by

> "depends on" or "select".  One of big advantages of using Kconfig

> is automatic dependency tracking, but the current state is lacking

> it.  As the first step, make the existing MMC driver entries depend

> on MMC.

> 

> This commit was created by the following steps:

> 

> [1] Run the following script:

> 

> --------------------8<--------------------

> rm -f tmp.txt

> 

> for d in $(find . -path './configs/*_defconfig')

> do

>         if grep -q -e 'CONFIG_MSM_SDHCI=y' $d ||

>            grep -q -e 'CONFIG_ATMEL_SDHCI=y' $d ||

>            grep -q -e 'CONFIG_ROCKCHIP_DWMMC=y' $d ||

>            grep -q -e 'CONFIG_SH_SDHI=y' $d ||

>            grep -q -e 'CONFIG_PIC32_SDHCI=y' $d ||

>            grep -q -e 'CONFIG_ZYNQ_SDHCI=y' $d ||

>            grep -q -e 'CONFIG_ROCKCHIP_SDHCI=y' $d ||

>            grep -q -e 'CONFIG_MMC_UNIPHIER=y' $d ||

>            grep -q -e 'CONFIG_SANDBOX_MMC=y' $d

>         then

>                 echo CONFIG_MMC=y >> $d

>                 echo ${d#./configs/} >> tmp.txt

>         fi

> done

> 

> tools/moveconfig.py -y -s -d tmp.txt

> rm tmp.txt

> --------------------8<--------------------

> 

> [2] surround MMC driver entries with "if MMC" and "endif"

> 

> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

> Reviewed-by: Tom Rini <trini@konsulko.com>



Reviewd-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung


> ---

> 

> Changes in v2: None

> 

>  configs/sama5d2_xplained_mmc_defconfig      | 1 -

>  configs/sama5d2_xplained_spiflash_defconfig | 1 -

>  configs/uniphier_ld20_defconfig             | 1 -

>  configs/uniphier_ld4_sld8_defconfig         | 1 -

>  configs/uniphier_pro4_defconfig             | 1 -

>  configs/uniphier_pxs2_ld6b_defconfig        | 1 -

>  configs/uniphier_sld3_defconfig             | 1 -

>  drivers/mmc/Kconfig                         | 4 ++++

>  8 files changed, 4 insertions(+), 7 deletions(-)

> 

> diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig

> index 525e08b..931defc 100644

> --- a/configs/sama5d2_xplained_mmc_defconfig

> +++ b/configs/sama5d2_xplained_mmc_defconfig

> @@ -8,7 +8,6 @@ CONFIG_SPL_FAT_SUPPORT=y

>  CONFIG_SPL_LIBDISK_SUPPORT=y

>  CONFIG_SPL_MMC_SUPPORT=y

>  CONFIG_SPL_SERIAL_SUPPORT=y

> -# CONFIG_MMC is not set

>  CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"

>  CONFIG_FIT=y

>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"

> diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig

> index 939fc8e..a04f9ea 100644

> --- a/configs/sama5d2_xplained_spiflash_defconfig

> +++ b/configs/sama5d2_xplained_spiflash_defconfig

> @@ -7,7 +7,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y

>  CONFIG_SPL_SERIAL_SUPPORT=y

>  CONFIG_SPL_SPI_FLASH_SUPPORT=y

>  CONFIG_SPL_SPI_SUPPORT=y

> -# CONFIG_MMC is not set

>  CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"

>  CONFIG_FIT=y

>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"

> diff --git a/configs/uniphier_ld20_defconfig b/configs/uniphier_ld20_defconfig

> index 26a1bf8..3e802d3 100644

> --- a/configs/uniphier_ld20_defconfig

> +++ b/configs/uniphier_ld20_defconfig

> @@ -4,7 +4,6 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000

>  CONFIG_SPL_SERIAL_SUPPORT=y

>  CONFIG_ARCH_UNIPHIER_LD20=y

>  CONFIG_MICRO_SUPPORT_CARD=y

> -# CONFIG_MMC is not set

>  CONFIG_SYS_TEXT_BASE=0x84000000

>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld20-ref"

>  CONFIG_SPL_NOR_SUPPORT=y

> diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig

> index f5d98d8..b141561 100644

> --- a/configs/uniphier_ld4_sld8_defconfig

> +++ b/configs/uniphier_ld4_sld8_defconfig

> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y

>  CONFIG_SPL_SERIAL_SUPPORT=y

>  CONFIG_ARCH_UNIPHIER_LD4_SLD8=y

>  CONFIG_MICRO_SUPPORT_CARD=y

> -# CONFIG_MMC is not set

>  CONFIG_SYS_TEXT_BASE=0x84000000

>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld4-ref"

>  CONFIG_SPL_NOR_SUPPORT=y

> diff --git a/configs/uniphier_pro4_defconfig b/configs/uniphier_pro4_defconfig

> index f45485b..f71ef56 100644

> --- a/configs/uniphier_pro4_defconfig

> +++ b/configs/uniphier_pro4_defconfig

> @@ -5,7 +5,6 @@ CONFIG_SPL_MMC_SUPPORT=y

>  CONFIG_SPL_NAND_SUPPORT=y

>  CONFIG_SPL_SERIAL_SUPPORT=y

>  CONFIG_MICRO_SUPPORT_CARD=y

> -# CONFIG_MMC is not set

>  CONFIG_SYS_TEXT_BASE=0x84000000

>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-pro4-ref"

>  CONFIG_SPL_NOR_SUPPORT=y

> diff --git a/configs/uniphier_pxs2_ld6b_defconfig b/configs/uniphier_pxs2_ld6b_defconfig

> index f17b22f..ba3867f 100644

> --- a/configs/uniphier_pxs2_ld6b_defconfig

> +++ b/configs/uniphier_pxs2_ld6b_defconfig

> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y

>  CONFIG_SPL_SERIAL_SUPPORT=y

>  CONFIG_ARCH_UNIPHIER_PRO5_PXS2_LD6B=y

>  CONFIG_MICRO_SUPPORT_CARD=y

> -# CONFIG_MMC is not set

>  CONFIG_SYS_TEXT_BASE=0x84000000

>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-pxs2-vodka"

>  CONFIG_SPL_NOR_SUPPORT=y

> diff --git a/configs/uniphier_sld3_defconfig b/configs/uniphier_sld3_defconfig

> index 70e3193..3568f7a 100644

> --- a/configs/uniphier_sld3_defconfig

> +++ b/configs/uniphier_sld3_defconfig

> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y

>  CONFIG_SPL_SERIAL_SUPPORT=y

>  CONFIG_ARCH_UNIPHIER_SLD3=y

>  CONFIG_MICRO_SUPPORT_CARD=y

> -# CONFIG_MMC is not set

>  CONFIG_SYS_TEXT_BASE=0x84000000

>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-sld3-ref"

>  CONFIG_SPL_NOR_SUPPORT=y

> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig

> index 9bd511c..f3e150e 100644

> --- a/drivers/mmc/Kconfig

> +++ b/drivers/mmc/Kconfig

> @@ -30,6 +30,8 @@ config DM_MMC_OPS

>  	  option will be removed as soon as all DM_MMC drivers use it, as it

>  	  will the only supported behaviour.

>  

> +if MMC

> +

>  config SPL_MMC_TINY

>  	bool "Tiny MMC framework in SPL"

>  	help

> @@ -114,4 +116,6 @@ config SANDBOX_MMC

>  	  improves build coverage for sandbox and makes it easier to detect

>  	  MMC build errors with sandbox.

>  

> +endif

> +

>  endmenu

> 


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Jaehoon Chung Dec. 8, 2016, 11:31 p.m. UTC | #2
On 12/09/2016 08:30 AM, Jaehoon Chung wrote:
> On 12/07/2016 10:10 PM, Masahiro Yamada wrote:

>> Currently, CONFIG_MMC is not related to any other options by

>> "depends on" or "select".  One of big advantages of using Kconfig

>> is automatic dependency tracking, but the current state is lacking

>> it.  As the first step, make the existing MMC driver entries depend

>> on MMC.

>>

>> This commit was created by the following steps:

>>

>> [1] Run the following script:

>>

>> --------------------8<--------------------

>> rm -f tmp.txt

>>

>> for d in $(find . -path './configs/*_defconfig')

>> do

>>         if grep -q -e 'CONFIG_MSM_SDHCI=y' $d ||

>>            grep -q -e 'CONFIG_ATMEL_SDHCI=y' $d ||

>>            grep -q -e 'CONFIG_ROCKCHIP_DWMMC=y' $d ||

>>            grep -q -e 'CONFIG_SH_SDHI=y' $d ||

>>            grep -q -e 'CONFIG_PIC32_SDHCI=y' $d ||

>>            grep -q -e 'CONFIG_ZYNQ_SDHCI=y' $d ||

>>            grep -q -e 'CONFIG_ROCKCHIP_SDHCI=y' $d ||

>>            grep -q -e 'CONFIG_MMC_UNIPHIER=y' $d ||

>>            grep -q -e 'CONFIG_SANDBOX_MMC=y' $d

>>         then

>>                 echo CONFIG_MMC=y >> $d

>>                 echo ${d#./configs/} >> tmp.txt

>>         fi

>> done

>>

>> tools/moveconfig.py -y -s -d tmp.txt

>> rm tmp.txt

>> --------------------8<--------------------

>>

>> [2] surround MMC driver entries with "if MMC" and "endif"

>>

>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

>> Reviewed-by: Tom Rini <trini@konsulko.com>

> 

> 

> Reviewd-by: Jaehoon Chung <jh80.chung@samsung.com>


s/Reviewd/Reviewed..

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>


Best Regards,
Jaehoon Chung


> 

> Best Regards,

> Jaehoon Chung

> 

> 

>> ---

>>

>> Changes in v2: None

>>

>>  configs/sama5d2_xplained_mmc_defconfig      | 1 -

>>  configs/sama5d2_xplained_spiflash_defconfig | 1 -

>>  configs/uniphier_ld20_defconfig             | 1 -

>>  configs/uniphier_ld4_sld8_defconfig         | 1 -

>>  configs/uniphier_pro4_defconfig             | 1 -

>>  configs/uniphier_pxs2_ld6b_defconfig        | 1 -

>>  configs/uniphier_sld3_defconfig             | 1 -

>>  drivers/mmc/Kconfig                         | 4 ++++

>>  8 files changed, 4 insertions(+), 7 deletions(-)

>>

>> diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig

>> index 525e08b..931defc 100644

>> --- a/configs/sama5d2_xplained_mmc_defconfig

>> +++ b/configs/sama5d2_xplained_mmc_defconfig

>> @@ -8,7 +8,6 @@ CONFIG_SPL_FAT_SUPPORT=y

>>  CONFIG_SPL_LIBDISK_SUPPORT=y

>>  CONFIG_SPL_MMC_SUPPORT=y

>>  CONFIG_SPL_SERIAL_SUPPORT=y

>> -# CONFIG_MMC is not set

>>  CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"

>>  CONFIG_FIT=y

>>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"

>> diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig

>> index 939fc8e..a04f9ea 100644

>> --- a/configs/sama5d2_xplained_spiflash_defconfig

>> +++ b/configs/sama5d2_xplained_spiflash_defconfig

>> @@ -7,7 +7,6 @@ CONFIG_SPL_LIBGENERIC_SUPPORT=y

>>  CONFIG_SPL_SERIAL_SUPPORT=y

>>  CONFIG_SPL_SPI_FLASH_SUPPORT=y

>>  CONFIG_SPL_SPI_SUPPORT=y

>> -# CONFIG_MMC is not set

>>  CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"

>>  CONFIG_FIT=y

>>  CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"

>> diff --git a/configs/uniphier_ld20_defconfig b/configs/uniphier_ld20_defconfig

>> index 26a1bf8..3e802d3 100644

>> --- a/configs/uniphier_ld20_defconfig

>> +++ b/configs/uniphier_ld20_defconfig

>> @@ -4,7 +4,6 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000

>>  CONFIG_SPL_SERIAL_SUPPORT=y

>>  CONFIG_ARCH_UNIPHIER_LD20=y

>>  CONFIG_MICRO_SUPPORT_CARD=y

>> -# CONFIG_MMC is not set

>>  CONFIG_SYS_TEXT_BASE=0x84000000

>>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld20-ref"

>>  CONFIG_SPL_NOR_SUPPORT=y

>> diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig

>> index f5d98d8..b141561 100644

>> --- a/configs/uniphier_ld4_sld8_defconfig

>> +++ b/configs/uniphier_ld4_sld8_defconfig

>> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y

>>  CONFIG_SPL_SERIAL_SUPPORT=y

>>  CONFIG_ARCH_UNIPHIER_LD4_SLD8=y

>>  CONFIG_MICRO_SUPPORT_CARD=y

>> -# CONFIG_MMC is not set

>>  CONFIG_SYS_TEXT_BASE=0x84000000

>>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld4-ref"

>>  CONFIG_SPL_NOR_SUPPORT=y

>> diff --git a/configs/uniphier_pro4_defconfig b/configs/uniphier_pro4_defconfig

>> index f45485b..f71ef56 100644

>> --- a/configs/uniphier_pro4_defconfig

>> +++ b/configs/uniphier_pro4_defconfig

>> @@ -5,7 +5,6 @@ CONFIG_SPL_MMC_SUPPORT=y

>>  CONFIG_SPL_NAND_SUPPORT=y

>>  CONFIG_SPL_SERIAL_SUPPORT=y

>>  CONFIG_MICRO_SUPPORT_CARD=y

>> -# CONFIG_MMC is not set

>>  CONFIG_SYS_TEXT_BASE=0x84000000

>>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-pro4-ref"

>>  CONFIG_SPL_NOR_SUPPORT=y

>> diff --git a/configs/uniphier_pxs2_ld6b_defconfig b/configs/uniphier_pxs2_ld6b_defconfig

>> index f17b22f..ba3867f 100644

>> --- a/configs/uniphier_pxs2_ld6b_defconfig

>> +++ b/configs/uniphier_pxs2_ld6b_defconfig

>> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y

>>  CONFIG_SPL_SERIAL_SUPPORT=y

>>  CONFIG_ARCH_UNIPHIER_PRO5_PXS2_LD6B=y

>>  CONFIG_MICRO_SUPPORT_CARD=y

>> -# CONFIG_MMC is not set

>>  CONFIG_SYS_TEXT_BASE=0x84000000

>>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-pxs2-vodka"

>>  CONFIG_SPL_NOR_SUPPORT=y

>> diff --git a/configs/uniphier_sld3_defconfig b/configs/uniphier_sld3_defconfig

>> index 70e3193..3568f7a 100644

>> --- a/configs/uniphier_sld3_defconfig

>> +++ b/configs/uniphier_sld3_defconfig

>> @@ -6,7 +6,6 @@ CONFIG_SPL_NAND_SUPPORT=y

>>  CONFIG_SPL_SERIAL_SUPPORT=y

>>  CONFIG_ARCH_UNIPHIER_SLD3=y

>>  CONFIG_MICRO_SUPPORT_CARD=y

>> -# CONFIG_MMC is not set

>>  CONFIG_SYS_TEXT_BASE=0x84000000

>>  CONFIG_DEFAULT_DEVICE_TREE="uniphier-sld3-ref"

>>  CONFIG_SPL_NOR_SUPPORT=y

>> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig

>> index 9bd511c..f3e150e 100644

>> --- a/drivers/mmc/Kconfig

>> +++ b/drivers/mmc/Kconfig

>> @@ -30,6 +30,8 @@ config DM_MMC_OPS

>>  	  option will be removed as soon as all DM_MMC drivers use it, as it

>>  	  will the only supported behaviour.

>>  

>> +if MMC

>> +

>>  config SPL_MMC_TINY

>>  	bool "Tiny MMC framework in SPL"

>>  	help

>> @@ -114,4 +116,6 @@ config SANDBOX_MMC

>>  	  improves build coverage for sandbox and makes it easier to detect

>>  	  MMC build errors with sandbox.

>>  

>> +endif

>> +

>>  endmenu

>>

> 

> _______________________________________________

> U-Boot mailing list

> U-Boot@lists.denx.de

> http://lists.denx.de/mailman/listinfo/u-boot

> 

> 

> 


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
Tom Rini Dec. 29, 2016, 10:48 p.m. UTC | #3
On Wed, Dec 07, 2016 at 10:10:27PM +0900, Masahiro Yamada wrote:

> Currently, CONFIG_MMC is not related to any other options by

> "depends on" or "select".  One of big advantages of using Kconfig

> is automatic dependency tracking, but the current state is lacking

> it.  As the first step, make the existing MMC driver entries depend

> on MMC.

> 

> This commit was created by the following steps:

> 

> [1] Run the following script:

> 


Applied to u-boot/master, thanks!

-- 
Tom
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
diff mbox

Patch

diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index 525e08b..931defc 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -8,7 +8,6 @@  CONFIG_SPL_FAT_SUPPORT=y
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
-# CONFIG_MMC is not set
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index 939fc8e..a04f9ea 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -7,7 +7,6 @@  CONFIG_SPL_LIBGENERIC_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_SPL_SPI_FLASH_SUPPORT=y
 CONFIG_SPL_SPI_SUPPORT=y
-# CONFIG_MMC is not set
 CONFIG_DEFAULT_DEVICE_TREE="at91-sama5d2_xplained"
 CONFIG_FIT=y
 CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
diff --git a/configs/uniphier_ld20_defconfig b/configs/uniphier_ld20_defconfig
index 26a1bf8..3e802d3 100644
--- a/configs/uniphier_ld20_defconfig
+++ b/configs/uniphier_ld20_defconfig
@@ -4,7 +4,6 @@  CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_ARCH_UNIPHIER_LD20=y
 CONFIG_MICRO_SUPPORT_CARD=y
-# CONFIG_MMC is not set
 CONFIG_SYS_TEXT_BASE=0x84000000
 CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld20-ref"
 CONFIG_SPL_NOR_SUPPORT=y
diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig
index f5d98d8..b141561 100644
--- a/configs/uniphier_ld4_sld8_defconfig
+++ b/configs/uniphier_ld4_sld8_defconfig
@@ -6,7 +6,6 @@  CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_ARCH_UNIPHIER_LD4_SLD8=y
 CONFIG_MICRO_SUPPORT_CARD=y
-# CONFIG_MMC is not set
 CONFIG_SYS_TEXT_BASE=0x84000000
 CONFIG_DEFAULT_DEVICE_TREE="uniphier-ld4-ref"
 CONFIG_SPL_NOR_SUPPORT=y
diff --git a/configs/uniphier_pro4_defconfig b/configs/uniphier_pro4_defconfig
index f45485b..f71ef56 100644
--- a/configs/uniphier_pro4_defconfig
+++ b/configs/uniphier_pro4_defconfig
@@ -5,7 +5,6 @@  CONFIG_SPL_MMC_SUPPORT=y
 CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_MICRO_SUPPORT_CARD=y
-# CONFIG_MMC is not set
 CONFIG_SYS_TEXT_BASE=0x84000000
 CONFIG_DEFAULT_DEVICE_TREE="uniphier-pro4-ref"
 CONFIG_SPL_NOR_SUPPORT=y
diff --git a/configs/uniphier_pxs2_ld6b_defconfig b/configs/uniphier_pxs2_ld6b_defconfig
index f17b22f..ba3867f 100644
--- a/configs/uniphier_pxs2_ld6b_defconfig
+++ b/configs/uniphier_pxs2_ld6b_defconfig
@@ -6,7 +6,6 @@  CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_ARCH_UNIPHIER_PRO5_PXS2_LD6B=y
 CONFIG_MICRO_SUPPORT_CARD=y
-# CONFIG_MMC is not set
 CONFIG_SYS_TEXT_BASE=0x84000000
 CONFIG_DEFAULT_DEVICE_TREE="uniphier-pxs2-vodka"
 CONFIG_SPL_NOR_SUPPORT=y
diff --git a/configs/uniphier_sld3_defconfig b/configs/uniphier_sld3_defconfig
index 70e3193..3568f7a 100644
--- a/configs/uniphier_sld3_defconfig
+++ b/configs/uniphier_sld3_defconfig
@@ -6,7 +6,6 @@  CONFIG_SPL_NAND_SUPPORT=y
 CONFIG_SPL_SERIAL_SUPPORT=y
 CONFIG_ARCH_UNIPHIER_SLD3=y
 CONFIG_MICRO_SUPPORT_CARD=y
-# CONFIG_MMC is not set
 CONFIG_SYS_TEXT_BASE=0x84000000
 CONFIG_DEFAULT_DEVICE_TREE="uniphier-sld3-ref"
 CONFIG_SPL_NOR_SUPPORT=y
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index 9bd511c..f3e150e 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -30,6 +30,8 @@  config DM_MMC_OPS
 	  option will be removed as soon as all DM_MMC drivers use it, as it
 	  will the only supported behaviour.
 
+if MMC
+
 config SPL_MMC_TINY
 	bool "Tiny MMC framework in SPL"
 	help
@@ -114,4 +116,6 @@  config SANDBOX_MMC
 	  improves build coverage for sandbox and makes it easier to detect
 	  MMC build errors with sandbox.
 
+endif
+
 endmenu