Skip to contentSkip to conversation

MTD defconfigs/Kconfigs/Makefiles heavy cleanup

PATCH Superseded Miquel Raynal 4 participants 37 messages Dec 9, 2018 – Apr 12, 2019 Page 2 of 2

Subsystems (16)

v4 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
author maintainer
#9 lore raw

PATCH v4 9/25 mtd: ensure UBI is compiled when CMD_UBI is selected

In reply to Miquel Raynal

UBI must be enabled when CMD_UBI is used, this is mandatory and will later be reflected thanks to a "depends on" in Kconfig. But first, defconfigs needs to be fixed.

---
 configs/am335x_baltos_defconfig                    | 1 +
 configs/am3517_evm_defconfig                       | 1 +
 configs/apf27_defconfig                            | 1 +
 configs/apx4devkit_defconfig                       | 1 +
 configs/at91sam9x5ek_dataflash_defconfig           | 1 +
 configs/at91sam9x5ek_mmc_defconfig                 | 1 +
 configs/at91sam9x5ek_nandflash_defconfig           | 1 +
 configs/at91sam9x5ek_spiflash_defconfig            | 1 +
 configs/bk4r1_defconfig                            | 1 +
 configs/dns325_defconfig                           | 1 +
 configs/dockstar_defconfig                         | 1 +
 configs/ds414_defconfig                            | 1 +
 configs/ea20_defconfig                             | 1 +
 configs/eco5pk_defconfig                           | 1 +
 configs/ethernut5_defconfig                        | 1 +
 configs/gardena-smart-gateway-mt7688-ram_defconfig | 1 +
 configs/gardena-smart-gateway-mt7688_defconfig     | 1 +
 configs/goflexhome_defconfig                       | 1 +
 configs/guruplug_defconfig                         | 1 +
 configs/gwventana_emmc_defconfig                   | 1 +
 configs/gwventana_gw5904_defconfig                 | 1 +
 configs/gwventana_nand_defconfig                   | 1 +
 configs/ib62x0_defconfig                           | 1 +
 configs/iconnect_defconfig                         | 1 +
 configs/igep0032_defconfig                         | 1 +
 configs/imx6dl_icore_nand_defconfig                | 1 +
 configs/imx6q_icore_nand_defconfig                 | 1 +
 configs/imx6q_logic_defconfig                      | 1 +
 configs/imx6qdl_icore_mmc_defconfig                | 1 +
 configs/imx6qdl_icore_nand_defconfig               | 1 +
 configs/imx6ul_geam_nand_defconfig                 | 1 +
 configs/imx6ul_isiot_nand_defconfig                | 1 +
 configs/ipam390_defconfig                          | 1 +
 configs/k2e_evm_defconfig                          | 1 +
 configs/k2e_hs_evm_defconfig                       | 1 +
 configs/k2g_evm_defconfig                          | 1 +
 configs/k2g_hs_evm_defconfig                       | 1 +
 configs/k2hk_evm_defconfig                         | 1 +
 configs/k2hk_hs_evm_defconfig                      | 1 +
 configs/k2l_evm_defconfig                          | 1 +
 configs/k2l_hs_evm_defconfig                       | 1 +
 configs/km_kirkwood_128m16_defconfig               | 1 +
 configs/km_kirkwood_defconfig                      | 1 +
 configs/km_kirkwood_pci_defconfig                  | 1 +
 configs/kmcoge4_defconfig                          | 2 ++
 configs/kmcoge5ne_defconfig                        | 1 +
 configs/kmcoge5un_defconfig                        | 1 +
 configs/kmeter1_defconfig                          | 1 +
 configs/kmlion1_defconfig                          | 2 ++
 configs/kmnusa_defconfig                           | 1 +
 configs/kmopti2_defconfig                          | 1 +
 configs/kmsugp1_defconfig                          | 1 +
 configs/kmsupx5_defconfig                          | 1 +
 configs/kmsuv31_defconfig                          | 1 +
 configs/kmtegr1_defconfig                          | 1 +
 configs/kmtepr2_defconfig                          | 1 +
 configs/kmvect1_defconfig                          | 1 +
 configs/m53menlo_defconfig                         | 1 +
 configs/mcx_defconfig                              | 1 +
 configs/mgcoge3un_defconfig                        | 1 +
 configs/mt_ventoux_defconfig                       | 1 +
 configs/mx28evk_auart_console_defconfig            | 1 +
 configs/mx28evk_defconfig                          | 1 +
 configs/mx28evk_nand_defconfig                     | 1 +
 configs/mx28evk_spi_defconfig                      | 1 +
 configs/nas220_defconfig                           | 1 +
 configs/nsa310s_defconfig                          | 1 +
 configs/omap35_logic_defconfig                     | 1 +
 configs/omap35_logic_somlv_defconfig               | 1 +
 configs/omap3_beagle_defconfig                     | 1 +
 configs/omap3_evm_defconfig                        | 1 +
 configs/omap3_logic_defconfig                      | 1 +
 configs/omap3_logic_somlv_defconfig                | 1 +
 configs/omap3_overo_defconfig                      | 1 +
 configs/omap3_pandora_defconfig                    | 1 +
 configs/omapl138_lcdk_defconfig                    | 1 +
 configs/openrd_base_defconfig                      | 1 +
 configs/openrd_client_defconfig                    | 1 +
 configs/openrd_ultimate_defconfig                  | 1 +
 configs/pcm052_defconfig                           | 1 +
 configs/pcm058_defconfig                           | 1 +
 configs/pfla02_defconfig                           | 1 +
 configs/platinum_picon_defconfig                   | 1 +
 configs/platinum_titanium_defconfig                | 1 +
 configs/pogo_e02_defconfig                         | 1 +
 configs/portl2_defconfig                           | 1 +
 configs/sama5d3_xplained_mmc_defconfig             | 1 +
 configs/sama5d3_xplained_nandflash_defconfig       | 1 +
 configs/sheevaplug_defconfig                       | 1 +
 configs/socfpga_arria5_defconfig                   | 1 +
 configs/socfpga_cyclone5_defconfig                 | 1 +
 configs/socfpga_de0_nano_soc_defconfig             | 1 +
 configs/socfpga_is1_defconfig                      | 1 +
 configs/socfpga_sockit_defconfig                   | 1 +
 configs/socfpga_socrates_defconfig                 | 1 +
 configs/socfpga_sr1500_defconfig                   | 1 +
 configs/suvd3_defconfig                            | 1 +
 configs/titanium_defconfig                         | 1 +
 configs/tricorder_defconfig                        | 1 +
 configs/tricorder_flash_defconfig                  | 1 +
 configs/tuge1_defconfig                            | 1 +
 configs/tuxx1_defconfig                            | 1 +
 configs/twister_defconfig                          | 1 +
 configs/uniphier_ld4_sld8_defconfig                | 1 +
 configs/uniphier_v7_defconfig                      | 1 +
 configs/uniphier_v8_defconfig                      | 1 +
 configs/vct_platinum_onenand_defconfig             | 1 +
 configs/vct_platinum_onenand_small_defconfig       | 1 +
 configs/vct_platinumavc_onenand_defconfig          | 1 +
 configs/vct_platinumavc_onenand_small_defconfig    | 1 +
 configs/vct_premium_onenand_defconfig              | 1 +
 configs/vct_premium_onenand_small_defconfig        | 1 +
 configs/vf610twr_defconfig                         | 1 +
 configs/vf610twr_nand_defconfig                    | 1 +
 configs/x600_defconfig                             | 1 +
 include/environment.h                              | 4 ++--
 116 files changed, 119 insertions(+), 2 deletions(-)
configs/am335x_baltos_defconfig +1 -0
index 461de8bd5d..67551c3104 100644
@@ -44,6 +44,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_SYS_OMAP24_I2C_SPEED=1000
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_DRIVER_TI_CPSW=y
configs/am3517_evm_defconfig +1 -0
index 85075c5cb9..a03d8e3b85 100644
@@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_DM_PCA953X=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
configs/apf27_defconfig +1 -0
index 8f8a984b26..34e368efa7 100644
@@ -41,6 +41,7 @@ CONFIG_FPGA_SPARTAN3=y
 CONFIG_MXC_GPIO=y
 CONFIG_MMC_MXC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
configs/apx4devkit_defconfig +1 -0
index 7d308a5e6f..ec420f4af5 100644
@@ -32,6 +32,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_MII=y
configs/at91sam9x5ek_dataflash_defconfig +1 -0
index eef9d7d701..4776ade826 100644
@@ -42,6 +42,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_DM_SPI_FLASH=y
configs/at91sam9x5ek_mmc_defconfig +1 -0
index c9505343ad..8c2e2653e1 100644
@@ -42,6 +42,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_DM_SPI_FLASH=y
configs/at91sam9x5ek_nandflash_defconfig +1 -0
index ed305c8213..8e28d5990b 100644
@@ -42,6 +42,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_DM_SPI_FLASH=y
configs/at91sam9x5ek_spiflash_defconfig +1 -0
index 5a44091e4c..646650b5cd 100644
@@ -42,6 +42,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_DM_SPI_FLASH=y
configs/bk4r1_defconfig +1 -0
index bf2d94394b..7836a9935c 100644
@@ -35,6 +35,7 @@ CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_MTD=y
configs/dns325_defconfig +1 -0
index 5e6b59db0c..f7114bd09d 100644
@@ -29,6 +29,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-dns325"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
configs/dockstar_defconfig +1 -0
index eabd1bd037..8190010bd8 100644
@@ -26,6 +26,7 @@ CONFIG_DEFAULT_DEVICE_TREE="kirkwood-dockstar"
 CONFIG_ENV_IS_IN_NAND=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
configs/ds414_defconfig +1 -0
index fe29ec46b4..5288936aa1 100644
@@ -43,6 +43,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/ea20_defconfig +1 -0
index 0e99b9d348..576d73abda 100644
@@ -35,6 +35,7 @@ CONFIG_DA8XX_GPIO=y
 CONFIG_SYS_I2C_DAVINCI=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_SPI_FLASH=y
configs/eco5pk_defconfig +1 -0
index d5e990383f..8f02056ff1 100644
@@ -31,6 +31,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_OMAP24_I2C_SPEED=400000
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
configs/ethernut5_defconfig +1 -0
index 1b374b4e15..9dd684e8fa 100644
@@ -51,6 +51,7 @@ CONFIG_CLK_AT91=y
 CONFIG_DM_GPIO=y
 CONFIG_AT91_GPIO=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
configs/gardena-smart-gateway-mt7688-ram_defconfig +1 -0
index 7bd23bb1a1..8659cfbccf 100644
@@ -38,6 +38,7 @@ CONFIG_LED=y
 CONFIG_LED_BLINK=y
 CONFIG_LED_GPIO=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_DM_MTD=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
configs/gardena-smart-gateway-mt7688_defconfig +1 -0
index 0ecffe608f..c4ee0dabaf 100644
@@ -41,6 +41,7 @@ CONFIG_LED=y
 CONFIG_LED_BLINK=y
 CONFIG_LED_GPIO=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_DM_MTD=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
configs/goflexhome_defconfig +1 -0
index 2dff9d68eb..e4c1ed4166 100644
@@ -33,6 +33,7 @@ CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
configs/guruplug_defconfig +1 -0
index 95c21d6ea2..70bd7121fe 100644
@@ -33,6 +33,7 @@ CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
configs/gwventana_emmc_defconfig +1 -0
index deb4e11947..a3a4b6b867 100644
@@ -62,6 +62,7 @@ CONFIG_DWC_AHSATA=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_PHYLIB=y
 CONFIG_E1000=y
 CONFIG_MII=y
configs/gwventana_gw5904_defconfig +1 -0
index 240933db97..f30639d425 100644
@@ -62,6 +62,7 @@ CONFIG_DWC_AHSATA=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_PHYLIB=y
 CONFIG_MV88E61XX_SWITCH=y
 CONFIG_MV88E61XX_CPU_PORT=5
configs/gwventana_nand_defconfig +1 -0
index 7bf4b6e0d2..5c581daa8e 100644
@@ -64,6 +64,7 @@ CONFIG_DWC_AHSATA=y
 CONFIG_SUPPORT_EMMC_RPMB=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/ib62x0_defconfig +1 -0
index e846210cb4..28c6885353 100644
@@ -30,6 +30,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
configs/iconnect_defconfig +1 -0
index 62766fd6de..60039f9618 100644
@@ -25,6 +25,7 @@ CONFIG_DEFAULT_DEVICE_TREE="kirkwood-iconnect"
 CONFIG_ENV_IS_IN_NAND=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
configs/igep0032_defconfig +1 -0
index 8a9f8432b9..6b4616df83 100644
@@ -33,6 +33,7 @@ CONFIG_CMD_UBI=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
configs/imx6dl_icore_nand_defconfig +1 -0
index 091cf5ccc3..fffc9d410e 100644
@@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/imx6q_icore_nand_defconfig +1 -0
index 0a60726b1a..562f7ca36a 100644
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/imx6q_logic_defconfig +1 -0
index d507b2a0b7..78b466fd6d 100644
@@ -58,6 +58,7 @@ CONFIG_LED=y
 CONFIG_LED_GPIO=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/imx6qdl_icore_mmc_defconfig +1 -0
index 54eda990e7..b07762b1da 100644
@@ -49,6 +49,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/imx6qdl_icore_nand_defconfig +1 -0
index 0a60726b1a..562f7ca36a 100644
@@ -40,6 +40,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/imx6ul_geam_nand_defconfig +1 -0
index 11e514aa52..1f82974d2f 100644
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/imx6ul_isiot_nand_defconfig +1 -0
index 80460e406a..cb61e46357 100644
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_I2C_MXC=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/ipam390_defconfig +1 -0
index bece70d2d0..0e4db51197 100644
@@ -39,6 +39,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_DA8XX_GPIO=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DRIVER_TI_EMAC=y
configs/k2e_evm_defconfig +1 -0
index e03cf0309b..de77c49767 100644
@@ -39,6 +39,7 @@ CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_TI_AEMIF=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
configs/k2e_hs_evm_defconfig +1 -0
index c13ecc5705..c69378ff99 100644
@@ -32,6 +32,7 @@ CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_TI_AEMIF=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
configs/k2g_evm_defconfig +1 -0
index 5ed7d1656d..dee00ec8d4 100644
@@ -39,6 +39,7 @@ CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
configs/k2g_hs_evm_defconfig +1 -0
index 74b85864ce..b8c395d78d 100644
@@ -32,6 +32,7 @@ CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
configs/k2hk_evm_defconfig +1 -0
index ffc4eb51fb..c602342c53 100644
@@ -39,6 +39,7 @@ CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_TI_AEMIF=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
configs/k2hk_hs_evm_defconfig +1 -0
index a3ad8c8ae2..bc91f2193d 100644
@@ -32,6 +32,7 @@ CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_TI_AEMIF=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
configs/k2l_evm_defconfig +1 -0
index 28cbc963eb..06be026868 100644
@@ -39,6 +39,7 @@ CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_TI_AEMIF=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
configs/k2l_hs_evm_defconfig +1 -0
index 5998f14651..f49bc3fada 100644
@@ -31,6 +31,7 @@ CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_TI_AEMIF=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
configs/km_kirkwood_128m16_defconfig +1 -0
index a0d0fef4e8..f5fb3c9baf 100644
@@ -35,6 +35,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/km_kirkwood_defconfig +1 -0
index 86d2379c5f..5b9539e42d 100644
@@ -35,6 +35,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/km_kirkwood_pci_defconfig +1 -0
index 8494d4ff49..a3c1d73382 100644
@@ -35,6 +35,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmcoge4_defconfig +2 -0
index a3cc06bd43..74d42f7609 100644
@@ -39,6 +39,8 @@ CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xFB000020
 # CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmcoge5ne_defconfig +1 -0
index c8cc69a985..445b561b0a 100644
@@ -33,6 +33,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
configs/kmcoge5un_defconfig +1 -0
index 3f3f2cc7a9..524c225ddd 100644
@@ -35,6 +35,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmeter1_defconfig +1 -0
index 4e5e34c34a..f7697e0ad7 100644
@@ -33,6 +33,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
configs/kmlion1_defconfig +2 -0
index 75e5204ff5..0671ebad26 100644
@@ -39,6 +39,8 @@ CONFIG_BOOTCOUNT_LIMIT=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xFB000020
 # CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmnusa_defconfig +1 -0
index 6e8214a4d8..15ff03d2b0 100644
@@ -35,6 +35,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmopti2_defconfig +1 -0
index 8fe3c09428..1357cd5083 100644
@@ -33,6 +33,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
configs/kmsugp1_defconfig +1 -0
index 3f72be007b..b409a8c6b8 100644
@@ -35,6 +35,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmsupx5_defconfig +1 -0
index cacd9bb4dc..db148d0ce2 100644
@@ -33,6 +33,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
configs/kmsuv31_defconfig +1 -0
index e593ad3a26..28444c2cff 100644
@@ -35,6 +35,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/kmtegr1_defconfig +1 -0
index 3c95e8a767..c084980b71 100644
@@ -34,6 +34,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
 CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
configs/kmtepr2_defconfig +1 -0
index 2a10fc19e7..ea6431d692 100644
@@ -33,6 +33,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
configs/kmvect1_defconfig +1 -0
index 70d0742588..8ec014b466 100644
@@ -34,6 +34,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
configs/m53menlo_defconfig +1 -0
index cbc7aca0a9..c8c5db6756 100644
@@ -46,6 +46,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXC=y
 CONFIG_PHYLIB=y
