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

Miquel Raynal miquel.raynal at bootlin.com
Wed Dec 5 07:43:53 UTC 2018


Hi Vignesh,

Thanks for reviewing!

Vignesh R <vigneshr at ti.com> wrote on Wed, 5 Dec 2018 11:28:29 +0530:

> Hi Miquel,
> 
> On 05/12/18 5:26 AM, Miquel Raynal wrote:
> > MTD must be enabled when there is a SPI NOR flash using the
> > SPI_FLASH_MTD config entry.
> >   
> 
> I suggest to add Kconfig dependency b/w SPI_FLASH_MTD and MTD. Something like:
> 
> diff --git a/drivers/mtd/spi/Kconfig b/drivers/mtd/spi/Kconfig
> index d735884b48db..6405fd1452d2 100644
> --- a/drivers/mtd/spi/Kconfig
> +++ b/drivers/mtd/spi/Kconfig
> @@ -144,7 +144,7 @@ config SPI_FLASH_DATAFLASH
>  
>  config SPI_FLASH_MTD
>         bool "SPI Flash MTD support"
> -       depends on SPI_FLASH
> +       depends on SPI_FLASH && MTD
>         help
>            Enable the MTD support for spi flash layer, this adapter is for
>           translating mtd_read/mtd_write commands into spi_flash_read/write

I do agree; I could add another patch for this and also do another
check on defconfigs having SPI_FLASH_MTD and missing MTD.

Thanks,
Miquèl


More information about the U-Boot mailing list