From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Thu, 29 Nov 2018 09:06:32 +0100 Subject: [U-Boot] [PATCH v2 07/24] mtd: ensure MTD is compiled when there is a SPI NOR flash In-Reply-To: <20181129005246.0623a04b@bbrezillon> References: <20181128230800.13292-1-miquel.raynal@bootlin.com> <20181128230800.13292-8-miquel.raynal@bootlin.com> <20181129005246.0623a04b@bbrezillon> Message-ID: <20181129090632.66863fa4@xps13> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi Boris, Boris Brezillon wrote on Thu, 29 Nov 2018 00:52:46 +0100: > On Thu, 29 Nov 2018 00:07:43 +0100 > Miquel Raynal wrote: >=20 > > MTD must be enabled when there is a SPI NOR flash. =20 >=20 > Not sure this is required, as the SF layer is mostly independent from > the MTD layer, except for the sf_mtd.c portion. It's probably safer to > only enable CONFIG_MTD when CONFIG_SPI_FLASH_MTD is enabled. >=20 > > Also enable it when CONFIG_CMD_SF is selected to do not > > break any build during later cleanup. > >=20 > > Signed-off-by: Miquel Raynal =20 >=20 The SPI NOR flash subsystem is a bit specific on this regard but I suppose this dependency, soon or later, will be required anyway. Also, even if the commit title tells MTD dependency is only added when there is a SPI NOR flash, this is not 100% accurate as most of the time there is also a NAND or a NOR chip that is declared. Anyway, it is probably best to just depend on CONFIG_SPI_FLASH_MTD for now, even if this naming does make a lot of sense to me. Thanks, Miqu=C3=A8l