configs/mcx_defconfig +1 -0
index cbe95d4e17..775264afbf 100644
@@ -37,6 +37,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
configs/mgcoge3un_defconfig +1 -0
index faddfa65a5..1b989aa798 100644
@@ -35,6 +35,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/mt_ventoux_defconfig +1 -0
index 0fd997bbbb..9dcaed02b4 100644
@@ -37,6 +37,7 @@ CONFIG_FPGA_SPARTAN3=y
 CONFIG_SYS_OMAP24_I2C_SPEED=400000
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
configs/mx28evk_auart_console_defconfig +1 -0
index 4946fec5ca..d313507d8f 100644
@@ -41,6 +41,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
configs/mx28evk_defconfig +1 -0
index 3a58656a49..2b4c6568fe 100644
@@ -41,6 +41,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
configs/mx28evk_nand_defconfig +1 -0
index 0789af6e7d..ea506054a1 100644
@@ -40,6 +40,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
configs/mx28evk_spi_defconfig +1 -0
index 5b34a988a3..137e1c8243 100644
@@ -40,6 +40,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_MMC_MXS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_SPI_FLASH=y
configs/nas220_defconfig +1 -0
index 5585dfd701..8b568d682a 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-blackarmor-nas220"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
configs/nsa310s_defconfig +1 -0
index cbee88022b..5d3ca20e10 100644
@@ -27,6 +27,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
configs/omap35_logic_defconfig +1 -0
index 9d2cd49094..605b17f4f3 100644
@@ -40,6 +40,7 @@ CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
configs/omap35_logic_somlv_defconfig +1 -0
index d103f14291..982ed560d1 100644
@@ -40,6 +40,7 @@ CONFIG_DM_I2C=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
configs/omap3_beagle_defconfig +1 -0
index 685533cec0..563b57fed4 100644
@@ -54,6 +54,7 @@ CONFIG_LED_STATUS_CMD=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
configs/omap3_evm_defconfig +1 -0
index 1c43772c98..976985aec2 100644
@@ -46,6 +46,7 @@ CONFIG_DM_MMC=y
 # CONFIG_SPL_DM_MMC is not set
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
configs/omap3_logic_defconfig +1 -0
index 66b1bd811b..5a671f060f 100644
@@ -41,6 +41,7 @@ CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_OMAP36XX_PINS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
configs/omap3_logic_somlv_defconfig +1 -0
index 63e076d018..77df467450 100644
@@ -40,6 +40,7 @@ CONFIG_DM_MMC=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MMC_OMAP36XX_PINS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
configs/omap3_overo_defconfig +1 -0
index 39d7ac6374..ba3ef62fb1 100644
@@ -35,6 +35,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
configs/omap3_pandora_defconfig +1 -0
index 2d2a8d2ffd..4fbf864284 100644
@@ -31,6 +31,7 @@ CONFIG_DM=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_DM_SERIAL=y
configs/omapl138_lcdk_defconfig +1 -0
index 0b54822529..e093eebd30 100644
@@ -40,6 +40,7 @@ CONFIG_DM_I2C_COMPAT=y
 CONFIG_SYS_I2C_DAVINCI=y
 CONFIG_DM_MMC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DAVINCI=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
configs/openrd_base_defconfig +1 -0
index 4ceb9e2291..0b296d4466 100644
@@ -32,6 +32,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
configs/openrd_client_defconfig +1 -0
index 8f6e6319b8..6d6e9ca205 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-openrd-client"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
configs/openrd_ultimate_defconfig +1 -0
index d3111ee1f9..39c9807886 100644
@@ -30,6 +30,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-openrd-ultimate"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVSATA_IDE=y
 # CONFIG_MMC_HW_PARTITIONING is not set
configs/pcm052_defconfig +1 -0
index 2cd9e7bee7..64b748b53d 100644
@@ -31,6 +31,7 @@ CONFIG_DM_GPIO=y
 CONFIG_VYBRID_GPIO=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
configs/pcm058_defconfig +1 -0
index c831d1210d..fb450052ad 100644
@@ -43,6 +43,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_DM=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
configs/pfla02_defconfig +1 -0
index d0ae55f2e1..ae9b8969df 100644
@@ -42,6 +42,7 @@ CONFIG_CMD_UBI=y
 CONFIG_DM=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_DM_MTD=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
configs/platinum_picon_defconfig +1 -0
index 5a03eafbf4..540233c748 100644
@@ -47,6 +47,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/platinum_titanium_defconfig +1 -0
index ad912f21cc..d46cfcd347 100644
@@ -47,6 +47,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/pogo_e02_defconfig +1 -0
index fe08911e23..6586a7a063 100644
@@ -25,6 +25,7 @@ CONFIG_DEFAULT_DEVICE_TREE="kirkwood-pogo_e02"
 CONFIG_ENV_IS_IN_NAND=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MVGBE=y
 CONFIG_MII=y
configs/portl2_defconfig +1 -0
index 8fb6ffd43d..3ad4e6197b 100644
@@ -33,6 +33,7 @@ CONFIG_BOOTCOUNT_RAM=y
 CONFIG_BOOTCOUNT_BOOTLIMIT=3
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/sama5d3_xplained_mmc_defconfig +1 -0
index a88fabf6a4..48301a230e 100644
@@ -59,6 +59,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_DM_ETH=y
configs/sama5d3_xplained_nandflash_defconfig +1 -0
index e780722e3b..c16fd19948 100644
@@ -56,6 +56,7 @@ CONFIG_AT91_GPIO=y
 CONFIG_DM_MMC=y
 CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_ATMEL=y
 CONFIG_DM_ETH=y
configs/sheevaplug_defconfig +1 -0
index 7176b3d85d..82bea61fef 100644
@@ -32,6 +32,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="kirkwood-sheevaplug"
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_DM=y
 CONFIG_MVSATA_IDE=y
configs/socfpga_arria5_defconfig +1 -0
index 04cf5d254a..f16debbcff 100644
@@ -50,6 +50,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
configs/socfpga_cyclone5_defconfig +1 -0
index bd8216df59..4a462fb1b0 100644
@@ -50,6 +50,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_MACRONIX=y
configs/socfpga_de0_nano_soc_defconfig +1 -0
index 90850d9cab..d62b6eb0a4 100644
@@ -50,6 +50,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
 CONFIG_DM_ETH=y
configs/socfpga_is1_defconfig +1 -0
index 601b7018b0..9c664c099f 100644
@@ -47,6 +47,7 @@ CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DW=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/socfpga_sockit_defconfig +1 -0
index 2963bae333..2fdd88b216 100644
@@ -50,6 +50,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_MACRONIX=y
configs/socfpga_socrates_defconfig +1 -0
index 6cf12cb272..abc40d431d 100644
@@ -51,6 +51,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_MACRONIX=y
configs/socfpga_sr1500_defconfig +1 -0
index 41d8af06b1..29a88ccfdc 100644
@@ -52,6 +52,7 @@ CONFIG_SYS_I2C_DW=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_DW=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/suvd3_defconfig +1 -0
index 4e1e54060b..f495f11137 100644
@@ -33,6 +33,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
configs/titanium_defconfig +1 -0
index 56d0a6309f..cc38efe1ca 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_MXS=y
 CONFIG_PHYLIB=y
configs/tricorder_defconfig +1 -0
index c7e52e2f64..cad698bba0 100644
@@ -38,6 +38,7 @@ CONFIG_LED_STATUS_CMD=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_CONS_INDEX=3
configs/tricorder_flash_defconfig +1 -0
index a46e1a6d99..13c5797087 100644
@@ -37,6 +37,7 @@ CONFIG_LED_STATUS_CMD=y
 CONFIG_TWL4030_LED=y
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SPL_NAND_SIMPLE=y
 CONFIG_CONS_INDEX=3
configs/tuge1_defconfig +1 -0
index 2d92a98f5f..82437d5c2f 100644
@@ -33,6 +33,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
configs/tuxx1_defconfig +1 -0
index 8b32e0efb4..c2c7a586b7 100644
@@ -33,6 +33,7 @@ CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_FLASH_CFI_MTD=y
configs/twister_defconfig +1 -0
index 82220318a3..041f54e993 100644
@@ -36,6 +36,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_OMAP24_I2C_SPEED=400000
 CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_SPL_NAND_SIMPLE=y
configs/uniphier_ld4_sld8_defconfig +1 -0
index 776f54cc5f..3ed82523a8 100644
@@ -40,6 +40,7 @@ CONFIG_MMC_UNIPHIER=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
configs/uniphier_v7_defconfig +1 -0
index c9c37bf108..46f10f1727 100644
@@ -39,6 +39,7 @@ CONFIG_MMC_UNIPHIER=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
configs/uniphier_v8_defconfig +1 -0
index b781cd8992..239c14965c 100644
@@ -38,6 +38,7 @@ CONFIG_MMC_SDHCI_CADENCE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_CFI=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_DENALI_DT=y
 CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
configs/vct_platinum_onenand_defconfig +1 -0
index 1d3d405d8e..5cb798859c 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_ENV_IS_IN_ONENAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x00000000
 CONFIG_SMC911X_32_BIT=y
configs/vct_platinum_onenand_small_defconfig +1 -0
index 50adb73129..00fc222710 100644
@@ -30,4 +30,5 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_ONENAND=y
 # CONFIG_NET is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NS16550=y
configs/vct_platinumavc_onenand_defconfig +1 -0
index 692fae7036..f9f598b3cb 100644
@@ -21,5 +21,6 @@ CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 CONFIG_ENV_IS_IN_ONENAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NS16550=y
 # CONFIG_REGEX is not set
configs/vct_platinumavc_onenand_small_defconfig +1 -0
index bcf39bc1ed..be06cf5aac 100644
@@ -30,4 +30,5 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_ONENAND=y
 # CONFIG_NET is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NS16550=y
configs/vct_premium_onenand_defconfig +1 -0
index 2e87bdf358..fea07c1916 100644
@@ -24,6 +24,7 @@ CONFIG_CMD_UBI=y
 # CONFIG_CMD_UBIFS is not set
 CONFIG_ENV_IS_IN_ONENAND=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SMC911X=y
 CONFIG_SMC911X_BASE=0x00000000
 CONFIG_SMC911X_32_BIT=y
configs/vct_premium_onenand_small_defconfig +1 -0
index 93fd4299d2..998c5d3ef5 100644
@@ -30,4 +30,5 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_ONENAND=y
 # CONFIG_NET is not set
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NS16550=y
configs/vf610twr_defconfig +1 -0
index c8c46e9c64..fd3d59c492 100644
@@ -34,6 +34,7 @@ CONFIG_DM_GPIO=y
 CONFIG_VYBRID_GPIO=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
configs/vf610twr_nand_defconfig +1 -0
index 5b7037bb9f..42b246d617 100644
@@ -34,6 +34,7 @@ CONFIG_DM_GPIO=y
 CONFIG_VYBRID_GPIO=y
 CONFIG_FSL_ESDHC=y
 CONFIG_MTD=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
configs/x600_defconfig +1 -0
index 3797a443d6..2cc408c83b 100644
@@ -48,6 +48,7 @@ CONFIG_SYS_I2C_DW=y
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_UBI=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_PHY_ADDR_ENABLE=y
 CONFIG_PHY_MICREL=y
include/environment.h +2 -2
index 5e90f157e8..329f8df5d0 100644
@@ -99,8 +99,8 @@ extern unsigned long nand_env_oob_offset;
 # ifndef CONFIG_ENV_SIZE
 #  error "Need to define CONFIG_ENV_SIZE when using CONFIG_ENV_IS_IN_UBI"
 # endif
-# ifndef CONFIG_CMD_UBI
-#  error "Need to define CONFIG_CMD_UBI when using CONFIG_ENV_IS_IN_UBI"
+# ifndef CONFIG_MTD_UBI
+#  error "Need to define CONFIG_MTD_UBI when using CONFIG_ENV_IS_IN_UBI"
 # endif
 #endif /* CONFIG_ENV_IS_IN_UBI */
 
Signature · 1 line
2.19.1
author maintainer
#10 lore raw

PATCH v4 10/25 mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selected

In reply to Miquel Raynal

UBI must be enabled when the environment is in UBI.

---
 configs/CHIP_pro_defconfig | 2 ++
 env/Kconfig                | 2 ++
 2 files changed, 4 insertions(+)
configs/CHIP_pro_defconfig +2 -0
index 7f8bd0f00e..5c2880c960 100644
@@ -8,6 +8,7 @@ CONFIG_NR_DRAM_BANKS=1
 CONFIG_SPL_I2C_SUPPORT=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_MTDPARTS=y
+CONFIG_CMD_UBI=y
 CONFIG_MTDIDS_DEFAULT="nand0=sunxi-nand.0"
 CONFIG_MTDPARTS_DEFAULT="mtdparts=sunxi-nand.0:256k(spl),256k(spl-backup),2m(uboot),2m(uboot-backup),-(UBI)"
 CONFIG_DEFAULT_DEVICE_TREE="sun5i-gr8-chip-pro"
@@ -17,6 +18,7 @@ CONFIG_ENV_UBI_VOLUME="uboot-env"
 # CONFIG_MMC is not set
 CONFIG_MTD=y
 CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_UBI=y
 CONFIG_SYS_NAND_BLOCK_SIZE=0x40000
 CONFIG_SYS_NAND_PAGE_SIZE=0x1000
 CONFIG_SYS_NAND_OOBSIZE=0x100
env/Kconfig +2 -0
index 9011109b47..71a14a0967 100644
@@ -340,6 +340,8 @@ config ENV_IS_IN_SPI_FLASH
 config ENV_IS_IN_UBI
 	bool "Environment in a UBI volume"
 	depends on !CHAIN_OF_TRUST
+	depends on MTD_UBI
+	depends on CMD_UBI
 	help
 	  Define this if you have an UBI volume that you want to use for the
 	  environment.  This has the benefit of wear-leveling the environment
Signature · 1 line
2.19.1
author maintainer
#11 lore raw

PATCH v4 11/25 mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selected

In reply to Miquel Raynal

Raw NAND support must be enabled when the environment is in NAND.

---
 configs/bk4r1_defconfig   | 1 +
 configs/harmony_defconfig | 1 +
 2 files changed, 2 insertions(+)
configs/bk4r1_defconfig +1 -0
index 7836a9935c..1df498bff1 100644
@@ -35,6 +35,7 @@ CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_MTD=y
+CONFIG_MTD_RAW_NAND=y
 CONFIG_MTD_UBI=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_STMICRO=y
configs/harmony_defconfig +1 -0
index d916d9db94..a8cc8fbadc 100644
@@ -30,6 +30,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SPL_DM=y
 CONFIG_MTD=y
 CONFIG_DM_MTD=y
+CONFIG_MTD_RAW_NAND=y
 CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_PCI=y
Signature · 1 line
2.19.1
author maintainer
#12 lore raw

PATCH v4 12/25 mtd: ensure MTD and NOR drivers are compiled with ENV_IS_IN_FLASH

In reply to Miquel Raynal

MTD and NOR flash support must be enabled when the environment is in NOR.

---
 configs/armadillo-800eva_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/armadillo-800eva_defconfig +2 -0
index b1d923c069..72758884b4 100644
@@ -32,6 +32,8 @@ CONFIG_CMD_PING=y
 # CONFIG_CMD_MISC is not set
 CONFIG_ENV_IS_IN_FLASH=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_MTD_NOR_FLASH=y
 CONFIG_SH_ETHER=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_OF_LIBFDT=y
Signature · 1 line
2.19.1
author maintainer
#13 lore raw

PATCH v4 12/25 mtd: ensure MTD and NOR drivers are compiled with ENV_IS_IN_FLASH

Hello,

Miquel Raynal <[email protected]> wrote on Sun, 9 Dec 2018 19:07:34 +0100:

Quoted 13 lines

MTD and NOR flash support must be enabled when the environment is in NOR.

---
 configs/armadillo-800eva_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/armadillo-800eva_defconfig +0 -0
index b1d923c069..72758884b4 100644

configs/armadillo-800eva_defconfig CONFIG_CMD_PING=y · line 39

Quoted 8 lines
configs/armadillo-800eva_defconfig +2 -0
@@ -32,6 +32,8 @@ CONFIG_CMD_PING=y
 # CONFIG_CMD_MISC is not set
 CONFIG_ENV_IS_IN_FLASH=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_MTD_NOR_FLASH=y
 CONFIG_SH_ETHER=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_OF_LIBFDT=y

This change triggered a build failure. This is because, despite declaring an in-flash environment, there was absolutely no MTD driver compiled-in. No driver named after 'flash' or 'nor' or 'mtd' was compiled.

The fix for this issue (the only one reported by Travis for this version of the series) is to just drop this patch. As it has absolutely no dependency and only impacts a single defconfig, I would rather prefer not re-send 24 identical patches in a v5 unless there are comments that I must address.

Travis build for the same series without this patch is there:
https://travis-ci.org/miquelraynal/u-boot/builds/466033792

Thanks,
Miquèl

#14 lore raw

PATCH v4 12/25 mtd: ensure MTD and NOR drivers are compiled with ENV_IS_IN_FLASH

Quoted 32 lines · Miquel Raynal

Hello,

Miquel Raynal <[email protected]> wrote on Sun, 9 Dec 2018 19:07:34 +0100:

Quoted 13 lines

MTD and NOR flash support must be enabled when the environment is in NOR.

---
 configs/armadillo-800eva_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/armadillo-800eva_defconfig +0 -0
index b1d923c069..72758884b4 100644

configs/armadillo-800eva_defconfig CONFIG_CMD_PING=y · line 39

Quoted 8 lines
configs/armadillo-800eva_defconfig +2 -0
@@ -32,6 +32,8 @@ CONFIG_CMD_PING=y
 # CONFIG_CMD_MISC is not set
 CONFIG_ENV_IS_IN_FLASH=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_MTD_NOR_FLASH=y
 CONFIG_SH_ETHER=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_OF_LIBFDT=y

This change triggered a build failure. This is because, despite declaring an in-flash environment, there was absolutely no MTD driver compiled-in. No driver named after 'flash' or 'nor' or 'mtd' was compiled.

Quoted 5 lines

The fix for this issue (the only one reported by Travis for this version of the series) is to just drop this patch. As it has absolutely no dependency and only impacts a single defconfig, I would rather prefer not re-send 24 identical patches in a v5 unless there are comments that I must address.

Thanks. Do you have a patchwork account? If so you should be able to manage the status of your own at least and marking it as "Rejected" or "Not Applicable" or anything like that will mean it won't be picked up by accident. If not, I'll get to it soon.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181210/e8cd7219/attachment.sig>
author maintainer
#15 lore raw

PATCH v4 12/25 mtd: ensure MTD and NOR drivers are compiled with ENV_IS_IN_FLASH

Hi Tom,

Tom Rini <[email protected]> wrote on Mon, 10 Dec 2018 13:10:11 -0500:

Quoted 39 lines · Miquel Raynal
Quoted 32 lines

Hello,

Miquel Raynal <[email protected]> wrote on Sun, 9 Dec 2018 19:07:34 +0100:

