[U-Boot] [PATCH v2 07/24] mtd: ensure MTD is compiled when there is a SPI NOR flash

Miquel Raynal miquel.raynal at bootlin.com
Thu Nov 29 08:06:32 UTC 2018


Hi Boris,

Boris Brezillon <boris.brezillon at bootlin.com> wrote on Thu, 29 Nov 2018
00:52:46 +0100:

> On Thu, 29 Nov 2018 00:07:43 +0100
> Miquel Raynal <miquel.raynal at bootlin.com> wrote:
> 
> > MTD must be enabled when there is a SPI NOR flash.  
> 
> 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.
> 
> > Also enable it when CONFIG_CMD_SF is selected to do not
> > break any build during later cleanup.
> > 
> > Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>  
> 

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èl


More information about the U-Boot mailing list