Skip to content

Commit

Permalink
mmc: make MMC driver entries dependent on MMC
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Reviewed-by: Jaehoon Chung <[email protected]>
  • Loading branch information
masahir0y authored and trini committed Dec 29, 2016
1 parent c272699 commit e298c46
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion configs/sama5d2_xplained_mmc_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion configs/sama5d2_xplained_spiflash_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion configs/uniphier_ld20_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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_ARCH_FIXUP_FDT_MEMORY is not set
Expand Down
1 change: 0 additions & 1 deletion configs/uniphier_ld4_sld8_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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_ARCH_FIXUP_FDT_MEMORY is not set
Expand Down
1 change: 0 additions & 1 deletion configs/uniphier_pro4_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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_ARCH_FIXUP_FDT_MEMORY is not set
Expand Down
1 change: 0 additions & 1 deletion configs/uniphier_pxs2_ld6b_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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_ARCH_FIXUP_FDT_MEMORY is not set
Expand Down
1 change: 0 additions & 1 deletion configs/uniphier_sld3_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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_ARCH_FIXUP_FDT_MEMORY is not set
Expand Down
4 changes: 4 additions & 0 deletions drivers/mmc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit e298c46

Please sign in to comment.