Quoted 13 lines

MTD and NOR flash support must be enabled when the environment is in NOR.

---
 configs/armadillo-800eva_defconfig | 2 ++
 1 file changed, 2 insertions(+)
configs/armadillo-800eva_defconfig +0 -0
index b1d923c069..72758884b4 100644

configs/armadillo-800eva_defconfig CONFIG_CMD_PING=y · line 39

Quoted 8 lines
configs/armadillo-800eva_defconfig +2 -0
@@ -32,6 +32,8 @@ CONFIG_CMD_PING=y
 # CONFIG_CMD_MISC is not set
 CONFIG_ENV_IS_IN_FLASH=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_MTD_NOR_FLASH=y
 CONFIG_SH_ETHER=y
 CONFIG_SCIF_CONSOLE=y
 CONFIG_OF_LIBFDT=y  

This change triggered a build failure. This is because, despite declaring an in-flash environment, there was absolutely no MTD driver compiled-in. No driver named after 'flash' or 'nor' or 'mtd' was compiled.

Quoted 5 lines

The fix for this issue (the only one reported by Travis for this version of the series) is to just drop this patch. As it has absolutely no dependency and only impacts a single defconfig, I would rather prefer not re-send 24 identical patches in a v5 unless there are comments that I must address.

Quoted 5 lines

Thanks. Do you have a patchwork account? If so you should be able to manage the status of your own at least and marking it as "Rejected" or "Not Applicable" or anything like that will mean it won't be picked up by accident. If not, I'll get to it soon.

I do have an account on ozlabs' patchwork. I went there to discard this patch but I saw that someone (probably you) already did it.

Thanks,
Miquèl

author maintainer
#16 lore raw

PATCH v4 13/25 mtd: ensure CMD_NAND is compiled when its options are selected

In reply to Miquel Raynal

In some files, options of CMD_NAND are selected but not the command itself. Fix this inconsistency.

---
 configs/apf27_defconfig                          | 1 +
 configs/aristainetos2_defconfig                  | 1 +
 configs/aristainetos2b_defconfig                 | 1 +
 configs/aristainetos_defconfig                   | 1 +
 configs/bg0900_defconfig                         | 1 +
 configs/bitmain_antminer_s9_defconfig            | 1 +
 configs/bk4r1_defconfig                          | 1 +
 configs/colibri-imx6ull_defconfig                | 1 +
 configs/colibri_imx7_defconfig                   | 1 +
 configs/gwventana_nand_defconfig                 | 1 +
 configs/imx6q_logic_defconfig                    | 1 +
 configs/m53menlo_defconfig                       | 1 +
 configs/mx28evk_auart_console_defconfig          | 1 +
 configs/mx28evk_defconfig                        | 1 +
 configs/mx28evk_nand_defconfig                   | 1 +
 configs/mx28evk_spi_defconfig                    | 1 +
 configs/mx6sabreauto_defconfig                   | 1 +
 configs/mx6sxsabreauto_defconfig                 | 1 +
 configs/pcm052_defconfig                         | 1 +
 configs/pcm058_defconfig                         | 1 +
 configs/platinum_picon_defconfig                 | 1 +
 configs/platinum_titanium_defconfig              | 1 +
 configs/titanium_defconfig                       | 1 +
 configs/vf610twr_defconfig                       | 1 +
 configs/vf610twr_nand_defconfig                  | 1 +
 configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig | 1 +
 configs/zynq_zc770_xm011_defconfig               | 1 +
 configs/zynq_zc770_xm011_x16_defconfig           | 1 +
 28 files changed, 28 insertions(+)
configs/apf27_defconfig +1 -0
index 34e368efa7..0625110b79 100644
@@ -20,6 +20,7 @@ CONFIG_CMD_EEPROM=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_NAND_LOCK_UNLOCK=y
 CONFIG_CMD_DHCP=y
configs/aristainetos2_defconfig +1 -0
index 2b5e7a8b30..3aa6b45f3b 100644
@@ -17,6 +17,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
configs/aristainetos2b_defconfig +1 -0
index 04eb2e336c..a6d0c962da 100644
@@ -17,6 +17,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
configs/aristainetos_defconfig +1 -0
index 6d2ce2c03b..5ebad9770f 100644
@@ -17,6 +17,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
configs/bg0900_defconfig +1 -0
index 91cf7cf829..6d518cacb7 100644
@@ -20,6 +20,7 @@ CONFIG_HUSH_PARSER=y
 CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
configs/bitmain_antminer_s9_defconfig +1 -0
index 5774ad7173..3ed7e6303a 100644
@@ -28,6 +28,7 @@ CONFIG_CMD_FPGA_LOADMK=y
 CONFIG_CMD_FPGA_LOADP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_LOCK_UNLOCK=y
 CONFIG_CMD_PART=y
 # CONFIG_CMD_SETEXPR is not set
configs/bk4r1_defconfig +1 -0
index 1df498bff1..6bfff0ae50 100644
@@ -14,6 +14,7 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_DHCP=y
configs/colibri-imx6ull_defconfig +1 -0
index e16bb5c425..9c718e64af 100644
@@ -27,6 +27,7 @@ CONFIG_CMD_GPT=y
 # CONFIG_RANDOM_UUID is not set
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_NAND_TORTURE=y
 CONFIG_CMD_USB=y
configs/colibri_imx7_defconfig +1 -0
index 59afc811d8..456bc5097b 100644
@@ -25,6 +25,7 @@ CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_NAND_TORTURE=y
 CONFIG_CMD_USB=y
configs/gwventana_nand_defconfig +1 -0
index 5c581daa8e..c2034b6929 100644
@@ -40,6 +40,7 @@ CONFIG_CMD_SPL_WRITE_SIZE=0x20000
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_PCI=y
 CONFIG_CMD_USB=y
configs/imx6q_logic_defconfig +1 -0
index 78b466fd6d..d40eeef33a 100644
@@ -35,6 +35,7 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_USB_SDP=y
configs/m53menlo_defconfig +1 -0
index c8c5db6756..65fa77130c 100644
@@ -27,6 +27,7 @@ CONFIG_CMD_GREPENV=y
 CONFIG_CMD_FUSE=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_DHCP=y
configs/mx28evk_auart_console_defconfig +1 -0
index d313507d8f..f2b711c951 100644
@@ -20,6 +20,7 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
configs/mx28evk_defconfig +1 -0
index 2b4c6568fe..bef6b83479 100644
@@ -20,6 +20,7 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
configs/mx28evk_nand_defconfig +1 -0
index ea506054a1..bad2466785 100644
@@ -19,6 +19,7 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
configs/mx28evk_spi_defconfig +1 -0
index 137e1c8243..8a185a69ef 100644
@@ -19,6 +19,7 @@ CONFIG_CMD_BOOTZ=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
configs/mx6sabreauto_defconfig +1 -0
index ea176c7e6c..d305fd1043 100644
@@ -26,6 +26,7 @@ CONFIG_CMD_DFU=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_PART=y
 CONFIG_CMD_SF=y
configs/mx6sxsabreauto_defconfig +1 -0
index 3d1aa643db..1680da57b2 100644
@@ -12,6 +12,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
configs/pcm052_defconfig +1 -0
index 64b748b53d..d13582e963 100644
@@ -14,6 +14,7 @@ CONFIG_CMD_MEMTEST=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
configs/pcm058_defconfig +1 -0
index fb450052ad..1f92dce4b7 100644
@@ -30,6 +30,7 @@ CONFIG_SPL_YMODEM_SUPPORT=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_CACHE=y
configs/platinum_picon_defconfig +1 -0
index 540233c748..62d8b47a65 100644
@@ -27,6 +27,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
configs/platinum_titanium_defconfig +1 -0
index d46cfcd347..6f11cc60a6 100644
@@ -27,6 +27,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
configs/titanium_defconfig +1 -0
index cc38efe1ca..3dc9cdc2c4 100644
@@ -15,6 +15,7 @@ CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
configs/vf610twr_defconfig +1 -0
index fd3d59c492..92bd2a1e06 100644
@@ -17,6 +17,7 @@ CONFIG_CMD_FUSE=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
configs/vf610twr_nand_defconfig +1 -0
index 42b246d617..9f35712914 100644
@@ -17,6 +17,7 @@ CONFIG_CMD_FUSE=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_I2C=y
 CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_TRIMFFS=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig +1 -0
index ebbda31f2e..e110ca41f7 100644
@@ -31,6 +31,7 @@ CONFIG_CMD_FPGA_LOADP=y
 CONFIG_CMD_GPIO=y
 CONFIG_CMD_GPT=y
 CONFIG_CMD_I2C=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_LOCK_UNLOCK=y
 CONFIG_CMD_USB=y
 CONFIG_CMD_TFTPPUT=y
configs/zynq_zc770_xm011_defconfig +1 -0
index 373725baa0..4042ce0f7c 100644
@@ -23,6 +23,7 @@ CONFIG_CMD_FPGA_LOADFS=y
 CONFIG_CMD_FPGA_LOADMK=y
 CONFIG_CMD_FPGA_LOADP=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_LOCK_UNLOCK=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
configs/zynq_zc770_xm011_x16_defconfig +1 -0
index f7d68e9bef..145841c492 100644
@@ -23,6 +23,7 @@ CONFIG_CMD_FPGA_LOADFS=y
 CONFIG_CMD_FPGA_LOADMK=y
 CONFIG_CMD_FPGA_LOADP=y
 CONFIG_CMD_GPIO=y
+CONFIG_CMD_NAND=y
 CONFIG_CMD_NAND_LOCK_UNLOCK=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
Signature · 1 line
2.19.1
author maintainer
#17 lore raw

PATCH v4 14/25 mtd: ensure MTD is compiled when CMD_MTDPARTS is selected

In reply to Miquel Raynal

MTD support must be enabled when using mtdparts. Indeed, functions like get_mtd_info(), get_mtd_device() and put_mtd_device() are in drivers/mtd/mtd_uboot.c and are built only with CONFIG_MTD.

---
 configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig | 1 +
 configs/BSC9131RDB_SPIFLASH_defconfig           | 1 +
 configs/lion-rk3368_defconfig                   | 1 +
 configs/sandbox64_defconfig                     | 1 +
 configs/sandbox_defconfig                       | 1 +
 5 files changed, 5 insertions(+)
configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig +1 -0
index 2d3c3d6128..6fad3e0936 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:1m(uboot),8m(kernel),512k(dtb),
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_FSL_CAAM=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_PHY_MARVELL=y
configs/BSC9131RDB_SPIFLASH_defconfig +1 -0
index 5a9f10d6c7..390eaa14d9 100644
@@ -26,6 +26,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:1m(uboot),8m(kernel),512k(dtb),
 CONFIG_ENV_IS_IN_SPI_FLASH=y
 CONFIG_FSL_CAAM=y
 # CONFIG_MMC is not set
+CONFIG_MTD=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_PHY_MARVELL=y
configs/lion-rk3368_defconfig +1 -0
index 2b61922ff5..9b2e951fbe 100644
@@ -68,6 +68,7 @@ CONFIG_TPL_CLK=y
 CONFIG_ROCKCHIP_GPIO=y
 CONFIG_MMC_DW=y
 CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_WINBOND=y
configs/sandbox64_defconfig +1 -0
index e6680d9a59..b7e789e04d 100644
@@ -115,6 +115,7 @@ CONFIG_PWRSEQ=y
 CONFIG_SPL_PWRSEQ=y
 CONFIG_I2C_EEPROM=y
 CONFIG_MMC_SANDBOX=y
+CONFIG_MTD=y
 CONFIG_SPI_FLASH_SANDBOX=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
configs/sandbox_defconfig +1 -0
index 5a744f4791..8b023321b9 100644
@@ -120,6 +120,7 @@ CONFIG_PWRSEQ=y
 CONFIG_SPL_PWRSEQ=y
 CONFIG_I2C_EEPROM=y
 CONFIG_MMC_SANDBOX=y
+CONFIG_MTD=y
 CONFIG_SPI_FLASH_SANDBOX=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
Signature · 1 line
2.19.1
author maintainer
#18 lore raw

PATCH v4 15/25 configs: move CONFIG_MTD in defconfigs when set in arch includes

In reply to Miquel Raynal

Let's be consistent and always declare CONFIG_MTD from the defconfig file when needed.

---
 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(-)
configs/socfpga_stratix10_defconfig +1 -0
index 5f3d733a8b..292dbd6973 100644
@@ -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
configs/turris_mox_defconfig +1 -0
index 749ed31acd..13e2af7e1b 100644
@@ -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
include/configs/mvebu_armada-37xx.h +0 -1
index f93ab0f830..640267c9c2 100644
@@ -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 */
include/configs/socfpga_stratix10_socdk.h +0 -1
index 22e1dc84a1..967784e379 100644
@@ -76,7 +76,6 @@
 #endif /* CONFIG_ENV_IS_IN_SPI_FLASH */
 
 #ifndef CONFIG_SPL_BUILD
-#define CONFIG_MTD
 #define CONFIG_MTD_PARTITIONS
 #define MTDIDS_DEFAULT			"nor0=ff705000.spi.0"
 #endif /* CONFIG_SPL_BUILD */
Signature · 1 line
2.19.1
author maintainer
#19 lore raw

PATCH v4 16/25 configs: remove raw NAND core from k2g defconfigs

In reply to Miquel Raynal

Due to previous Makefile organization, the raw NAND subdirectory was not compiled in if CMD_NAND was not enabled. Because the Denali driver does not compile with these boards (undefined environment offset), remove the dependency within the defconfig over the controller driver (was ignored anyway in the past).

---
 configs/k2g_evm_defconfig    | 1 -
 configs/k2g_hs_evm_defconfig | 1 -
 2 files changed, 2 deletions(-)
configs/k2g_evm_defconfig +0 -1
index dee00ec8d4..b474781ccb 100644
@@ -41,7 +41,6 @@ CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
 CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
-CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
configs/k2g_hs_evm_defconfig +0 -1
index b8c395d78d..a50a7abf30 100644
@@ -34,7 +34,6 @@ CONFIG_MMC_OMAP_HS=y
 CONFIG_MTD=y
 CONFIG_MTD_UBI=y
 CONFIG_MTD_RAW_NAND=y
-CONFIG_NAND_DAVINCI=y
 CONFIG_DM_SPI_FLASH=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_BAR=y
Signature · 1 line
2.19.1
author maintainer
#20 lore raw

PATCH v4 17/25 configs: remove MTD support from bcm11130 and M54418TWR defconfigs

In reply to Miquel Raynal

While the right Kconfig entries were selected, because of the missing CMD_NAND symbol the raw NAND core was never compiled. Remove it from the defconfigs otherwise the build will fail.

---
 configs/M54418TWR_nand_mii_defconfig          | 1 -
 configs/M54418TWR_nand_rmii_defconfig         | 1 -
 configs/M54418TWR_nand_rmii_lowfreq_defconfig | 1 -
 configs/bcm11130_nand_defconfig               | 2 --
 4 files changed, 5 deletions(-)
configs/M54418TWR_nand_mii_defconfig +0 -1
index f05e340543..7ed71936fa 100644
@@ -20,7 +20,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_MTD=y
-CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_MII=y
configs/M54418TWR_nand_rmii_defconfig +0 -1
index 5f958e0333..1aed7bec95 100644
@@ -20,7 +20,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_MTD=y
-CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_MII=y
configs/M54418TWR_nand_rmii_lowfreq_defconfig +0 -1
index 8889e7cd4d..36e145ad0e 100644
@@ -20,7 +20,6 @@ CONFIG_CMD_MII=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_CACHE=y
 CONFIG_MTD=y
-CONFIG_MTD_RAW_NAND=y
 CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_MII=y
configs/bcm11130_nand_defconfig +0 -2
index 7dc8057670..2914b6a710 100644
@@ -24,8 +24,6 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_KONA=y
-CONFIG_MTD=y
-CONFIG_MTD_RAW_NAND=y
 CONFIG_SYS_NS16550=y
 CONFIG_USB=y
 CONFIG_USB_GADGET=y
Signature · 1 line
2.19.1
author maintainer
#21 lore raw

PATCH v4 18/25 mtd: nand: add includes in NAND core to avoid warnings

In reply to Miquel Raynal

Because of the include's game, when some files are compiled for a SPI NAND device, no warning appears. But when it is for a raw NAND device, GCC complains. Fix these warning by including <common.h>.

---
 drivers/mtd/nand/bbt.c  | 1 +
 drivers/mtd/nand/core.c | 1 +
 2 files changed, 2 insertions(+)
drivers/mtd/nand/bbt.c +1 -0
index 7e0ad3190c..f3d05e6757 100644
@@ -9,6 +9,7 @@
 
 #define pr_fmt(fmt)	"nand-bbt: " fmt
 
+#include <common.h>
 #include <linux/mtd/nand.h>
 #ifndef __UBOOT__
 #include <linux/slab.h>
drivers/mtd/nand/core.c +1 -0
index 0b793695cc..3abaef23c5 100644
@@ -9,6 +9,7 @@
 
 #define pr_fmt(fmt)	"nand: " fmt
 
+#include <common.h>
 #ifndef __UBOOT__
 #include <linux/module.h>
 #endif
Signature · 1 line
2.19.1
author maintainer
#22 lore raw

PATCH v4 19/25 dfu: add dependency on the raw NAND core

In reply to Miquel Raynal

CONFIG_DFU_NAND needs the raw NAND core being compiled.

Also fix the colibri_vf defconfig to reflect this dependency.

---
 configs/colibri_vf_defconfig | 1 +
 drivers/dfu/Kconfig          | 1 +
 2 files changed, 2 insertions(+)
configs/colibri_vf_defconfig +1 -0
index 305dfcccb5..73b7055de1 100644
@@ -50,6 +50,7 @@ CONFIG_FSL_ESDHC=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y
 CONFIG_MTD=y
+CONFIG_MTD_RAW_NAND=y
 CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_FASTMAP=y
 CONFIG_PHYLIB=y
drivers/dfu/Kconfig +1 -0
index 4692736c9d..5ee260913c 100644
@@ -31,6 +31,7 @@ config DFU_MMC
 config DFU_NAND
 	bool "NAND back end for DFU"
 	depends on CMD_MTDPARTS
