]> git.sur5r.net Git - u-boot/commitdiff
drivers/mtd: descend into sub directories only when it is necessary
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Thu, 28 Nov 2013 03:22:17 +0000 (12:22 +0900)
committerTom Rini <trini@ti.com>
Fri, 13 Dec 2013 14:18:44 +0000 (09:18 -0500)
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Makefile
drivers/mtd/nand/Makefile
drivers/mtd/ubi/Makefile
spl/Makefile

index 468b1bc605e8dc455e8039c3acd45f78aa2aa839..b251bf64974811d26f46b1e8aa707d9318233ac6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -249,9 +249,9 @@ LIBS-y += drivers/i2c/
 LIBS-y += drivers/input/
 LIBS-y += drivers/mmc/
 LIBS-y += drivers/mtd/
-LIBS-y += drivers/mtd/nand/
+LIBS-$(CONFIG_CMD_NAND) += drivers/mtd/nand/
 LIBS-y += drivers/mtd/onenand/
-LIBS-y += drivers/mtd/ubi/
+LIBS-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/
 LIBS-y += drivers/mtd/spi/
 LIBS-y += drivers/net/
 LIBS-y += drivers/net/phy/
index e145cd18421ad764f661c174ea1b70357f2b4d4e..02b149caccaa9793ff00a85d8d1299037fa25101 100644 (file)
@@ -5,8 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifdef CONFIG_CMD_NAND
-
 ifdef CONFIG_SPL_BUILD
 
 ifdef CONFIG_SPL_NAND_DRIVERS
@@ -69,4 +67,3 @@ obj-$(CONFIG_NAND_FSL_IFC) += fsl_ifc_spl.o
 obj-$(CONFIG_NAND_MXC) += mxc_nand_spl.o
 
 endif # drivers
-endif # nand
index e1f3a241a260f3b818dd2216459936cb09fbdd52..56c2823477da3388d455b23b18b7253a29f776be 100644 (file)
@@ -5,9 +5,6 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-ifdef CONFIG_CMD_UBI
 obj-y += build.o vtbl.o vmt.o upd.o kapi.o eba.o io.o wl.o scan.o crc32.o
-
 obj-y += misc.o
 obj-y += debug.o
-endif
index 9b862be9a5f47e53e1d45de175ad79141e215571..ec0983170a097af02bfdd770df07a4176da308ba 100644 (file)
@@ -78,7 +78,7 @@ LIBS-y += fs/
 LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/
 LIBS-$(CONFIG_SPL_POWER_SUPPORT) += drivers/power/ \
        drivers/power/pmic/
-LIBS-$(CONFIG_SPL_NAND_SUPPORT) += drivers/mtd/nand/
+LIBS-$(if $(CONFIG_CMD_NAND),$(CONFIG_SPL_NAND_SUPPORT)) += drivers/mtd/nand/
 LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/
 LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/
 LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/