]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
mmc: descend into drivers/mmc only when CONFIG_MMC is enabled
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 9 May 2017 11:31:40 +0000 (20:31 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 15 May 2017 09:28:23 +0000 (18:28 +0900)
This simplifies makefiles.  Also, arrange the order of objects in
drivers/mmc/Makefile so that the framework objects are listed before
drivers.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Makefile
common/spl/Kconfig
drivers/Makefile
drivers/mmc/Makefile

index 57fa6ec359ad05dd16352e9e45b3ccae14d1a6b6..bcab72697f83fe86126af0eb6f43e5a0b765ef6d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -653,7 +653,6 @@ libs-y += drivers/
 libs-y += drivers/dma/
 libs-y += drivers/gpio/
 libs-y += drivers/i2c/
-libs-y += drivers/mmc/
 libs-y += drivers/mtd/
 libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/
 libs-y += drivers/mtd/onenand/
index 0d56f10d9fd718b0c364d29a24251a59b70944df..e82a87947b6f54196cf15790f8659973fbd1ecbc 100644 (file)
@@ -729,7 +729,7 @@ config TPL_MPC8XXX_INIT_DDR_SUPPORT
 
 config TPL_MMC_SUPPORT
        bool "Support MMC"
-       depends on TPL
+       depends on TPL && MMC
        help
          Enable support for MMC within TPL. See SPL_MMC_SUPPORT for details.
 
index 691642023d9dab095750111407d7dc26ff747e0d..64c39d3a3ef9e7d73e659da18924548fc7e3f2ea 100644 (file)
@@ -76,6 +76,7 @@ obj-y += firmware/
 obj-$(CONFIG_FPGA) += fpga/
 obj-y += hwmon/
 obj-y += misc/
+obj-$(CONFIG_MMC) += mmc/
 obj-y += pcmcia/
 obj-y += dfu/
 obj-$(CONFIG_X86) += pch/
index 75a7cd328967b275858e433d6fd42eaa49578e11..a07864989944727a15b7c05c207df9243e0deb8e 100644 (file)
@@ -5,17 +5,24 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifdef CONFIG_DM_MMC
-obj-$(CONFIG_MMC) += mmc-uclass.o
-endif
+obj-y += mmc.o
+obj-$(CONFIG_DM_MMC) += mmc-uclass.o
 
 ifndef CONFIG_BLK
-obj-$(CONFIG_MMC) += mmc_legacy.o
+obj-y += mmc_legacy.o
+endif
+
+obj-$(CONFIG_SUPPORT_EMMC_BOOT) += mmc_boot.o
+
+ifdef CONFIG_SPL_BUILD
+obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o
+obj-$(CONFIG_SPL_SAVEENV) += mmc_write.o
+else
+obj-y += mmc_write.o
 endif
 
 obj-$(CONFIG_ARM_PL180_MMCI) += arm_pl180_mmci.o
 obj-$(CONFIG_MMC_DAVINCI)              += davinci_mmc.o
-
 obj-$(CONFIG_MMC_DW)                   += dw_mmc.o
 obj-$(CONFIG_MMC_DW_EXYNOS)            += exynos_dw_mmc.o
 obj-$(CONFIG_MMC_DW_K3)                        += hi6220_dw_mmc.o
@@ -23,10 +30,6 @@ obj-$(CONFIG_MMC_DW_ROCKCHIP)                += rockchip_dw_mmc.o
 obj-$(CONFIG_MMC_DW_SOCFPGA)           += socfpga_dw_mmc.o
 obj-$(CONFIG_FSL_ESDHC) += fsl_esdhc.o
 obj-$(CONFIG_FTSDC010) += ftsdc010_mci.o
-obj-$(CONFIG_MMC) += mmc.o
-ifdef CONFIG_SUPPORT_EMMC_BOOT
-obj-$(CONFIG_MMC) += mmc_boot.o
-endif
 obj-$(CONFIG_GENERIC_ATMEL_MCI) += gen_atmel_mci.o
 obj-$(CONFIG_MMC_MESON_GX) += meson_gx_mmc.o
 obj-$(CONFIG_MMC_SPI) += mmc_spi.o
@@ -42,13 +45,6 @@ obj-$(CONFIG_MMC_SANDBOX)            += sandbox_mmc.o
 obj-$(CONFIG_SH_MMCIF) += sh_mmcif.o
 obj-$(CONFIG_SH_SDHI) += sh_sdhi.o
 
-ifdef CONFIG_SPL_BUILD
-obj-$(CONFIG_SPL_MMC_BOOT) += fsl_esdhc_spl.o
-obj-$(CONFIG_SPL_SAVEENV) += mmc_write.o
-else
-obj-$(CONFIG_MMC) += mmc_write.o
-endif
-
 # SDHCI
 obj-$(CONFIG_MMC_SDHCI)                        += sdhci.o
 obj-$(CONFIG_MMC_SDHCI_ATMEL)          += atmel_sdhci.o