+	depends on MTD_RAW_NAND
 	help
 	  This option enables using DFU to read and write to NAND based
 	  storage.
Signature · 1 line
2.19.1
author maintainer
#23 lore raw

PATCH v4 20/25 mtd: nor: NOR flashes depend on MTD

In reply to Miquel Raynal

A NOR flash needs the MTD core, ensure this dependency is met by adding a "depends on" in Kconfig. This is fine since defconfigs have been fixed.

---
 drivers/mtd/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/Kconfig +1 -0
index 345046c2a6..0832f5b411 100644
@@ -19,6 +19,7 @@ config DM_MTD
 
 config MTD_NOR_FLASH
 	bool "Enable parallel NOR flash support"
+	depends on MTD
 	help
 	  Enable support for parallel NOR flash.
 
Signature · 1 line
2.19.1
author maintainer
#24 lore raw

PATCH v4 21/25 mtd: spi: SPI_FLASH_MTD depends on MTD

In reply to Miquel Raynal

It is already the case that all defconfigs with SPI_FLASH_MTD also declare using MTD, but let's make this consistent and enforce it in Kconfig. Most of the time SPI_FLASH_MTD is used in conjunction with UBI, which already depends on MTD.

---
 drivers/mtd/spi/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/spi/Kconfig +1 -1
index 76d5a1d115..6c79e1ccda 100644
@@ -136,7 +136,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
Signature · 1 line
2.19.1
author maintainer
#25 lore raw

PATCH v4 22/25 cmd: mtdparts: Kconfig: join mtdparts command entry with its options

In reply to Miquel Raynal

Move the Kconfig entry of the option right after the entry of the mtdparts command.

---
 cmd/Kconfig | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
cmd/Kconfig +14 -14
index bf9cc0c52d..22e9807aea 100644
@@ -1741,20 +1741,6 @@ config CMD_MTDPARTS
 	  declare the partitions in the mtdparts environment variable
 	  but better use the MTD stack and the 'mtd' command instead.
 
-config MTDIDS_DEFAULT
-	string "Default MTD IDs"
-	depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH
-	help
-	  Defines a default MTD IDs list for use with MTD partitions in the
-	  Linux MTD command line partitions format.
-
-config MTDPARTS_DEFAULT
-	string "Default MTD partition scheme"
-	depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH
-	help
-	  Defines a default MTD partitioning scheme in the Linux MTD command
-	  line partitions format
-
 config CMD_MTDPARTS_SPREAD
 	bool "Padd partition size to take account of bad blocks"
 	depends on CMD_MTDPARTS
@@ -1765,6 +1751,20 @@ config CMD_MTDPARTS_SPREAD
 	  at least as large as the size specified in the mtdparts variable and
 	  2) each partition starts on a good block.
 
+config MTDIDS_DEFAULT
+	string "Default MTD IDs"
+	depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH
+	help
+	  Defines a default MTD IDs list for use with MTD partitions in the
+	  Linux MTD command line partitions format.
+
+config MTDPARTS_DEFAULT
+	string "Default MTD partition scheme"
+	depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH
+	help
+	  Defines a default MTD partitioning scheme in the Linux MTD command
+	  line partitions format
+
 config CMD_REISER
 	bool "reiser - Access to reiserfs filesystems"
 	help
Signature · 1 line
2.19.1
author maintainer
#26 lore raw

PATCH v4 23/25 cmd: nand/sf: isolate legacy code

In reply to Miquel Raynal

The 'sf' command is not supposed to rely on the MTD stack, but both 'sf' and 'nand' commands use helpers located in mtd_uboot.c. Despite their location, these functions do not depend at all on the MTD stack.

This file (drivers/mtd/mtd_uboot.c) is only compiled if CONFIG_MTD is selected, which is inconsistent with the current situation. Solve this by moving these three functions (which are only used by the above two commands) out of mtd_uboot.c and put them in a C file only compiled with cmd/sf.c and cmd/nand.c.

---
 cmd/Makefile            |  3 ++
 cmd/legacy-mtd-utils.c  | 99 +++++++++++++++++++++++++++++++++++++++++
 cmd/legacy-mtd-utils.h  | 14 ++++++
 cmd/nand.c              |  2 +
 cmd/sf.c                |  2 +
 drivers/mtd/mtd_uboot.c | 94 --------------------------------------
 include/linux/mtd/mtd.h |  6 ---
 7 files changed, 120 insertions(+), 100 deletions(-)
 create mode 100644 cmd/legacy-mtd-utils.c
 create mode 100644 cmd/legacy-mtd-utils.h
cmd/Makefile +3 -0
index 0534ddc679..d04bc44198 100644
@@ -94,6 +94,9 @@ obj-$(CONFIG_CMD_MMC_SPI) += mmc_spi.o
 obj-$(CONFIG_MP) += mp.o
 obj-$(CONFIG_CMD_MTD) += mtd.o
 obj-$(CONFIG_CMD_MTDPARTS) += mtdparts.o
+ifneq ($(CONFIG_CMD_NAND)$(CONFIG_CMD_SF),)
+obj-y += legacy-mtd-utils.o
+endif
 obj-$(CONFIG_CMD_NAND) += nand.o
 obj-$(CONFIG_CMD_NET) += net.o
 obj-$(CONFIG_CMD_ONENAND) += onenand.o
cmd/legacy-mtd-utils.c new file +99 -0

99 lines not on this page · raw message

cmd/legacy-mtd-utils.h new file +14 -0
new file mode 100644
index 0000000000..b31342bcb7
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+
+#ifndef __LEGACY_MTD_UTILS_H
+#define __LEGACY_MTD_UTILS_H
+
+int get_part(const char *partname, int *idx, loff_t *off, loff_t *size,
+	     loff_t *maxsize, int devtype);
+int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
+		loff_t *maxsize, int devtype, uint64_t chipsize);
+int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
+		     loff_t *size, loff_t *maxsize, int devtype,
+		     uint64_t chipsize);
+
+#endif /* LEGACY_MTD_UTILS_H */
cmd/nand.c +2 -0
index a22945d144..018c8a7758 100644
@@ -29,6 +29,8 @@
 #include <jffs2/jffs2.h>
 #include <nand.h>
 
+#include "legacy-mtd-utils.h"
+
 #if defined(CONFIG_CMD_MTDPARTS)
 
 /* partition handling routines */
cmd/sf.c +2 -0
index 84bb0575f2..3fe906fa3b 100644
@@ -18,6 +18,8 @@
 #include <asm/io.h>
 #include <dm/device-internal.h>
 
+#include "legacy-mtd-utils.h"
+
 static struct spi_flash *flash;
 
 /*
drivers/mtd/mtd_uboot.c +0 -94

103 lines not on this page · raw message

include/linux/mtd/mtd.h +0 -6
index 68e5915324..e844ce4cb6 100644
@@ -571,12 +571,6 @@ struct mtd_info *__mtd_next_device(int i);
 	     (mtd) != NULL;				\
 	     (mtd) = __mtd_next_device(mtd->index + 1))
 
-int mtd_arg_off(const char *arg, int *idx, loff_t *off, loff_t *size,
-		loff_t *maxsize, int devtype, uint64_t chipsize);
-int mtd_arg_off_size(int argc, char *const argv[], int *idx, loff_t *off,
-		     loff_t *size, loff_t *maxsize, int devtype,
-		     uint64_t chipsize);
-
 /* drivers/mtd/mtdcore.c */
 void mtd_get_len_incl_bad(struct mtd_info *mtd, uint64_t offset,
 			  const uint64_t length, uint64_t *len_incl_bad,
Signature · 1 line
2.19.1
author maintainer
#27 lore raw

PATCH v4 24/25 cmd: make MTD commands depend on MTD

In reply to Miquel Raynal

Defconfigs have been fixed, now we can add proper dependencies in Kconfig. SPI FLASH is still not dependent on MTD (deeper rework needed).

---
 cmd/Kconfig | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
cmd/Kconfig +7 -3
index 22e9807aea..6f0e8bafce 100644
@@ -679,6 +679,7 @@ config CMD_FDC
 config CMD_FLASH
 	bool "flinfo, erase, protect"
 	default y
+	depends on MTD
 	help
 	  NOR flash support.
 	    flinfo - print FLASH memory information
@@ -868,6 +869,7 @@ config CMD_MMC_SWRITE
 
 config CMD_MTD
 	bool "mtd"
+	depends on MTD
 	select MTD_PARTITIONS
 	help
 	  MTD commands support.
@@ -875,6 +877,7 @@ config CMD_MTD
 config CMD_NAND
 	bool "nand"
 	default y if NAND_SUNXI
+	depends on MTD_RAW_NAND
 	help
 	  NAND support.
 
@@ -915,6 +918,7 @@ config CMD_MMC_SPI
 
 config CMD_ONENAND
 	bool "onenand - access to onenand device"
+	depends on MTD
 	help
 	  OneNAND is a brand of NAND ('Not AND' gate) flash which provides
 	  various useful features. This command allows reading, writing,
@@ -1733,7 +1737,7 @@ config CMD_JFFS2
 
 config CMD_MTDPARTS
 	bool "MTD partition support"
-	select MTD if (CMD_NAND || NAND)
+	depends on MTD
 	help
 	  MTD partitioning tool support.
 	  It is strongly encouraged to avoid using this command
@@ -1753,14 +1757,14 @@ config CMD_MTDPARTS_SPREAD
 
 config MTDIDS_DEFAULT
 	string "Default MTD IDs"
-	depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH
+	depends on MTD || SPI_FLASH
 	help
 	  Defines a default MTD IDs list for use with MTD partitions in the
 	  Linux MTD command line partitions format.
 
 config MTDPARTS_DEFAULT
 	string "Default MTD partition scheme"
-	depends on MTD_PARTITIONS || CMD_MTDPARTS || CMD_NAND || CMD_FLASH
+	depends on MTD || SPI_FLASH
 	help
 	  Defines a default MTD partitioning scheme in the Linux MTD command
 	  line partitions format
Signature · 1 line
2.19.1
author maintainer
#28 lore raw

PATCH v4 25/25 mtd: Makefile: deep cleanup

In reply to Miquel Raynal

Move MTD-related lines out of the root Makefile. Put them in their respective directories. Enclose some of these new lines to skip them when building the SPL. MTD core files and some MTD device drivers are compiled in a mtd.o object and included in the final object only if MTD support is required (there are two different symbols for that, one for U-Boot and one for the SPL).

Now that all defconfigs have been fixed, we can stop the logic where enabling a command selects the core files to compile. This logic is broken since selecting a symbol with a 'depends on' will not enforce this secondary dependency.

---
 Makefile                  |  5 ----
 drivers/Makefile          |  7 ++----
 drivers/mtd/Makefile      | 50 +++++++++++++++++++++++++++------------
 drivers/mtd/nand/Makefile |  5 ++++
 4 files changed, 42 insertions(+), 25 deletions(-)
Makefile +0 -5
index 552687db53..435d0257dd 100644
@@ -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/
drivers/Makefile +2 -5
index 4453c62ad3..03aa26535c 100644
@@ -6,12 +6,11 @@ obj-$(CONFIG_$(SPL_TPL_)DRIVERS_MISC_SUPPORT) += misc/ sysreset/ firmware/
 obj-$(CONFIG_$(SPL_TPL_)I2C_SUPPORT) += i2c/
 obj-$(CONFIG_$(SPL_TPL_)LED) += led/
 obj-$(CONFIG_$(SPL_TPL_)MMC_SUPPORT) += mmc/
-obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += mtd/nand/raw/
+obj-y += mtd/
 obj-$(CONFIG_$(SPL_TPL_)PHY) += phy/
 obj-$(CONFIG_$(SPL_TPL_)PINCTRL) += pinctrl/
 obj-$(CONFIG_$(SPL_TPL_)RAM) += ram/
 obj-$(CONFIG_$(SPL_TPL_)SERIAL_SUPPORT) += serial/
-obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPORT) += mtd/spi/
 obj-$(CONFIG_$(SPL_TPL_)SPI_SUPPORT) += spi/
 obj-$(CONFIG_$(SPL_TPL_)TIMER) += timer/
 obj-$(CONFIG_$(SPL_TPL_)VIRTIO) += virtio/
@@ -33,9 +32,6 @@ obj-$(CONFIG_SPL_POWER_SUPPORT) += power/ power/pmic/
 obj-$(CONFIG_SPL_POWER_SUPPORT) += power/regulator/
 obj-$(CONFIG_SPL_POWER_DOMAIN) += power/domain/
 obj-$(CONFIG_SPL_DM_RESET) += reset/
-obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd/
-obj-$(CONFIG_SPL_ONENAND_SUPPORT) += mtd/onenand/
-obj-$(CONFIG_SPL_UBI) += mtd/ubispl/
 obj-$(CONFIG_SPL_DMA_SUPPORT) += dma/
 obj-$(CONFIG_SPL_ETH_SUPPORT) += net/
 obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/
@@ -99,6 +95,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/
drivers/mtd/Makefile +35 -15

55 lines not on this page · raw message

drivers/mtd/nand/Makefile +5 -0
index a358bc680e..96e186600a 100644
@@ -1,5 +1,10 @@
 # SPDX-License-Identifier: GPL-2.0+
 
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TPL_BUILD),)
 nandcore-objs := core.o bbt.o
 obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
+obj-$(CONFIG_MTD_RAW_NAND) += raw/
 obj-$(CONFIG_MTD_SPI_NAND) += spi/
+else
+obj-$(CONFIG_$(SPL_TPL_)NAND_SUPPORT) += raw/
+endif
Signature · 1 line
2.19.1
maintainer
#29 lore raw

v4 cover MTD defconfigs/Kconfigs/Makefiles heavy cleanup

In reply to Miquel Raynal

Hi Jagan,

Quoted 21 lines · Miquel Raynal

Hello,

During my last project about SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the root Makefile
* Commands are at the root of everything

I sent a fist series a few weeks ago to move Makefile entries in their respective directories (which needed to be reworked). Since then, I have been working on clarifying all this for the MTD subsystem and here are the main points of such re-organization:
* Rename CONFIG_MTD into CONFIG_DM_MTD to reserve CONFIG_MTD to what is called today CONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix the Kconfig files to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling the drivers/mtd/nand/raw/ sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend on CMD_NAND.

Quoted 7 lines

New green Travis CI build for the third version of this series:
https://travis-ci.org/miquelraynal/u-boot/builds/463486099
There are three Sandbox tests that are failing, they have not been break by this series. The following Travis test has been done on the commit on which has been based the series and shows the same errors:
https://travis-ci.org/miquelraynal/u-boot/builds/463593006

I would like to revive this series. With some rebasing, this series should still apply as is.

Jagan, did you get a chance to look into this series? Any comments?

Quoted 926 lines

Thanks,
Miquèl

Note: as the number of Cc:'ed people reached 184 with get_maintainers.pl I decided to trim the list to:
* People interested by the MTD subsystem.
* A few maintainers: I had to tweak some defconfigs after more digging than with other boards (k2g, bcm11130, M54418TWR). Maintainers of these platforms are Cc:'ed.

Changes since v3:
=================
* As suggested by Vignesh, SPI_FLASH_MTD depends on MTD. Enforce this in Kconfig with a new patch. There is no defconfig to fix, all defconfigs with SPI_FLASH_MTD already use MTD.
* s/coherent Makefile/appropriate Makefile/ in commit title of patch 1.
* s/Kconfig/Makefile in commit message of "mtd: nand: remove dependency on commands in Kconfig" and "mtd: ubi: remove dependency on command in Kconfig".
* Add Boris R-b tags.
* Correct typos pointed by Boris.
* Remove the if/endif in cmd/Kconfig about mtdparts, let the "depends on" that was already present.
* Use an if/endif block to compile legacy-mtd-utils.c (to avoid failures when both 'sf' and 'nand' commands are compiled-in).
* Merge all Makefile changes in one consistent commit as suggested by Boris.

Changes since v2:
=================
* Cleanup also applied to the SPL in an additional patch.
* NOR dependency on MTD extracted from the patch adding MTD dependencies on commands only to do it in a separate change.
* Typo s/copile/compile/ in "rename CONFIG_MTD_DEVICE..." commit log.
* No more MTD depencency on SPI_FLASH, only kept on SPI_FLASH_MTD.
* Same applies to the sf command.
* Avoid compiling the NAND core while it is not needed (not speaking about the raw NAND core, really what is in drivers/mtd/nand:).
* Last patch dropping CONFIG_MTD_PARTITIONS forgotten. We need them in order to reduce the final binary size.
* Additional fixes in cmd/Kconfig.

Changes since v1:
=================
* Squashed both patches from the first series and included them in "mtd: simplify Makefiles".
* Added all other patches.
* Renamed CONFIG_NAND into CONFIG_MTD_RAW_NAND as suggested.

