From patchwork Sun Nov 18 20:07:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 999540 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42yjgt6nLSz9s5c for ; Mon, 19 Nov 2018 07:07:54 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 2027AC2243D; Sun, 18 Nov 2018 20:07:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B3409C21E0D; Sun, 18 Nov 2018 20:07:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 046ADC21F45; Sun, 18 Nov 2018 20:07:46 +0000 (UTC) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 4D336C21E0D for ; Sun, 18 Nov 2018 20:07:46 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id 09F7420CFD; Sun, 18 Nov 2018 21:07:46 +0100 (CET) Received: from xps13.enseeiht.fr (unknown [91.224.148.103]) by mail.bootlin.com (Postfix) with ESMTPSA id A3F8B206D8; Sun, 18 Nov 2018 21:07:35 +0100 (CET) From: Miquel Raynal To: Jagan Teki , Date: Sun, 18 Nov 2018 21:07:31 +0100 Message-Id: <20181118200732.10915-2-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181118200732.10915-1-miquel.raynal@bootlin.com> References: <20181118200732.10915-1-miquel.raynal@bootlin.com> Cc: Boris Brezillon , Miquel Raynal Subject: [U-Boot] [PATCH 1/2] mtd: nand: let the raw NAND devices be compiled upon selection X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Today way is to rely on CMD_NAND to be selected and from the root Makefile compile what is in drivers/mtd/nand/raw. While this will work most of the time with decent configurations, it is better to also compile this subsystem upon simple request in the configuration. Otherwise, a user not selecting CMD_NAND but selecting NAND and any of the controller drivers will not see their build. Fix this weird situation by adding a single line in the nand/ directory Kconfig file. Signed-off-by: Miquel Raynal --- drivers/mtd/nand/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index a358bc680e..2c33447995 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -2,4 +2,5 @@ nandcore-objs := core.o bbt.o obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o +obj-$(CONFIG_NAND) += raw/ obj-$(CONFIG_MTD_SPI_NAND) += spi/ From patchwork Sun Nov 18 20:07:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 999542 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 42yjjg0JVGz9s3C for ; Mon, 19 Nov 2018 07:09:26 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id A1365C22430; Sun, 18 Nov 2018 20:08:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1DEBFC22433; Sun, 18 Nov 2018 20:07:50 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9157DC21E0D; Sun, 18 Nov 2018 20:07:47 +0000 (UTC) Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 554C7C21D56 for ; Sun, 18 Nov 2018 20:07:47 +0000 (UTC) Received: by mail.bootlin.com (Postfix, from userid 110) id 132C6206D8; Sun, 18 Nov 2018 21:07:47 +0100 (CET) Received: from xps13.enseeiht.fr (unknown [91.224.148.103]) by mail.bootlin.com (Postfix) with ESMTPSA id A82F1207B0; Sun, 18 Nov 2018 21:07:36 +0100 (CET) From: Miquel Raynal To: Jagan Teki , Date: Sun, 18 Nov 2018 21:07:32 +0100 Message-Id: <20181118200732.10915-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181118200732.10915-1-miquel.raynal@bootlin.com> References: <20181118200732.10915-1-miquel.raynal@bootlin.com> Cc: Boris Brezillon , Miquel Raynal Subject: [U-Boot] [PATCH 2/2] Makefile: move MTD-related lines in coherent Makefiles X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" A move has been started to move Makefile definitions out of the main root file and instead move these lines in their respective directory. This change does not change any logic already in place, it just moves lines to make the reading easier. Signed-off-by: Miquel Raynal --- Makefile | 5 ----- drivers/Makefile | 1 + drivers/mtd/Makefile | 3 +++ drivers/mtd/nand/Makefile | 4 +++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 552687db53..435d0257dd 100644 --- a/Makefile +++ b/Makefile @@ -688,11 +688,6 @@ libs-y += drivers/ libs-y += drivers/dma/ libs-y += drivers/gpio/ libs-y += drivers/i2c/ -libs-y += drivers/mtd/ -libs-$(CONFIG_CMD_NAND) += drivers/mtd/nand/raw/ -libs-y += drivers/mtd/onenand/ -libs-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/ -libs-y += drivers/mtd/spi/ libs-y += drivers/net/ libs-y += drivers/net/phy/ libs-y += drivers/pci/ diff --git a/drivers/Makefile b/drivers/Makefile index 4453c62ad3..e407c529c4 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -99,6 +99,7 @@ obj-$(CONFIG_QE) += qe/ obj-$(CONFIG_U_QE) += qe/ obj-y += mailbox/ obj-y += memory/ +obj-y += mtd/ obj-y += pwm/ obj-y += reset/ obj-y += input/ diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index 22ceda93c0..f51ec473ea 100644 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -20,3 +20,6 @@ obj-$(CONFIG_STM32_FLASH) += stm32_flash.o obj-$(CONFIG_RENESAS_RPC_HF) += renesas_rpc_hf.o obj-y += nand/ +obj-y += onenand/ +obj-y += spi/ +obj-$(CONFIG_CMD_UBI) += ubi/ diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index 2c33447995..99ca69ef95 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -2,5 +2,7 @@ nandcore-objs := core.o bbt.o obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o -obj-$(CONFIG_NAND) += raw/ +ifneq (,$(findstring y,$(CONFIG_CMD_NAND)$(CONFIG_CMD_MTD))) +obj-y += raw/ +endif obj-$(CONFIG_MTD_SPI_NAND) += spi/