diff mbox

[U-Boot] drivers/mtd: descend into sub directories only when it is necessary

Message ID 1385608937-30665-1-git-send-email-yamada.m@jp.panasonic.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada Nov. 28, 2013, 3:22 a.m. UTC
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
 Makefile                  | 4 ++--
 drivers/mtd/nand/Makefile | 3 ---
 drivers/mtd/ubi/Makefile  | 3 ---
 spl/Makefile              | 2 +-
 4 files changed, 3 insertions(+), 9 deletions(-)

Comments

Tom Rini Dec. 16, 2013, 2:14 p.m. UTC | #1
On Thu, Nov 28, 2013 at 12:22:17PM +0900, Masahiro Yamada wrote:

> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
> 
> ---
> Makefile                  | 4 ++--
>  drivers/mtd/nand/Makefile | 3 ---
>  drivers/mtd/ubi/Makefile  | 3 ---
>  spl/Makefile              | 2 +-
>  4 files changed, 3 insertions(+), 9 deletions(-)

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 4db925d..3443bb9 100644
--- a/Makefile
+++ b/Makefile
@@ -245,9 +245,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/
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index e145cd1..02b149c 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -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
diff --git a/drivers/mtd/ubi/Makefile b/drivers/mtd/ubi/Makefile
index e1f3a24..56c2823 100644
--- a/drivers/mtd/ubi/Makefile
+++ b/drivers/mtd/ubi/Makefile
@@ -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
diff --git a/spl/Makefile b/spl/Makefile
index 7a0400b..5d8f232 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -70,7 +70,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/