Miquel Raynal (25):
mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND
mtd: rename CONFIG_MTD -> CONFIG_DM_MTD
mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD
mtd: ensure MTD is compiled when there is a NOR flash
mtd: ensure MTD/the raw NAND core are compiled when there is a NAND
flash
mtd: ensure MTD is compiled when there is a SPI NOR flash using MTD
mtd: ensure UBI is compiled when using fastmap
mtd: ensure MTD is compiled when UBI is used
mtd: ensure UBI is compiled when CMD_UBI is selected
mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selected
mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selected
mtd: ensure MTD and NOR drivers are compiled with ENV_IS_IN_FLASH
mtd: ensure CMD_NAND is compiled when its options are selected
mtd: ensure MTD is compiled when CMD_MTDPARTS is selected
configs: move CONFIG_MTD in defconfigs when set in arch includes
configs: remove raw NAND core from k2g defconfigs
configs: remove MTD support from bcm11130 and M54418TWR defconfigs
mtd: nand: add includes in NAND core to avoid warnings
dfu: add dependency on the raw NAND core
mtd: nor: NOR flashes depend on MTD
mtd: spi: SPI_FLASH_MTD depends on MTD
cmd: mtdparts: Kconfig: join mtdparts command entry with its options
cmd: nand/sf: isolate legacy code
cmd: make MTD commands depend on MTD
mtd: Makefile: deep cleanup

 Makefile                                      |  5 -
 arch/arm/mach-omap2/mem-common.c              |  6 +-
 board/BuR/brppt1/board.c                      |  2 +-
 board/BuR/brppt1/mux.c                        |  6 +-
 board/birdland/bav335x/board.c                |  2 +-
 board/bosch/shc/board.c                       |  2 +-
 board/freescale/ls2080aqds/ls2080aqds.c       |  2 +-
 board/freescale/t102xrdb/t102xrdb.c           |  2 +-
 board/phytec/pcm051/mux.c                     |  4 +-
 board/siemens/pxm2/mux.c                      |  4 +-
 board/sunxi/README.nand                       |  2 +-
 board/ti/am335x/board.c                       |  2 +-
 board/ti/am335x/mux.c                         |  8 +-
 board/ti/am43xx/mux.c                         |  8 +-
 board/ti/ti816x/evm.c                         |  2 +-
 board/vscom/baltos/board.c                    |  2 +-
 board/vscom/baltos/mux.c                      |  2 +-
 cmd/Kconfig                                   | 34 ++++---
 cmd/Makefile                                  |  3 +
 cmd/legacy-mtd-utils.c                        | 99 +++++++++++++++++++
 cmd/legacy-mtd-utils.h                        | 14 +++
 cmd/nand.c                                    |  2 +
 cmd/sf.c                                      |  2 +
 configs/10m50_defconfig                       |  2 +-
 configs/3c120_defconfig                       |  1 +
 configs/B4420QDS_NAND_defconfig               |  3 +-
 configs/B4420QDS_SPIFLASH_defconfig           |  1 +
 configs/B4420QDS_defconfig                    |  1 +
 configs/B4860QDS_NAND_defconfig               |  3 +-
 configs/B4860QDS_SECURE_BOOT_defconfig        |  1 +
 configs/B4860QDS_SPIFLASH_defconfig           |  1 +
 configs/B4860QDS_defconfig                    |  1 +
 configs/BSC9131RDB_NAND_SYSCLK100_defconfig   |  3 +-
 configs/BSC9131RDB_NAND_defconfig             |  3 +-
 .../BSC9131RDB_SPIFLASH_SYSCLK100_defconfig   |  1 +
 configs/BSC9131RDB_SPIFLASH_defconfig         |  1 +
 ...BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig |  2 +
 configs/BSC9132QDS_NAND_DDRCLK100_defconfig   |  3 +-
 ...BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig |  2 +
 configs/BSC9132QDS_NAND_DDRCLK133_defconfig   |  3 +-
 .../BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig |  1 +
 configs/BSC9132QDS_NOR_DDRCLK100_defconfig    |  1 +
 .../BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig |  1 +
 configs/BSC9132QDS_NOR_DDRCLK133_defconfig    |  1 +
 ...C9132QDS_SDCARD_DDRCLK100_SECURE_defconfig |  1 +
 configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig |  1 +
 ...C9132QDS_SDCARD_DDRCLK133_SECURE_defconfig |  1 +
 configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig |  1 +
 ...132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig |  1 +
 .../BSC9132QDS_SPIFLASH_DDRCLK100_defconfig   |  1 +
 ...132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig |  1 +
 .../BSC9132QDS_SPIFLASH_DDRCLK133_defconfig   |  1 +
 configs/C29XPCIE_NAND_defconfig               |  3 +-
 configs/C29XPCIE_NOR_SECBOOT_defconfig        |  1 +
 configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig   |  1 +
 configs/C29XPCIE_SPIFLASH_defconfig           |  1 +
 configs/C29XPCIE_defconfig                    |  1 +
 configs/CHIP_pro_defconfig                    |  5 +-
 configs/M5208EVBE_defconfig                   |  1 +
 configs/M52277EVB_defconfig                   |  1 +
 configs/M52277EVB_stmicro_defconfig           |  1 +
 configs/M5235EVB_Flash32_defconfig            |  1 +
 configs/M5235EVB_defconfig                    |  1 +
 configs/M5249EVB_defconfig                    |  1 +
 configs/M5253DEMO_defconfig                   |  1 +
 configs/M5272C3_defconfig                     |  1 +
 configs/M5275EVB_defconfig                    |  1 +
 configs/M5282EVB_defconfig                    |  1 +
 configs/M53017EVB_defconfig                   |  1 +
 configs/M5329AFEE_defconfig                   |  1 +
 configs/M5329BFEE_defconfig                   |  1 +
 configs/M5373EVB_defconfig                    |  1 +
 configs/M54418TWR_nand_mii_defconfig          |  1 +
 configs/M54418TWR_nand_rmii_defconfig         |  1 +
 configs/M54418TWR_nand_rmii_lowfreq_defconfig |  1 +
 configs/M54451EVB_defconfig                   |  1 +
 configs/M54451EVB_stmicro_defconfig           |  1 +
 configs/M54455EVB_a66_defconfig               |  1 +
 configs/M54455EVB_defconfig                   |  1 +
 configs/M54455EVB_i66_defconfig               |  1 +
 configs/M54455EVB_intel_defconfig             |  1 +
 configs/M54455EVB_stm33_defconfig             |  1 +
 configs/M5475AFE_defconfig                    |  1 +
 configs/M5475BFE_defconfig                    |  1 +
 configs/M5475CFE_defconfig                    |  1 +
 configs/M5475DFE_defconfig                    |  1 +
 configs/M5475EFE_defconfig                    |  1 +
 configs/M5475FFE_defconfig                    |  1 +
 configs/M5475GFE_defconfig                    |  1 +
 configs/M5485AFE_defconfig                    |  1 +
 configs/M5485BFE_defconfig                    |  1 +
 configs/M5485CFE_defconfig                    |  1 +
 configs/M5485DFE_defconfig                    |  1 +
 configs/M5485EFE_defconfig                    |  1 +
 configs/M5485FFE_defconfig                    |  1 +
 configs/M5485GFE_defconfig                    |  1 +
 configs/M5485HFE_defconfig                    |  1 +
 configs/MCR3000_defconfig                     |  1 +
 configs/MPC8308RDB_defconfig                  |  1 +
 configs/MPC8313ERDB_33_defconfig              |  1 +
 configs/MPC8313ERDB_66_defconfig              |  1 +
 configs/MPC8313ERDB_NAND_33_defconfig         |  3 +-
 configs/MPC8313ERDB_NAND_66_defconfig         |  3 +-
 configs/MPC8315ERDB_defconfig                 |  1 +
 configs/MPC8323ERDB_defconfig                 |  1 +
 configs/MPC832XEMDS_ATM_defconfig             |  1 +
 configs/MPC832XEMDS_HOST_33_defconfig         |  1 +
 configs/MPC832XEMDS_HOST_66_defconfig         |  1 +
 configs/MPC832XEMDS_SLAVE_defconfig           |  1 +
 configs/MPC832XEMDS_defconfig                 |  1 +
 configs/MPC8349EMDS_defconfig                 |  1 +
 configs/MPC8349ITXGP_defconfig                |  1 +
 configs/MPC8349ITX_LOWBOOT_defconfig          |  1 +
 configs/MPC8349ITX_defconfig                  |  1 +
 configs/MPC837XEMDS_HOST_defconfig            |  1 +
 configs/MPC837XEMDS_defconfig                 |  1 +
 configs/MPC837XERDB_defconfig                 |  1 +
 configs/MPC8536DS_36BIT_defconfig             |  1 +
 configs/MPC8536DS_SDCARD_defconfig            |  1 +
 configs/MPC8536DS_SPIFLASH_defconfig          |  1 +
 configs/MPC8536DS_defconfig                   |  1 +
 configs/MPC8541CDS_defconfig                  |  1 +
 configs/MPC8541CDS_legacy_defconfig           |  1 +
 configs/MPC8544DS_defconfig                   |  1 +
 configs/MPC8548CDS_36BIT_defconfig            |  1 +
 configs/MPC8548CDS_defconfig                  |  1 +
 configs/MPC8548CDS_legacy_defconfig           |  1 +
 configs/MPC8555CDS_defconfig                  |  1 +
 configs/MPC8555CDS_legacy_defconfig           |  1 +
 configs/MPC8568MDS_defconfig                  |  1 +
 configs/MPC8569MDS_ATM_defconfig              |  1 +
 configs/MPC8569MDS_defconfig                  |  1 +
 configs/MPC8572DS_36BIT_defconfig             |  1 +
 configs/MPC8572DS_defconfig                   |  1 +
 configs/MPC8610HPCD_defconfig                 |  1 +
 configs/MPC8641HPCN_36BIT_defconfig           |  1 +
 configs/MPC8641HPCN_defconfig                 |  1 +
 configs/MigoR_defconfig                       |  1 +
 .../Nintendo_NES_Classic_Edition_defconfig    |  3 +-
 .../P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig  |  2 +
 configs/P1010RDB-PA_36BIT_NAND_defconfig      |  3 +-
 .../P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig   |  1 +
 configs/P1010RDB-PA_36BIT_NOR_defconfig       |  1 +
 configs/P1010RDB-PA_36BIT_SDCARD_defconfig    |  1 +
 ...010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig |  1 +
 configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1010RDB-PA_NAND_SECBOOT_defconfig    |  2 +
 configs/P1010RDB-PA_NAND_defconfig            |  3 +-
 configs/P1010RDB-PA_NOR_SECBOOT_defconfig     |  1 +
 configs/P1010RDB-PA_NOR_defconfig             |  1 +
 configs/P1010RDB-PA_SDCARD_defconfig          |  1 +
 .../P1010RDB-PA_SPIFLASH_SECBOOT_defconfig    |  1 +
 configs/P1010RDB-PA_SPIFLASH_defconfig        |  1 +
 .../P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig  |  2 +
 configs/P1010RDB-PB_36BIT_NAND_defconfig      |  3 +-
 .../P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig   |  1 +
 configs/P1010RDB-PB_36BIT_NOR_defconfig       |  1 +
 configs/P1010RDB-PB_36BIT_SDCARD_defconfig    |  1 +
 ...010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig |  1 +
 configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1010RDB-PB_NAND_SECBOOT_defconfig    |  2 +
 configs/P1010RDB-PB_NAND_defconfig            |  3 +-
 configs/P1010RDB-PB_NOR_SECBOOT_defconfig     |  1 +
 configs/P1010RDB-PB_NOR_defconfig             |  1 +
 configs/P1010RDB-PB_SDCARD_defconfig          |  1 +
 .../P1010RDB-PB_SPIFLASH_SECBOOT_defconfig    |  1 +
 configs/P1010RDB-PB_SPIFLASH_defconfig        |  1 +
 configs/P1020MBG-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P1020MBG-PC_36BIT_defconfig           |  1 +
 configs/P1020MBG-PC_SDCARD_defconfig          |  1 +
 configs/P1020MBG-PC_defconfig                 |  1 +
 configs/P1020RDB-PC_36BIT_NAND_defconfig      |  3 +-
 configs/P1020RDB-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1020RDB-PC_36BIT_defconfig           |  1 +
 configs/P1020RDB-PC_NAND_defconfig            |  3 +-
 configs/P1020RDB-PC_SDCARD_defconfig          |  1 +
 configs/P1020RDB-PC_SPIFLASH_defconfig        |  1 +
 configs/P1020RDB-PC_defconfig                 |  1 +
 configs/P1020RDB-PD_NAND_defconfig            |  3 +-
 configs/P1020RDB-PD_SDCARD_defconfig          |  1 +
 configs/P1020RDB-PD_SPIFLASH_defconfig        |  1 +
 configs/P1020RDB-PD_defconfig                 |  1 +
 configs/P1020UTM-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P1020UTM-PC_36BIT_defconfig           |  1 +
 configs/P1020UTM-PC_SDCARD_defconfig          |  1 +
 configs/P1020UTM-PC_defconfig                 |  1 +
 configs/P1021RDB-PC_36BIT_NAND_defconfig      |  3 +-
 configs/P1021RDB-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P1021RDB-PC_36BIT_defconfig           |  1 +
 configs/P1021RDB-PC_NAND_defconfig            |  3 +-
 configs/P1021RDB-PC_SDCARD_defconfig          |  1 +
 configs/P1021RDB-PC_SPIFLASH_defconfig        |  1 +
 configs/P1021RDB-PC_defconfig                 |  1 +
 configs/P1022DS_36BIT_NAND_defconfig          |  3 +-
 configs/P1022DS_36BIT_SDCARD_defconfig        |  1 +
 configs/P1022DS_36BIT_SPIFLASH_defconfig      |  1 +
 configs/P1022DS_36BIT_defconfig               |  1 +
 configs/P1022DS_NAND_defconfig                |  3 +-
 configs/P1022DS_SDCARD_defconfig              |  1 +
 configs/P1022DS_SPIFLASH_defconfig            |  1 +
 configs/P1022DS_defconfig                     |  1 +
 configs/P1023RDB_defconfig                    |  1 +
 configs/P1024RDB_36BIT_defconfig              |  1 +
 configs/P1024RDB_NAND_defconfig               |  3 +-
 configs/P1024RDB_SDCARD_defconfig             |  1 +
 configs/P1024RDB_SPIFLASH_defconfig           |  1 +
 configs/P1024RDB_defconfig                    |  1 +
 configs/P1025RDB_36BIT_defconfig              |  1 +
 configs/P1025RDB_NAND_defconfig               |  3 +-
 configs/P1025RDB_SDCARD_defconfig             |  1 +
 configs/P1025RDB_SPIFLASH_defconfig           |  1 +
 configs/P1025RDB_defconfig                    |  1 +
 configs/P2020RDB-PC_36BIT_NAND_defconfig      |  3 +-
 configs/P2020RDB-PC_36BIT_SDCARD_defconfig    |  1 +
 configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig  |  1 +
 configs/P2020RDB-PC_36BIT_defconfig           |  1 +
 configs/P2020RDB-PC_NAND_defconfig            |  3 +-
 configs/P2020RDB-PC_SDCARD_defconfig          |  1 +
 configs/P2020RDB-PC_SPIFLASH_defconfig        |  1 +
 configs/P2020RDB-PC_defconfig                 |  1 +
 configs/P2041RDB_NAND_defconfig               |  3 +-
 configs/P2041RDB_SDCARD_defconfig             |  1 +
 configs/P2041RDB_SECURE_BOOT_defconfig        |  1 +
 configs/P2041RDB_SPIFLASH_defconfig           |  1 +
 configs/P2041RDB_defconfig                    |  1 +
 configs/P3041DS_NAND_SECURE_BOOT_defconfig    |  3 +-
 configs/P3041DS_NAND_defconfig                |  3 +-
 configs/P3041DS_SDCARD_defconfig              |  1 +
 configs/P3041DS_SECURE_BOOT_defconfig         |  1 +
 configs/P3041DS_SPIFLASH_defconfig            |  1 +
 configs/P3041DS_defconfig                     |  1 +
 configs/P4080DS_SDCARD_defconfig              |  1 +
 configs/P4080DS_SECURE_BOOT_defconfig         |  1 +
 configs/P4080DS_SPIFLASH_defconfig            |  1 +
 configs/P4080DS_defconfig                     |  1 +
 configs/P5020DS_NAND_SECURE_BOOT_defconfig    |  3 +-
 configs/P5020DS_NAND_defconfig                |  3 +-
 configs/P5020DS_SDCARD_defconfig              |  1 +
 configs/P5020DS_SECURE_BOOT_defconfig         |  1 +
 configs/P5020DS_SPIFLASH_defconfig            |  1 +
 configs/P5020DS_defconfig                     |  1 +
 configs/P5040DS_NAND_SECURE_BOOT_defconfig    |  3 +-
 configs/P5040DS_NAND_defconfig                |  3 +-
 configs/P5040DS_SDCARD_defconfig              |  1 +
 configs/P5040DS_SECURE_BOOT_defconfig         |  1 +
 configs/P5040DS_SPIFLASH_defconfig            |  1 +
 configs/P5040DS_defconfig                     |  1 +
 configs/T1023RDB_NAND_defconfig               |  3 +-
 configs/T1023RDB_SDCARD_defconfig             |  1 +
 configs/T1023RDB_SECURE_BOOT_defconfig        |  1 +
 configs/T1023RDB_SPIFLASH_defconfig           |  1 +
 configs/T1023RDB_defconfig                    |  1 +
 configs/T1024QDS_DDR4_SECURE_BOOT_defconfig   |  1 +
 configs/T1024QDS_DDR4_defconfig               |  1 +
 configs/T1024QDS_NAND_defconfig               |  3 +-
 configs/T1024QDS_SDCARD_defconfig             |  1 +
 configs/T1024QDS_SECURE_BOOT_defconfig        |  1 +
 configs/T1024QDS_SPIFLASH_defconfig           |  1 +
 configs/T1024QDS_defconfig                    |  1 +
 configs/T1024RDB_NAND_defconfig               |  3 +-
 configs/T1024RDB_SDCARD_defconfig             |  1 +
 configs/T1024RDB_SECURE_BOOT_defconfig        |  1 +
 configs/T1024RDB_SPIFLASH_defconfig           |  1 +
 configs/T1024RDB_defconfig                    |  1 +
 configs/T1040D4RDB_NAND_defconfig             |  3 +-
 configs/T1040D4RDB_SDCARD_defconfig           |  1 +
 configs/T1040D4RDB_SECURE_BOOT_defconfig      |  1 +
 configs/T1040D4RDB_SPIFLASH_defconfig         |  1 +
 configs/T1040D4RDB_defconfig                  |  1 +
 configs/T1040QDS_DDR4_defconfig               |  1 +
 configs/T1040QDS_SECURE_BOOT_defconfig        |  1 +
 configs/T1040QDS_defconfig                    |  1 +
 configs/T1040RDB_NAND_defconfig               |  3 +-
 configs/T1040RDB_SDCARD_defconfig             |  1 +
 configs/T1040RDB_SECURE_BOOT_defconfig        |  1 +
 configs/T1040RDB_SPIFLASH_defconfig           |  1 +
 configs/T1040RDB_defconfig                    |  1 +
 configs/T1042D4RDB_NAND_defconfig             |  3 +-
 configs/T1042D4RDB_SDCARD_defconfig           |  1 +
 configs/T1042D4RDB_SECURE_BOOT_defconfig      |  1 +
 configs/T1042D4RDB_SPIFLASH_defconfig         |  1 +
 configs/T1042D4RDB_defconfig                  |  1 +
 .../T1042RDB_PI_NAND_SECURE_BOOT_defconfig    |  3 +-
 configs/T1042RDB_PI_NAND_defconfig            |  3 +-
 configs/T1042RDB_PI_SDCARD_defconfig          |  1 +
 configs/T1042RDB_PI_SPIFLASH_defconfig        |  1 +
 configs/T1042RDB_PI_defconfig                 |  1 +
 configs/T1042RDB_SECURE_BOOT_defconfig        |  1 +
 configs/T1042RDB_defconfig                    |  1 +
 configs/T2080QDS_NAND_defconfig               |  3 +-
 configs/T2080QDS_SDCARD_defconfig             |  1 +
 configs/T2080QDS_SECURE_BOOT_defconfig        |  1 +
 configs/T2080QDS_SPIFLASH_defconfig           |  1 +
 configs/T2080QDS_defconfig                    |  1 +
 configs/T2080RDB_NAND_defconfig               |  3 +-
 configs/T2080RDB_SDCARD_defconfig             |  1 +
 configs/T2080RDB_SECURE_BOOT_defconfig        |  1 +
 configs/T2080RDB_SPIFLASH_defconfig           |  1 +
 configs/T2080RDB_defconfig                    |  1 +
 configs/T2081QDS_NAND_defconfig               |  3 +-
 configs/T2081QDS_SDCARD_defconfig             |  1 +
 configs/T2081QDS_SPIFLASH_defconfig           |  1 +
 configs/T2081QDS_defconfig                    |  1 +
 configs/T4160QDS_NAND_defconfig               |  3 +-
 configs/T4160QDS_SDCARD_defconfig             |  1 +
 configs/T4160QDS_SECURE_BOOT_defconfig        |  1 +
 configs/T4160QDS_defconfig                    |  1 +
 configs/T4160RDB_defconfig                    |  1 +
 configs/T4240QDS_NAND_defconfig               |  3 +-
 configs/T4240QDS_SDCARD_defconfig             |  1 +
 configs/T4240QDS_SECURE_BOOT_defconfig        |  1 +
 configs/T4240QDS_defconfig                    |  1 +
 configs/T4240RDB_SDCARD_defconfig             |  1 +
 configs/T4240RDB_defconfig                    |  1 +
 configs/TQM834x_defconfig                     |  2 +-
 configs/TWR-P1025_defconfig                   |  2 +-
 configs/UCP1020_SPIFLASH_defconfig            |  1 +
 configs/UCP1020_defconfig                     |  1 +
 configs/adp-ae3xx_defconfig                   |  3 +-
 configs/adp-ag101p_defconfig                  |  1 +
 configs/alt_defconfig                         |  2 +-
 configs/am335x_baltos_defconfig               |  4 +-
 configs/am335x_evm_defconfig                  |  3 +-
 configs/am335x_evm_nor_defconfig              |  3 +-
 configs/am335x_evm_norboot_defconfig          |  2 +-
 configs/am335x_evm_spiboot_defconfig          |  2 +-
 configs/am335x_evm_usbspl_defconfig           |  3 +-
 configs/am335x_hs_evm_defconfig               |  3 +-
 configs/am335x_hs_evm_uart_defconfig          |  3 +-
 configs/am335x_igep003x_defconfig             |  4 +-
 configs/am3517_crane_defconfig                |  3 +-
 configs/am3517_evm_defconfig                  |  4 +-
 configs/am43xx_evm_defconfig                  |  3 +-
 configs/am43xx_evm_ethboot_defconfig          |  3 +-
 configs/am43xx_evm_rtconly_defconfig          |  3 +-
 configs/am43xx_evm_usbhost_boot_defconfig     |  3 +-
 configs/am43xx_hs_evm_defconfig               |  3 +-
 configs/amcore_defconfig                      |  1 +
 configs/ap121_defconfig                       |  1 +
 configs/ap143_defconfig                       |  1 +
 configs/ap325rxa_defconfig                    |  1 +
 configs/ap_sh4a_4a_defconfig                  |  1 +
 configs/apf27_defconfig                       |  5 +-
 configs/apx4devkit_defconfig                  |  4 +-
 configs/aristainetos2_defconfig               |  5 +-
 configs/aristainetos2b_defconfig              |  5 +-
 configs/aristainetos_defconfig                |  5 +-
 configs/armadillo-800eva_defconfig            |  2 +
 configs/astro_mcf5373l_defconfig              |  1 +
 configs/at91rm9200ek_defconfig                |  1 +
 configs/at91rm9200ek_ram_defconfig            |  1 +
 configs/at91sam9260ek_dataflash_cs0_defconfig |  3 +-
 configs/at91sam9260ek_dataflash_cs1_defconfig |  3 +-
 configs/at91sam9260ek_nandflash_defconfig     |  3 +-
 configs/at91sam9261ek_dataflash_cs0_defconfig |  3 +-
 configs/at91sam9261ek_dataflash_cs3_defconfig |  3 +-
 configs/at91sam9261ek_nandflash_defconfig     |  3 +-
 configs/at91sam9263ek_dataflash_cs0_defconfig |  3 +-
 configs/at91sam9263ek_dataflash_defconfig     |  3 +-
 configs/at91sam9263ek_nandflash_defconfig     |  3 +-
 configs/at91sam9263ek_norflash_boot_defconfig |  3 +-
 configs/at91sam9263ek_norflash_defconfig      |  3 +-
 configs/at91sam9g10ek_dataflash_cs0_defconfig |  3 +-
 configs/at91sam9g10ek_dataflash_cs3_defconfig |  3 +-
 configs/at91sam9g10ek_nandflash_defconfig     |  3 +-
 configs/at91sam9g20ek_2mmc_defconfig          |  3 +-
 .../at91sam9g20ek_2mmc_nandflash_defconfig    |  3 +-
 configs/at91sam9g20ek_dataflash_cs0_defconfig |  3 +-
 configs/at91sam9g20ek_dataflash_cs1_defconfig |  3 +-
 configs/at91sam9g20ek_nandflash_defconfig     |  3 +-
 configs/at91sam9m10g45ek_mmc_defconfig        |  3 +-
 configs/at91sam9m10g45ek_nandflash_defconfig  |  2 +
 configs/at91sam9n12ek_mmc_defconfig           |  3 +-
 configs/at91sam9n12ek_nandflash_defconfig     |  2 +
 configs/at91sam9n12ek_spiflash_defconfig      |  3 +-
 configs/at91sam9rlek_dataflash_defconfig      |  3 +-
 configs/at91sam9rlek_mmc_defconfig            |  3 +-
 configs/at91sam9rlek_nandflash_defconfig      |  3 +-
 configs/at91sam9x5ek_dataflash_defconfig      |  4 +-
 configs/at91sam9x5ek_mmc_defconfig            |  4 +-
 configs/at91sam9x5ek_nandflash_defconfig      |  3 +
 configs/at91sam9x5ek_spiflash_defconfig       |  4 +-
 configs/at91sam9xeek_dataflash_cs0_defconfig  |  3 +-
 configs/at91sam9xeek_dataflash_cs1_defconfig  |  3 +-
 configs/at91sam9xeek_nandflash_defconfig      |  3 +-
 configs/ax25-ae350_defconfig                  |  1 +
 configs/axm_defconfig                         |  3 +-
 configs/axs101_defconfig                      |  2 +
 configs/axs103_defconfig                      |  2 +
 configs/bcm11130_nand_defconfig               |  1 -
 configs/bg0900_defconfig                      |  4 +-
 configs/bitmain_antminer_s9_defconfig         |  7 +-
 configs/bk4r1_defconfig                       |  4 +
 configs/blanche_defconfig                     |  1 +
 configs/boston32r2_defconfig                  |  1 +
 configs/boston32r2el_defconfig                |  1 +
 configs/boston32r6_defconfig                  |  1 +
 configs/boston32r6el_defconfig                |  1 +
 configs/boston64r2_defconfig                  |  1 +
 configs/boston64r2el_defconfig                |  1 +
 configs/boston64r6_defconfig                  |  1 +
 configs/boston64r6el_defconfig                |  1 +
 configs/brppt1_nand_defconfig                 |  3 +-
 configs/brppt1_spi_defconfig                  |  2 +-
 configs/caddy2_defconfig                      |  1 +
 configs/cairo_defconfig                       |  3 +-
 configs/calimain_defconfig                    |  1 +
 configs/chiliboard_defconfig                  |  3 +-
 configs/clearfog_defconfig                    |  1 +
 configs/cm_fx6_defconfig                      |  3 +-
 configs/cm_t335_defconfig                     |  3 +-
 configs/cm_t3517_defconfig                    |  3 +-
 configs/cm_t35_defconfig                      |  3 +-
 configs/cm_t43_defconfig                      |  3 +-
 configs/cobra5272_defconfig                   |  1 +
 configs/colibri-imx6ull_defconfig             |  7 +-
 configs/colibri_imx7_defconfig                |  5 +-
 configs/colibri_pxa270_defconfig              |  1 +
 configs/colibri_t20_defconfig                 |  3 +
 configs/colibri_vf_defconfig                  |  3 +
 configs/comtrend_ar5315u_ram_defconfig        |  1 +
 configs/comtrend_ar5387un_ram_defconfig       |  1 +
 configs/comtrend_ct5361_ram_defconfig         |  1 +
 configs/comtrend_wap5813n_ram_defconfig       |  1 +
 configs/corvus_defconfig                      |  3 +-
 configs/da850_am18xxevm_defconfig             |  2 +-
 configs/da850evm_defconfig                    |  2 +-
 configs/da850evm_direct_nor_defconfig         |  1 +
 configs/da850evm_nand_defconfig               |  3 +-
 configs/db-88f6820-amc_defconfig              |  3 +-
 configs/db-mv784mp-gp_defconfig               |  3 +-
 configs/devkit3250_defconfig                  |  3 +-
 configs/devkit8000_defconfig                  |  3 +-
 configs/display5_defconfig                    |  2 +-
 configs/display5_factory_defconfig            |  2 +-
 configs/dns325_defconfig                      |  3 +
 configs/dockstar_defconfig                    |  3 +
 configs/draco_defconfig                       |  4 +-
 configs/ds414_defconfig                       |  3 +-
 configs/ea20_defconfig                        |  4 +-
 configs/eb_cpu5282_defconfig                  |  1 +
 configs/eb_cpu5282_internal_defconfig         |  1 +
 configs/eco5pk_defconfig                      |  4 +-
 configs/ecovec_defconfig                      |  1 +
 configs/edb9315a_defconfig                    |  1 +
 configs/edminiv2_defconfig                    |  1 +
 configs/espt_defconfig                        |  1 +
 configs/etamin_defconfig                      |  4 +-
 configs/ethernut5_defconfig                   |  4 +-
 configs/evb-rv1108_defconfig                  |  1 +
 configs/flea3_defconfig                       |  3 +-
 ...gardena-smart-gateway-mt7688-ram_defconfig |  2 +
 .../gardena-smart-gateway-mt7688_defconfig    |  2 +
 configs/goflexhome_defconfig                  |  3 +
 configs/gose_defconfig                        |  2 +-
 configs/gurnard_defconfig                     |  3 +-
 configs/guruplug_defconfig                    |  3 +
 configs/gwventana_emmc_defconfig              |  3 +-
 configs/gwventana_gw5904_defconfig            |  3 +-
 configs/gwventana_nand_defconfig              |  5 +-
 configs/harmony_defconfig                     |  3 +
 configs/helios4_defconfig                     |  1 +
 configs/hrcon_defconfig                       |  1 +
 configs/hrcon_dh_defconfig                    |  1 +
 configs/huawei_hg556a_ram_defconfig           |  1 +
 configs/ib62x0_defconfig                      |  3 +
 configs/iconnect_defconfig                    |  3 +
 configs/ids8313_defconfig                     |  3 +
 configs/igep0032_defconfig                    |  4 +-
 configs/igep00x0_defconfig                    |  4 +-
 configs/imx6dl_icore_nand_defconfig           |  4 +-
 configs/imx6q_icore_nand_defconfig            |  4 +-
 configs/imx6q_logic_defconfig                 |  5 +-
 configs/imx6qdl_icore_mmc_defconfig           |  4 +-
 configs/imx6qdl_icore_nand_defconfig          |  4 +-
 configs/imx6ul_geam_nand_defconfig            |  4 +-
 configs/imx6ul_isiot_nand_defconfig           |  4 +-
 configs/integratorap_cm720t_defconfig         |  1 +
 configs/integratorap_cm920t_defconfig         |  1 +
 configs/integratorap_cm926ejs_defconfig       |  1 +
 configs/integratorap_cm946es_defconfig        |  1 +
 configs/integratorcp_cm1136_defconfig         |  1 +
 configs/integratorcp_cm920t_defconfig         |  1 +
 configs/integratorcp_cm926ejs_defconfig       |  1 +
 configs/integratorcp_cm946es_defconfig        |  1 +
 configs/ipam390_defconfig                     |  4 +-
 configs/k2e_evm_defconfig                     |  4 +-
 configs/k2e_hs_evm_defconfig                  |  4 +-
 configs/k2g_evm_defconfig                     |  5 +-
 configs/k2g_hs_evm_defconfig                  |  5 +-
 configs/k2hk_evm_defconfig                    |  4 +-
 configs/k2hk_hs_evm_defconfig                 |  4 +-
 configs/k2l_evm_defconfig                     |  4 +-
 configs/k2l_hs_evm_defconfig                  |  4 +-
 configs/khadas-vim2_defconfig                 |  2 +-
 configs/km_kirkwood_128m16_defconfig          |  3 +
 configs/km_kirkwood_defconfig                 |  3 +
 configs/km_kirkwood_pci_defconfig             |  3 +
 configs/kmcoge4_defconfig                     |  2 +
 configs/kmcoge5ne_defconfig                   |  2 +
 configs/kmcoge5un_defconfig                   |  3 +
 configs/kmeter1_defconfig                     |  3 +-
 configs/kmlion1_defconfig                     |  2 +
 configs/kmnusa_defconfig                      |  3 +
 configs/kmopti2_defconfig                     |  3 +-
 configs/kmsugp1_defconfig                     |  3 +
 configs/kmsupx5_defconfig                     |  3 +-
 configs/kmsuv31_defconfig                     |  3 +
 configs/kmtegr1_defconfig                     |  2 +
 configs/kmtepr2_defconfig                     |  3 +-
 configs/kmvect1_defconfig                     |  3 +-
 configs/koelsch_defconfig                     |  2 +-
 configs/kzm9g_defconfig                       |  1 +
 configs/lager_defconfig                       |  2 +-
 configs/linkit-smart-7688-ram_defconfig       |  1 +
 configs/linkit-smart-7688_defconfig           |  1 +
 configs/lion-rk3368_defconfig                 |  1 +
 configs/ls1021aqds_ddr4_nor_defconfig         |  1 +
 configs/ls1021aqds_ddr4_nor_lpuart_defconfig  |  1 +
 configs/ls1021aqds_nand_defconfig             |  2 +
 configs/ls1021aqds_nor_SECURE_BOOT_defconfig  |  1 +
 configs/ls1021aqds_nor_defconfig              |  1 +
 configs/ls1021aqds_nor_lpuart_defconfig       |  1 +
 configs/ls1021aqds_sdcard_ifc_defconfig       |  1 +
 configs/ls1021atwr_nor_SECURE_BOOT_defconfig  |  1 +
 configs/ls1021atwr_nor_defconfig              |  1 +
 configs/ls1021atwr_nor_lpuart_defconfig       |  1 +
 ...s1021atwr_sdcard_ifc_SECURE_BOOT_defconfig |  1 +
 configs/ls1021atwr_sdcard_ifc_defconfig       |  1 +
 configs/ls1043aqds_defconfig                  |  1 +
 configs/ls1043aqds_lpuart_defconfig           |  1 +
 configs/ls1043aqds_nand_defconfig             |  2 +
 configs/ls1043aqds_nor_ddr3_defconfig         |  1 +
 configs/ls1043aqds_sdcard_ifc_defconfig       |  1 +
 configs/ls1043ardb_SECURE_BOOT_defconfig      |  1 +
 configs/ls1043ardb_defconfig                  |  1 +
 configs/ls1043ardb_nand_SECURE_BOOT_defconfig |  2 +
 configs/ls1043ardb_nand_defconfig             |  2 +
 .../ls1043ardb_sdcard_SECURE_BOOT_defconfig   |  1 +
 configs/ls1043ardb_sdcard_defconfig           |  1 +
 configs/ls1046aqds_SECURE_BOOT_defconfig      |  1 +
 configs/ls1046aqds_defconfig                  |  1 +
 configs/ls1046aqds_lpuart_defconfig           |  1 +
 configs/ls1046aqds_nand_defconfig             |  2 +
 configs/ls1046aqds_sdcard_ifc_defconfig       |  1 +
 configs/ls1046ardb_emmc_defconfig             |  2 +
 configs/ls1046ardb_qspi_SECURE_BOOT_defconfig |  2 +
 configs/ls1046ardb_qspi_defconfig             |  2 +
 configs/ls1046ardb_qspi_spl_defconfig         |  2 +
 .../ls1046ardb_sdcard_SECURE_BOOT_defconfig   |  2 +
 configs/ls1046ardb_sdcard_defconfig           |  2 +
 configs/ls1088aqds_defconfig                  |  2 +
 configs/ls1088aqds_qspi_SECURE_BOOT_defconfig |  2 +
 configs/ls1088aqds_qspi_defconfig             |  2 +
 configs/ls1088aqds_sdcard_ifc_defconfig       |  2 +
 configs/ls1088aqds_sdcard_qspi_defconfig      |  2 +
 configs/ls1088ardb_qspi_SECURE_BOOT_defconfig |  2 +
 configs/ls1088ardb_qspi_defconfig             |  2 +
 ...1088ardb_sdcard_qspi_SECURE_BOOT_defconfig |  2 +
 configs/ls1088ardb_sdcard_qspi_defconfig      |  2 +
 configs/ls2080a_simu_defconfig                |  1 +
 configs/ls2080aqds_SECURE_BOOT_defconfig      |  1 +
 configs/ls2080aqds_defconfig                  |  1 +
 configs/ls2080aqds_nand_defconfig             |  2 +
 configs/ls2080aqds_qspi_defconfig             |  2 +
 configs/ls2080aqds_sdcard_defconfig           |  2 +
 configs/ls2080ardb_SECURE_BOOT_defconfig      |  1 +
 configs/ls2080ardb_defconfig                  |  1 +
 configs/ls2080ardb_nand_defconfig             |  2 +
 configs/m53menlo_defconfig                    |  5 +-
 configs/malta64_defconfig                     |  1 +
 configs/malta64el_defconfig                   |  1 +
 configs/malta_defconfig                       |  1 +
 configs/maltael_defconfig                     |  1 +
 configs/mccmon6_nor_defconfig                 |  4 +-
 configs/mccmon6_sd_defconfig                  |  4 +-
 configs/mcx_defconfig                         |  4 +-
 configs/medcom-wide_defconfig                 |  2 +
 configs/meesc_defconfig                       |  3 +-
 configs/mgcoge3un_defconfig                   |  3 +
 configs/microblaze-generic_defconfig          |  2 +-
 configs/mpc8308_p1m_defconfig                 |  1 +
 configs/mpr2_defconfig                        |  1 +
 configs/ms7720se_defconfig                    |  1 +
 configs/ms7722se_defconfig                    |  1 +
 configs/ms7750se_defconfig                    |  1 +
 configs/mt_ventoux_defconfig                  |  4 +-
 configs/mx28evk_auart_console_defconfig       |  5 +-
 configs/mx28evk_defconfig                     |  5 +-
 configs/mx28evk_nand_defconfig                |  5 +-
 configs/mx28evk_spi_defconfig                 |  5 +-
 configs/mx31pdk_defconfig                     |  3 +-
 configs/mx35pdk_defconfig                     |  3 +-
 configs/mx53ard_defconfig                     |  3 +-
 configs/mx6sabreauto_defconfig                |  4 +-
 configs/mx6sxsabreauto_defconfig              |  4 +-
 configs/nas220_defconfig                      |  3 +
 configs/netgear_cg3100d_ram_defconfig         |  1 +
 configs/nsa310s_defconfig                     |  3 +
 configs/omap35_logic_defconfig                |  4 +-
 configs/omap35_logic_somlv_defconfig          |  4 +-
 configs/omap3_beagle_defconfig                |  4 +-
 configs/omap3_evm_defconfig                   |  4 +-
 configs/omap3_ha_defconfig                    |  3 +-
 configs/omap3_logic_defconfig                 |  4 +-
 configs/omap3_logic_somlv_defconfig           |  4 +-
 configs/omap3_overo_defconfig                 |  4 +-
 configs/omap3_pandora_defconfig               |  4 +-
 configs/omap3_zoom1_defconfig                 |  3 +-
 configs/omapl138_lcdk_defconfig               |  4 +-
 configs/openrd_base_defconfig                 |  3 +
 configs/openrd_client_defconfig               |  3 +
 configs/openrd_ultimate_defconfig             |  3 +
 configs/pcm052_defconfig                      |  4 +
 configs/pcm058_defconfig                      |  5 +-
 configs/pengwyn_defconfig                     |  3 +-
 configs/pfla02_defconfig                      |  4 +-
 configs/platinum_picon_defconfig              |  5 +-
 configs/platinum_titanium_defconfig           |  5 +-
 configs/plutux_defconfig                      |  2 +
 configs/pm9261_defconfig                      |  3 +-
 configs/pm9263_defconfig                      |  3 +-
 configs/pm9g45_defconfig                      |  3 +-
 configs/pogo_e02_defconfig                    |  3 +
 configs/porter_defconfig                      |  2 +-
 configs/portl2_defconfig                      |  3 +
 configs/pxm2_defconfig                        |  4 +-
 configs/qemu_mips64_defconfig                 |  1 +
 configs/qemu_mips64el_defconfig               |  1 +
 configs/qemu_mips_defconfig                   |  1 +
 configs/qemu_mipsel_defconfig                 |  1 +
 configs/r0p7734_defconfig                     |  1 +
 configs/r2dplus_defconfig                     |  1 +
 configs/r7780mp_defconfig                     |  1 +
 configs/r8a77995_draak_defconfig              |  2 +-
 configs/rastaban_defconfig                    |  4 +-
 configs/rsk7203_defconfig                     |  1 +
 configs/rsk7264_defconfig                     |  1 +
 configs/rsk7269_defconfig                     |  1 +
 configs/rut_defconfig                         |  4 +-
 configs/s5pc210_universal_defconfig           |  2 +-
 configs/sagem_f at st1704_ram_defconfig          |  1 +
 configs/sama5d2_ptc_ek_mmc_defconfig          |  3 +-
 configs/sama5d2_ptc_ek_nandflash_defconfig    |  2 +
 configs/sama5d36ek_cmp_mmc_defconfig          |  3 +-
 configs/sama5d36ek_cmp_nandflash_defconfig    |  2 +
 configs/sama5d36ek_cmp_spiflash_defconfig     |  3 +-
 configs/sama5d3_xplained_mmc_defconfig        |  4 +-
 configs/sama5d3_xplained_nandflash_defconfig  |  3 +
 configs/sama5d3xek_mmc_defconfig              |  3 +-
 configs/sama5d3xek_nandflash_defconfig        |  2 +
 configs/sama5d3xek_spiflash_defconfig         |  3 +-
 configs/sama5d4_xplained_mmc_defconfig        |  3 +-
 configs/sama5d4_xplained_nandflash_defconfig  |  2 +
 configs/sama5d4_xplained_spiflash_defconfig   |  3 +-
 configs/sama5d4ek_mmc_defconfig               |  3 +-
 configs/sama5d4ek_nandflash_defconfig         |  2 +
 configs/sama5d4ek_spiflash_defconfig          |  3 +-
 configs/sandbox64_defconfig                   |  1 +
 configs/sandbox_defconfig                     |  1 +
 configs/sbc8349_PCI_33_defconfig              |  1 +
 configs/sbc8349_PCI_66_defconfig              |  1 +
 configs/sbc8349_defconfig                     |  1 +
 configs/sbc8548_PCI_33_PCIE_defconfig         |  1 +
 configs/sbc8548_PCI_33_defconfig              |  1 +
 configs/sbc8548_PCI_66_PCIE_defconfig         |  1 +
 configs/sbc8548_PCI_66_defconfig              |  1 +
 configs/sbc8548_defconfig                     |  1 +
 configs/sbc8641d_defconfig                    |  1 +
 configs/seaboard_defconfig                    |  2 +
 configs/sfr_nb4-ser_ram_defconfig             |  1 +
 configs/sh7763rdp_defconfig                   |  1 +
 configs/sh7785lcr_32bit_defconfig             |  1 +
 configs/sh7785lcr_defconfig                   |  1 +
 configs/sheevaplug_defconfig                  |  3 +
 configs/shmin_defconfig                       |  1 +
 configs/silk_defconfig                        |  2 +-
 configs/smartweb_defconfig                    |  3 +-
 configs/smdkc100_defconfig                    |  2 +-
 configs/snapper9260_defconfig                 |  3 +-
 configs/snapper9g20_defconfig                 |  3 +-
 configs/socfpga_arria10_defconfig             |  2 +-
 configs/socfpga_arria5_defconfig              |  3 +-
 configs/socfpga_cyclone5_defconfig            |  3 +-
 configs/socfpga_dbm_soc1_defconfig            |  2 +-
 configs/socfpga_de0_nano_soc_defconfig        |  3 +-
 configs/socfpga_de10_nano_defconfig           |  2 +-
 configs/socfpga_de1_soc_defconfig             |  2 +-
 configs/socfpga_is1_defconfig                 |  3 +-
 configs/socfpga_sockit_defconfig              |  3 +-
 configs/socfpga_socrates_defconfig            |  3 +-
 configs/socfpga_sr1500_defconfig              |  3 +-
 configs/socfpga_stratix10_defconfig           |  1 +
 configs/socfpga_vining_fpga_defconfig         |  3 +-
 configs/socrates_defconfig                    |  1 +
 configs/spear300_defconfig                    |  2 +-
 configs/spear300_nand_defconfig               |  4 +-
 configs/spear300_usbtty_defconfig             |  2 +-
 configs/spear300_usbtty_nand_defconfig        |  4 +-
 configs/spear310_defconfig                    |  2 +-
 configs/spear310_nand_defconfig               |  4 +-
 configs/spear310_pnor_defconfig               |  2 +-
 configs/spear310_usbtty_defconfig             |  2 +-
 configs/spear310_usbtty_nand_defconfig        |  4 +-
 configs/spear310_usbtty_pnor_defconfig        |  2 +-
 configs/spear320_defconfig                    |  2 +-
 configs/spear320_nand_defconfig               |  4 +-
 configs/spear320_pnor_defconfig               |  2 +-
 configs/spear320_usbtty_defconfig             |  2 +-
 configs/spear320_usbtty_nand_defconfig        |  4 +-
 configs/spear320_usbtty_pnor_defconfig        |  2 +-
 configs/spear600_defconfig                    |  2 +-
 configs/spear600_nand_defconfig               |  4 +-
 configs/spear600_usbtty_defconfig             |  2 +-
 configs/spear600_usbtty_nand_defconfig        |  4 +-
 configs/stm32f429-discovery_defconfig         |  1 +
 configs/stm32f429-evaluation_defconfig        |  1 +
 configs/stm32f469-discovery_defconfig         |  1 +
 configs/stm32f746-disco_defconfig             |  3 +-
 configs/stmark2_defconfig                     |  2 +-
 configs/stout_defconfig                       |  2 +-
 configs/strider_con_defconfig                 |  1 +
 configs/strider_con_dp_defconfig              |  1 +
 configs/strider_cpu_defconfig                 |  1 +
 configs/strider_cpu_dp_defconfig              |  1 +
 configs/suvd3_defconfig                       |  3 +-
 configs/tao3530_defconfig                     |  3 +-
 configs/taurus_defconfig                      |  3 +-
 configs/tec_defconfig                         |  2 +
 configs/thuban_defconfig                      |  4 +-
 configs/ti816x_evm_defconfig                  |  3 +-
 configs/titanium_defconfig                    |  5 +-
 configs/tplink_wdr4300_defconfig              |  1 +
 configs/tricorder_defconfig                   |  4 +-
 configs/tricorder_flash_defconfig             |  4 +-
 configs/tuge1_defconfig                       |  3 +-
 configs/turris_mox_defconfig                  |  1 +
 configs/tuxx1_defconfig                       |  3 +-
 configs/twister_defconfig                     |  4 +-
 configs/uniphier_ld4_sld8_defconfig           |  4 +-
 configs/uniphier_v7_defconfig                 |  4 +-
 configs/uniphier_v8_defconfig                 |  4 +-
 configs/usb_a9263_dataflash_defconfig         |  3 +-
 configs/vct_platinum_defconfig                |  1 +
 configs/vct_platinum_onenand_defconfig        |  3 +-
 configs/vct_platinum_onenand_small_defconfig  |  3 +-
 configs/vct_platinum_small_defconfig          |  1 +
 configs/vct_platinumavc_defconfig             |  1 +
 configs/vct_platinumavc_onenand_defconfig     |  3 +-
 .../vct_platinumavc_onenand_small_defconfig   |  3 +-
 configs/vct_platinumavc_small_defconfig       |  1 +
 configs/vct_premium_defconfig                 |  1 +
 configs/vct_premium_onenand_defconfig         |  3 +-
 configs/vct_premium_onenand_small_defconfig   |  3 +-
 configs/vct_premium_small_defconfig           |  1 +
 configs/ve8313_defconfig                      |  1 +
 configs/vexpress_aemv8a_dram_defconfig        |  1 +
 configs/vexpress_aemv8a_juno_defconfig        |  1 +
 configs/vexpress_aemv8a_semi_defconfig        |  1 +
 configs/vexpress_ca15_tc2_defconfig           |  1 +
 configs/vexpress_ca5x2_defconfig              |  1 +
 configs/vexpress_ca9x4_defconfig              |  1 +
 configs/vf610twr_defconfig                    |  4 +
 configs/vf610twr_nand_defconfig               |  4 +
 configs/vme8349_defconfig                     |  1 +
 configs/wb45n_defconfig                       |  3 +-
 configs/wb50n_defconfig                       |  3 +-
 configs/woodburn_defconfig                    |  3 +-
 configs/woodburn_sd_defconfig                 |  3 +-
 configs/work_92105_defconfig                  |  2 +
 configs/x600_defconfig                        |  3 +
 configs/xilinx_zynqmp_mini_nand_defconfig     |  3 +-
 .../xilinx_zynqmp_zc1751_xm016_dc2_defconfig  |  5 +-
 .../xilinx_zynqmp_zc1751_xm017_dc3_defconfig  |  4 +-
 configs/xpedite517x_defconfig                 |  1 +
 configs/xpedite520x_defconfig                 |  1 +
 configs/xpedite537x_defconfig                 |  1 +
 configs/xpedite550x_defconfig                 |  1 +
 configs/xtfpga_defconfig                      |  1 +
 configs/zipitz2_defconfig                     |  1 +
 configs/zmx25_defconfig                       |  1 +
 configs/zynq_cse_nand_defconfig               |  4 +-
 configs/zynq_cse_nor_defconfig                |  1 +
 configs/zynq_zc770_xm011_defconfig            |  5 +-
 configs/zynq_zc770_xm011_x16_defconfig        |  5 +-
 configs/zynq_zc770_xm012_defconfig            |  1 +
 drivers/Makefile                              |  7 +-
 drivers/dfu/Kconfig                           |  1 +
 drivers/mtd/Kconfig                           | 13 +--
 drivers/mtd/Makefile                          | 50 +++++++---
 drivers/mtd/mtd_uboot.c                       | 96 +-----------------
 drivers/mtd/nand/Makefile                     |  5 +
 drivers/mtd/nand/bbt.c                        |  1 +
 drivers/mtd/nand/core.c                       |  1 +
 drivers/mtd/nand/raw/Kconfig                  |  4 +-
 drivers/mtd/nand/raw/nand.c                   |  2 +-
 drivers/mtd/onenand/onenand_uboot.c           |  2 +-
 drivers/mtd/spi/Kconfig                       |  2 +-
 env/Kconfig                                   |  2 +
 include/configs/B4860QDS.h                    | 10 +-
 include/configs/BSC9131RDB.h                  |  4 +-
 include/configs/BSC9132QDS.h                  |  8 +-
 include/configs/C29XPCIE.h                    |  8 +-
 include/configs/MPC8313ERDB.h                 | 14 +--
 include/configs/P1010RDB.h                    | 12 +--
 include/configs/P1022DS.h                     | 10 +-
 include/configs/P2041RDB.h                    |  6 +-
 include/configs/T102xQDS.h                    |  8 +-
 include/configs/T102xRDB.h                    |  8 +-
 include/configs/T1040QDS.h                    |  6 +-
 include/configs/T104xRDB.h                    | 12 +--
 include/configs/T208xQDS.h                    |  8 +-
 include/configs/T208xRDB.h                    |  8 +-
 include/configs/T4240QDS.h                    | 10 +-
 include/configs/T4240RDB.h                    |  6 +-
 include/configs/am335x_evm.h                  |  6 +-
 include/configs/am3517_evm.h                  |  6 +-
 include/configs/am43xx_evm.h                  |  6 +-
 include/configs/baltos.h                      |  6 +-
 include/configs/bav335x.h                     |  8 +-
 include/configs/brppt1.h                      | 16 +--
 include/configs/corenet_ds.h                  |  8 +-
 include/configs/da850evm.h                    |  4 +-
 include/configs/dra7xx_evm.h                  |  4 +-
 include/configs/ls2080ardb.h                  |  2 +-
 include/configs/mvebu_armada-37xx.h           |  1 -
 include/configs/omap3_beagle.h                | 10 +-
 include/configs/omap3_evm.h                   | 10 +-
 include/configs/omap3_logic.h                 |  2 +-
 include/configs/omap3_overo.h                 |  6 +-
 include/configs/omap3_pandora.h               |  2 +-
 include/configs/omapl138_lcdk.h               |  4 +-
 include/configs/p1_p2_rdb_pc.h                |  8 +-
 include/configs/siemens-am33x-common.h        |  2 +-
 include/configs/socfpga_stratix10_socdk.h     |  1 -
 include/configs/ti_armv7_common.h             |  2 +-
 include/configs/ti_armv7_omap.h               |  2 +-
 include/configs/ti_omap3_common.h             |  2 +-
 include/environment.h                         |  4 +-
 include/environment/ti/dfu.h                  |  2 +-
 include/flash.h                               |  2 +-
 include/linux/mtd/mtd.h                       |  6 --
 844 files changed, 1588 insertions(+), 621 deletions(-)
 create mode 100644 cmd/legacy-mtd-utils.c
 create mode 100644 cmd/legacy-mtd-utils.h
