[U-Boot] [PATCH v3 16/28] configs: move CONFIG_MTD in defconfigs when set in arch includes
Miquel Raynal
miquel.raynal at bootlin.com
Wed Dec 5 11:25:07 UTC 2018
Hi Boris,
Boris Brezillon <boris.brezillon at bootlin.com> wrote on Wed, 5 Dec 2018
11:17:28 +0100:
> On Wed, 5 Dec 2018 00:57:02 +0100
> Miquel Raynal <miquel.raynal at bootlin.com> wrote:
>
> > Let's be consistent and always declare CONFIG_MTD from the defconfig
> > file when needed.
> >
> > Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
>
> Reviewed-by: Boris Brezillon <boris.brezillon at bootlin.com>
>
> One comment below.
>
> > ---
> > configs/socfpga_stratix10_defconfig | 1 +
> > configs/turris_mox_defconfig | 1 +
> > include/configs/mvebu_armada-37xx.h | 1 -
> > include/configs/socfpga_stratix10_socdk.h | 1 -
> > 4 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/configs/socfpga_stratix10_defconfig b/configs/socfpga_stratix10_defconfig
> > index 5f3d733a8b..292dbd6973 100644
> > --- a/configs/socfpga_stratix10_defconfig
> > +++ b/configs/socfpga_stratix10_defconfig
> > @@ -38,6 +38,7 @@ CONFIG_DM_I2C=y
> > CONFIG_SYS_I2C_DW=y
> > CONFIG_DM_MMC=y
> > CONFIG_MMC_DW=y
> > +CONFIG_MTD=y
> > CONFIG_SPI_FLASH=y
> > CONFIG_SPI_FLASH_BAR=y
> > CONFIG_SPI_FLASH_SPANSION=y
> > diff --git a/configs/turris_mox_defconfig b/configs/turris_mox_defconfig
> > index 749ed31acd..13e2af7e1b 100644
> > --- a/configs/turris_mox_defconfig
> > +++ b/configs/turris_mox_defconfig
> > @@ -42,6 +42,7 @@ CONFIG_DM_MMC=y
> > CONFIG_MMC_SDHCI=y
> > CONFIG_MMC_SDHCI_SDMA=y
> > CONFIG_MMC_SDHCI_XENON=y
> > +CONFIG_MTD=y
> > CONFIG_SPI_FLASH=y
> > CONFIG_SPI_FLASH_MACRONIX=y
> > CONFIG_SPI_FLASH_SPANSION=y
> > diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h
> > index f93ab0f830..640267c9c2 100644
> > --- a/include/configs/mvebu_armada-37xx.h
> > +++ b/include/configs/mvebu_armada-37xx.h
> > @@ -64,7 +64,6 @@
> > #define CONFIG_SF_DEFAULT_SPEED 1000000
> > #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0
> > #define CONFIG_ENV_SPI_MODE CONFIG_SF_DEFAULT_MODE
> > -#define CONFIG_MTD /* needed for mtdparts commands */
> > #define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
> >
> > /* Environment in SPI NOR flash */
> > diff --git a/include/configs/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h
> > index 22e1dc84a1..967784e379 100644
> > --- a/include/configs/socfpga_stratix10_socdk.h
> > +++ b/include/configs/socfpga_stratix10_socdk.h
> > @@ -76,7 +76,6 @@
> > #endif /* CONFIG_ENV_IS_IN_SPI_FLASH */
> >
> > #ifndef CONFIG_SPL_BUILD
> > -#define CONFIG_MTD
> > #define CONFIG_MTD_PARTITIONS
>
> Do you get rid of CONFIG_MTD_PARTITIONS at some point?
Not anymore. I know it would be preferable to push all MTD
configurations in defconfigs but precisely in this case the definition
is enclosed in a "#ifndef CONFIG_SPL_BUILD" condition, which makes the
move to defconfig inconsistent. This is the reason why I decided to
keep this definition in header files for now (another one in Armada
37xx header).
>
> > #define MTDIDS_DEFAULT "nor0=ff705000.spi.0"
> > #endif /* CONFIG_SPL_BUILD */
>
Thanks,
Miquèl
More information about the U-Boot
mailing list