Signature · 2 lines
Regards
Vignesh
author maintainer
#30 lore raw

v4 cover MTD defconfigs/Kconfigs/Makefiles heavy cleanup

Hi Vignesh,

Vignesh R <[email protected]> wrote on Wed, 20 Feb 2019 10:50:18 +0530:

Quoted 32 lines

Hi Jagan,

Quoted 21 lines · Miquel Raynal

Hello,

During my last project about SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the root Makefile
* Commands are at the root of everything

I sent a fist series a few weeks ago to move Makefile entries in their respective directories (which needed to be reworked). Since then, I have been working on clarifying all this for the MTD subsystem and here are the main points of such re-organization:
* Rename CONFIG_MTD into CONFIG_DM_MTD to reserve CONFIG_MTD to what is called today CONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix the Kconfig files to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling the drivers/mtd/nand/raw/ sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend on CMD_NAND.

Quoted 7 lines

New green Travis CI build for the third version of this series:
https://travis-ci.org/miquelraynal/u-boot/builds/463486099
There are three Sandbox tests that are failing, they have not been break by this series. The following Travis test has been done on the commit on which has been based the series and shows the same errors:
https://travis-ci.org/miquelraynal/u-boot/builds/463593006

Quoted 4 lines

I would like to revive this series. With some rebasing, this series should still apply as is.

Jagan, did you get a chance to look into this series? Any comments?

Thanks for reviving the series, actually I was sure it was merged by that time as AFAIR there was no more opposition to it.

Jagan, I see it is still marked 'new' on patchwork and assigned to you, would you mind applying it?

Thanks,
Miquèl

author maintainer
#31 lore raw

v4 cover MTD defconfigs/Kconfigs/Makefiles heavy cleanup

Hi Jagan,

Miquel Raynal <[email protected]> wrote on Wed, 20 Feb 2019 08:08:58 +0100:

Quoted 39 lines

Hi Vignesh,

Vignesh R <[email protected]> wrote on Wed, 20 Feb 2019 10:50:18 +0530:

Quoted 35 lines

Hi Jagan,

Quoted 21 lines · Miquel Raynal

Hello,

During my last project about SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the root Makefile
* Commands are at the root of everything

I sent a fist series a few weeks ago to move Makefile entries in their respective directories (which needed to be reworked). Since then, I have been working on clarifying all this for the MTD subsystem and here are the main points of such re-organization:
* Rename CONFIG_MTD into CONFIG_DM_MTD to reserve CONFIG_MTD to what is called today CONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix the Kconfig files to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling the drivers/mtd/nand/raw/ sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend on CMD_NAND.

Quoted 7 lines

New green Travis CI build for the third version of this series:
https://travis-ci.org/miquelraynal/u-boot/builds/463486099
There are three Sandbox tests that are failing, they have not been break by this series. The following Travis test has been done on the commit on which has been based the series and shows the same errors:
https://travis-ci.org/miquelraynal/u-boot/builds/463593006

I would like to revive this series. With some rebasing, this series should still apply as is.

Quoted 7 lines
Quoted 1 line

Jagan, did you get a chance to look into this series? Any comments?

Thanks for reviving the series, actually I was sure it was merged by that time as AFAIR there was no more opposition to it.

Jagan, I see it is still marked 'new' on patchwork and assigned to you, would you mind applying it?

Gentle 3-month-later ping. Jagan, please consider this series.

Thanks,
Miquèl

author maintainer
#32 lore raw

v4 cover MTD defconfigs/Kconfigs/Makefiles heavy cleanup

Jagan,

Miquel Raynal <[email protected]> wrote on Wed, 6 Mar 2019 10:21:44 +0100:

Quoted 46 lines

Hi Jagan,

Miquel Raynal <[email protected]> wrote on Wed, 20 Feb 2019 08:08:58 +0100:

Quoted 41 lines

Hi Vignesh,

Vignesh R <[email protected]> wrote on Wed, 20 Feb 2019 10:50:18 +0530:

Quoted 36 lines

Hi Jagan,

Quoted 21 lines · Miquel Raynal

Hello,

During my last project about SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the root Makefile
* Commands are at the root of everything

I sent a fist series a few weeks ago to move Makefile entries in their respective directories (which needed to be reworked). Since then, I have been working on clarifying all this for the MTD subsystem and here are the main points of such re-organization:
* Rename CONFIG_MTD into CONFIG_DM_MTD to reserve CONFIG_MTD to what is called today CONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix the Kconfig files to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling the drivers/mtd/nand/raw/ sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend on CMD_NAND.

Quoted 7 lines

New green Travis CI build for the third version of this series:
https://travis-ci.org/miquelraynal/u-boot/builds/463486099
There are three Sandbox tests that are failing, they have not been break by this series. The following Travis test has been done on the commit on which has been based the series and shows the same errors:
https://travis-ci.org/miquelraynal/u-boot/builds/463593006

I would like to revive this series. With some rebasing, this series should still apply as is.

Jagan, did you get a chance to look into this series? Any comments?

Quoted 8 lines
Quoted 5 lines

Thanks for reviving the series, actually I was sure it was merged by that time as AFAIR there was no more opposition to it.

Jagan, I see it is still marked 'new' on patchwork and assigned to you, would you mind applying it?

Gentle 3-month-later ping. Jagan, please consider this series.

Almost two more weeks passed, I think I deserved some feedback now.

This series IMHO improves the MTD layer, it passed Travis CI and has been ready for months. It is very likely that some rebase is needed but I am not willing to spend more time on something you will just throw away for no reason.

Thanks,
Miquèl

#33 lore raw

v4 cover MTD defconfigs/Kconfigs/Makefiles heavy cleanup

Quoted 60 lines · Miquel Raynal

Jagan,

Miquel Raynal <[email protected]> wrote on Wed, 6 Mar 2019 10:21:44 +0100:

Quoted 46 lines

Hi Jagan,

Miquel Raynal <[email protected]> wrote on Wed, 20 Feb 2019 08:08:58 +0100:

Quoted 41 lines

Hi Vignesh,

Vignesh R <[email protected]> wrote on Wed, 20 Feb 2019 10:50:18 +0530:

Quoted 36 lines

Hi Jagan,

Quoted 21 lines · Miquel Raynal

Hello,

During my last project about SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the root Makefile
* Commands are at the root of everything

I sent a fist series a few weeks ago to move Makefile entries in their respective directories (which needed to be reworked). Since then, I have been working on clarifying all this for the MTD subsystem and here are the main points of such re-organization:
* Rename CONFIG_MTD into CONFIG_DM_MTD to reserve CONFIG_MTD to what is called today CONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix the Kconfig files to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling the drivers/mtd/nand/raw/ sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend on CMD_NAND.

Quoted 7 lines

New green Travis CI build for the third version of this series:
https://travis-ci.org/miquelraynal/u-boot/builds/463486099
There are three Sandbox tests that are failing, they have not been break by this series. The following Travis test has been done on the commit on which has been based the series and shows the same errors:
https://travis-ci.org/miquelraynal/u-boot/builds/463593006

I would like to revive this series. With some rebasing, this series should still apply as is.

Jagan, did you get a chance to look into this series? Any comments?

Quoted 8 lines
Quoted 5 lines

Thanks for reviving the series, actually I was sure it was merged by that time as AFAIR there was no more opposition to it.

Jagan, I see it is still marked 'new' on patchwork and assigned to you, would you mind applying it?

Gentle 3-month-later ping. Jagan, please consider this series.

Quoted 6 lines

Almost two more weeks passed, I think I deserved some feedback now.

This series IMHO improves the MTD layer, it passed Travis CI and has been ready for months. It is very likely that some rebase is needed but I am not willing to spend more time on something you will just throw away for no reason.

Jagan, can you please comment? This sounds like something we should pick up in the next merge window, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190317/19ada913/attachment.sig>
#34 lore raw

v4 cover MTD defconfigs/Kconfigs/Makefiles heavy cleanup

In reply to Miquel Raynal

Hi Miquel,

Quoted 61 lines · Miquel Raynal

Jagan,

Miquel Raynal <[email protected]> wrote on Wed, 6 Mar 2019 10:21:44 +0100:

Quoted 46 lines

Hi Jagan,

Miquel Raynal <[email protected]> wrote on Wed, 20 Feb 2019 08:08:58 +0100:

Quoted 41 lines

Hi Vignesh,

Vignesh R <[email protected]> wrote on Wed, 20 Feb 2019 10:50:18 +0530:

Quoted 36 lines

Hi Jagan,

Quoted 21 lines · Miquel Raynal

Hello,

During my last project about SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the root Makefile
* Commands are at the root of everything

I sent a fist series a few weeks ago to move Makefile entries in their respective directories (which needed to be reworked). Since then, I have been working on clarifying all this for the MTD subsystem and here are the main points of such re-organization:
* Rename CONFIG_MTD into CONFIG_DM_MTD to reserve CONFIG_MTD to what is called today CONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix the Kconfig files to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling the drivers/mtd/nand/raw/ sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend on CMD_NAND.

Quoted 7 lines

New green Travis CI build for the third version of this series:
https://travis-ci.org/miquelraynal/u-boot/builds/463486099
There are three Sandbox tests that are failing, they have not been break by this series. The following Travis test has been done on the commit on which has been based the series and shows the same errors:
https://travis-ci.org/miquelraynal/u-boot/builds/463593006

I would like to revive this series. With some rebasing, this series should still apply as is.

Jagan, did you get a chance to look into this series? Any comments?

Quoted 8 lines
Quoted 5 lines

Thanks for reviving the series, actually I was sure it was merged by that time as AFAIR there was no more opposition to it.

Jagan, I see it is still marked 'new' on patchwork and assigned to you, would you mind applying it?

Gentle 3-month-later ping. Jagan, please consider this series.

Quoted 6 lines

Almost two more weeks passed, I think I deserved some feedback now.

This series IMHO improves the MTD layer, it passed Travis CI and has been ready for months. It is very likely that some rebase is needed but I am not willing to spend more time on something you will just throw away for no reason.

Yes, it's late from my end, will have a look at and comment asap.

Jagan.

#35 lore raw

v4 cover MTD defconfigs/Kconfigs/Makefiles heavy cleanup

In reply to Miquel Raynal
Quoted 98 lines · Miquel Raynal

Hello,

During my last project about SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the root Makefile
* Commands are at the root of everything

I sent a fist series a few weeks ago to move Makefile entries in their respective directories (which needed to be reworked). Since then, I have been working on clarifying all this for the MTD subsystem and here are the main points of such re-organization:
* Rename CONFIG_MTD into CONFIG_DM_MTD to reserve CONFIG_MTD to what is called today CONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix the Kconfig files to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling the drivers/mtd/nand/raw/ sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend on CMD_NAND.

New green Travis CI build for the third version of this series:
https://travis-ci.org/miquelraynal/u-boot/builds/463486099
There are three Sandbox tests that are failing, they have not been break by this series. The following Travis test has been done on the commit on which has been based the series and shows the same errors:
https://travis-ci.org/miquelraynal/u-boot/builds/463593006

Thanks,
Miquèl

Note: as the number of Cc:'ed people reached 184 with get_maintainers.pl I decided to trim the list to:
* People interested by the MTD subsystem.
* A few maintainers: I had to tweak some defconfigs after more digging than with other boards (k2g, bcm11130, M54418TWR). Maintainers of these platforms are Cc:'ed.

Changes since v3:
=================
* As suggested by Vignesh, SPI_FLASH_MTD depends on MTD. Enforce this in Kconfig with a new patch. There is no defconfig to fix, all defconfigs with SPI_FLASH_MTD already use MTD.
* s/coherent Makefile/appropriate Makefile/ in commit title of patch 1.
* s/Kconfig/Makefile in commit message of "mtd: nand: remove dependency on commands in Kconfig" and "mtd: ubi: remove dependency on command in Kconfig".
* Add Boris R-b tags.
* Correct typos pointed by Boris.
* Remove the if/endif in cmd/Kconfig about mtdparts, let the "depends on" that was already present.
* Use an if/endif block to compile legacy-mtd-utils.c (to avoid failures when both 'sf' and 'nand' commands are compiled-in).
* Merge all Makefile changes in one consistent commit as suggested by Boris.

Changes since v2:
=================
* Cleanup also applied to the SPL in an additional patch.
* NOR dependency on MTD extracted from the patch adding MTD dependencies on commands only to do it in a separate change.
* Typo s/copile/compile/ in "rename CONFIG_MTD_DEVICE..." commit log.
* No more MTD depencency on SPI_FLASH, only kept on SPI_FLASH_MTD.
* Same applies to the sf command.
* Avoid compiling the NAND core while it is not needed (not speaking about the raw NAND core, really what is in drivers/mtd/nand:).
* Last patch dropping CONFIG_MTD_PARTITIONS forgotten. We need them in order to reduce the final binary size.
* Additional fixes in cmd/Kconfig.

Changes since v1:
=================
* Squashed both patches from the first series and included them in "mtd: simplify Makefiles".
* Added all other patches.
* Renamed CONFIG_NAND into CONFIG_MTD_RAW_NAND as suggested.

Miquel Raynal (25):
mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND
mtd: rename CONFIG_MTD -> CONFIG_DM_MTD
mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD
mtd: ensure MTD is compiled when there is a NOR flash
mtd: ensure MTD/the raw NAND core are compiled when there is a NAND
flash
mtd: ensure MTD is compiled when there is a SPI NOR flash using MTD
mtd: ensure UBI is compiled when using fastmap
mtd: ensure MTD is compiled when UBI is used
mtd: ensure UBI is compiled when CMD_UBI is selected
mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selected
mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selected
mtd: ensure MTD and NOR drivers are compiled with ENV_IS_IN_FLASH
mtd: ensure CMD_NAND is compiled when its options are selected
mtd: ensure MTD is compiled when CMD_MTDPARTS is selected
configs: move CONFIG_MTD in defconfigs when set in arch includes
configs: remove raw NAND core from k2g defconfigs
configs: remove MTD support from bcm11130 and M54418TWR defconfigs

Quoted 8 lines

mtd: nand: add includes in NAND core to avoid warnings
dfu: add dependency on the raw NAND core
mtd: nor: NOR flashes depend on MTD
mtd: spi: SPI_FLASH_MTD depends on MTD
cmd: mtdparts: Kconfig: join mtdparts command entry with its options
cmd: nand/sf: isolate legacy code
cmd: make MTD commands depend on MTD
mtd: Makefile: deep cleanup

Miquel, Can you send the rebase version. look unable to apply on master.

author maintainer
#36 lore raw

v4 cover MTD defconfigs/Kconfigs/Makefiles heavy cleanup

Hi Jagan,

Jagan Teki <[email protected]> wrote on Fri, 12 Apr 2019 11:13:21 +0530:

Quoted 108 lines · Miquel Raynal
Quoted 98 lines

Hello,

During my last project about SPI-NAND support in U-Boot, I discovered when modifying Makefiles a confusing organization where:
* Sub-directories/files are compiled from the root Makefile
* Commands are at the root of everything

I sent a fist series a few weeks ago to move Makefile entries in their respective directories (which needed to be reworked). Since then, I have been working on clarifying all this for the MTD subsystem and here are the main points of such re-organization:
* Rename CONFIG_MTD into CONFIG_DM_MTD to reserve CONFIG_MTD to what is called today CONFIG_MTD_DEVICE.
* Fix build dependencies in defconfigs, like: "UBI and NAND depend on MTD".
* Fix the Kconfig files to reflect these dependencies (as defconfigs have been updated, nothing should break).
* Simplify the Makefiles: compiling the drivers/mtd/nand/raw/ sub-directory should just depend on MTD being compiled and the NAND core as well, there is absolutely no logic to make it depend on CMD_NAND.

New green Travis CI build for the third version of this series:
https://travis-ci.org/miquelraynal/u-boot/builds/463486099
There are three Sandbox tests that are failing, they have not been break by this series. The following Travis test has been done on the commit on which has been based the series and shows the same errors:
https://travis-ci.org/miquelraynal/u-boot/builds/463593006

Thanks,
Miquèl

Note: as the number of Cc:'ed people reached 184 with get_maintainers.pl I decided to trim the list to:
* People interested by the MTD subsystem.
* A few maintainers: I had to tweak some defconfigs after more digging than with other boards (k2g, bcm11130, M54418TWR). Maintainers of these platforms are Cc:'ed.

Changes since v3:
=================
* As suggested by Vignesh, SPI_FLASH_MTD depends on MTD. Enforce this in Kconfig with a new patch. There is no defconfig to fix, all defconfigs with SPI_FLASH_MTD already use MTD.
* s/coherent Makefile/appropriate Makefile/ in commit title of patch 1.
* s/Kconfig/Makefile in commit message of "mtd: nand: remove dependency on commands in Kconfig" and "mtd: ubi: remove dependency on command in Kconfig".
* Add Boris R-b tags.
* Correct typos pointed by Boris.
* Remove the if/endif in cmd/Kconfig about mtdparts, let the "depends on" that was already present.
* Use an if/endif block to compile legacy-mtd-utils.c (to avoid failures when both 'sf' and 'nand' commands are compiled-in).
* Merge all Makefile changes in one consistent commit as suggested by Boris.

Changes since v2:
=================
* Cleanup also applied to the SPL in an additional patch.
* NOR dependency on MTD extracted from the patch adding MTD dependencies on commands only to do it in a separate change.
* Typo s/copile/compile/ in "rename CONFIG_MTD_DEVICE..." commit log.
* No more MTD depencency on SPI_FLASH, only kept on SPI_FLASH_MTD.
* Same applies to the sf command.
* Avoid compiling the NAND core while it is not needed (not speaking about the raw NAND core, really what is in drivers/mtd/nand:).
* Last patch dropping CONFIG_MTD_PARTITIONS forgotten. We need them in order to reduce the final binary size.
* Additional fixes in cmd/Kconfig.

Changes since v1:
=================
* Squashed both patches from the first series and included them in "mtd: simplify Makefiles".
* Added all other patches.
* Renamed CONFIG_NAND into CONFIG_MTD_RAW_NAND as suggested.

Miquel Raynal (25):
mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND
mtd: rename CONFIG_MTD -> CONFIG_DM_MTD
mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD
mtd: ensure MTD is compiled when there is a NOR flash
mtd: ensure MTD/the raw NAND core are compiled when there is a NAND
flash
mtd: ensure MTD is compiled when there is a SPI NOR flash using MTD
mtd: ensure UBI is compiled when using fastmap
mtd: ensure MTD is compiled when UBI is used
mtd: ensure UBI is compiled when CMD_UBI is selected
mtd: ensure UBI is compiled when ENV_IS_IN_UBI is selected
mtd: ensure MTD_RAW_NAND is compiled when ENV_IS_IN_NAND is selected
mtd: ensure MTD and NOR drivers are compiled with ENV_IS_IN_FLASH
mtd: ensure CMD_NAND is compiled when its options are selected
mtd: ensure MTD is compiled when CMD_MTDPARTS is selected
configs: move CONFIG_MTD in defconfigs when set in arch includes
configs: remove raw NAND core from k2g defconfigs
configs: remove MTD support from bcm11130 and M54418TWR defconfigs

Quoted 8 lines

mtd: nand: add includes in NAND core to avoid warnings
dfu: add dependency on the raw NAND core
mtd: nor: NOR flashes depend on MTD
mtd: spi: SPI_FLASH_MTD depends on MTD
cmd: mtdparts: Kconfig: join mtdparts command entry with its options
cmd: nand/sf: isolate legacy code
cmd: make MTD commands depend on MTD
mtd: Makefile: deep cleanup

Quoted 1 line

Miquel, Can you send the rebase version. look unable to apply on master.

Sure, I rebased this work but I have new Travis errors, I haven't checked yet. I will get you updated.

Thanks,
Miquèl