aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/Kconfig2
-rw-r--r--configs/10m50_defconfig2
-rw-r--r--configs/TQM834x_defconfig2
-rw-r--r--configs/TWR-P1025_defconfig2
-rw-r--r--configs/alt_defconfig2
-rw-r--r--configs/arndale_defconfig1
-rw-r--r--configs/bcm7260_defconfig1
-rw-r--r--configs/bcm7445_defconfig1
-rw-r--r--configs/bitmain_antminer_s9_defconfig2
-rw-r--r--configs/blanche_defconfig1
-rw-r--r--configs/brppt1_spi_defconfig2
-rw-r--r--configs/chromebit_mickey_defconfig1
-rw-r--r--configs/chromebook_jerry_defconfig1
-rw-r--r--configs/chromebook_minnie_defconfig1
-rw-r--r--configs/chromebook_speedy_defconfig1
-rw-r--r--configs/cl-som-imx7_defconfig1
-rw-r--r--configs/colibri_imx7_emmc_defconfig1
-rw-r--r--configs/crs305-1g-4s_defconfig2
-rw-r--r--configs/da850evm_defconfig2
-rw-r--r--configs/db-xc3-24g4xg_defconfig2
-rw-r--r--configs/display5_defconfig2
-rw-r--r--configs/display5_factory_defconfig2
-rw-r--r--configs/ds414_defconfig2
-rw-r--r--configs/evb-rk3036_defconfig1
-rw-r--r--configs/evb-rk3128_defconfig1
-rw-r--r--configs/evb-rk3229_defconfig1
-rw-r--r--configs/evb-rk3288_defconfig1
-rw-r--r--configs/firefly-rk3288_defconfig1
-rw-r--r--configs/gose_defconfig2
-rw-r--r--configs/gwventana_emmc_defconfig2
-rw-r--r--configs/gwventana_gw5904_defconfig2
-rw-r--r--configs/imx6dl_mamoj_defconfig1
-rw-r--r--configs/imx6qdl_icore_mipi_defconfig1
-rw-r--r--configs/imx6qdl_icore_rqs_defconfig1
-rw-r--r--configs/imx6ul_geam_mmc_defconfig1
-rw-r--r--configs/imx6ul_isiot_emmc_defconfig1
-rw-r--r--configs/j721e_evm_a72_defconfig2
-rw-r--r--configs/k2g_evm_defconfig1
-rw-r--r--configs/k2g_hs_evm_defconfig1
-rw-r--r--configs/kmeter1_defconfig2
-rw-r--r--configs/kmopti2_defconfig2
-rw-r--r--configs/kmsupx5_defconfig2
-rw-r--r--configs/kmtepr2_defconfig2
-rw-r--r--configs/koelsch_defconfig2
-rw-r--r--configs/kp_imx53_defconfig1
-rw-r--r--configs/kylin-rk3036_defconfig1
-rw-r--r--configs/kzm9g_defconfig1
-rw-r--r--configs/lager_defconfig2
-rw-r--r--configs/liteboard_defconfig1
-rw-r--r--configs/ls1021aiot_qspi_defconfig1
-rw-r--r--configs/ls1021aiot_sdcard_defconfig1
-rw-r--r--configs/ls1021aqds_ddr4_nor_defconfig1
-rw-r--r--configs/ls1021aqds_ddr4_nor_lpuart_defconfig1
-rw-r--r--configs/ls1021aqds_nand_defconfig1
-rw-r--r--configs/ls1021aqds_nor_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1021aqds_nor_defconfig1
-rw-r--r--configs/ls1021aqds_nor_lpuart_defconfig1
-rw-r--r--configs/ls1021aqds_qspi_defconfig1
-rw-r--r--configs/ls1021aqds_sdcard_ifc_defconfig1
-rw-r--r--configs/ls1021aqds_sdcard_qspi_defconfig1
-rw-r--r--configs/ls1021atsn_qspi_defconfig1
-rw-r--r--configs/ls1021atsn_sdcard_defconfig1
-rw-r--r--configs/ls1021atwr_nor_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1021atwr_nor_defconfig1
-rw-r--r--configs/ls1021atwr_nor_lpuart_defconfig1
-rw-r--r--configs/ls1021atwr_qspi_defconfig1
-rw-r--r--configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig1
-rw-r--r--configs/ls1021atwr_sdcard_ifc_defconfig1
-rw-r--r--configs/ls1021atwr_sdcard_qspi_defconfig1
-rw-r--r--configs/mccmon6_nor_defconfig2
-rw-r--r--configs/mccmon6_sd_defconfig2
-rw-r--r--configs/meerkat96_defconfig1
-rw-r--r--configs/microblaze-generic_defconfig2
-rw-r--r--configs/miqi-rk3288_defconfig1
-rw-r--r--configs/mvebu_db-88f3720_defconfig1
-rw-r--r--configs/mvebu_espressobin-88f3720_defconfig1
-rw-r--r--configs/mx51evk_defconfig1
-rw-r--r--configs/mx53ard_defconfig1
-rw-r--r--configs/mx53cx9020_defconfig1
-rw-r--r--configs/mx53evk_defconfig1
-rw-r--r--configs/mx53loco_defconfig1
-rw-r--r--configs/mx53ppd_defconfig1
-rw-r--r--configs/mx53smd_defconfig1
-rw-r--r--configs/mx6slevk_spl_defconfig1
-rw-r--r--configs/mx6sllevk_defconfig1
-rw-r--r--configs/mx6sllevk_plugin_defconfig1
-rw-r--r--configs/mx6ul_14x14_evk_defconfig1
-rw-r--r--configs/mx6ul_9x9_evk_defconfig1
-rw-r--r--configs/mx6ull_14x14_evk_defconfig1
-rw-r--r--configs/mx6ull_14x14_evk_plugin_defconfig1
-rw-r--r--configs/mx6ulz_14x14_evk_defconfig1
-rw-r--r--configs/mx7dsabresd_defconfig1
-rw-r--r--configs/mx7dsabresd_qspi_defconfig1
-rw-r--r--configs/mx7ulp_evk_defconfig1
-rw-r--r--configs/mx7ulp_evk_plugin_defconfig1
-rw-r--r--configs/odroid-xu3_defconfig1
-rw-r--r--configs/odroid_defconfig1
-rw-r--r--configs/origen_defconfig1
-rw-r--r--configs/peach-pi_defconfig1
-rw-r--r--configs/peach-pit_defconfig1
-rw-r--r--configs/pfla02_defconfig1
-rw-r--r--configs/phycore-rk3288_defconfig1
-rw-r--r--configs/phycore_pcl063_defconfig1
-rw-r--r--configs/phycore_pcl063_ull_defconfig1
-rw-r--r--configs/pico-dwarf-imx7d_defconfig1
-rw-r--r--configs/pico-hobbit-imx7d_defconfig1
-rw-r--r--configs/pico-imx7d_bl33_defconfig1
-rw-r--r--configs/pico-imx7d_defconfig1
-rw-r--r--configs/pico-nymph-imx7d_defconfig1
-rw-r--r--configs/pico-pi-imx7d_defconfig1
-rw-r--r--configs/popmetal-rk3288_defconfig1
-rw-r--r--configs/porter_defconfig2
-rw-r--r--configs/r8a77995_draak_defconfig2
-rw-r--r--configs/rock2_defconfig1
-rw-r--r--configs/rock_defconfig1
-rw-r--r--configs/s5pc210_universal_defconfig2
-rw-r--r--configs/sam9x60ek_nandflash_defconfig1
-rw-r--r--configs/sam9x60ek_qspiflash_defconfig1
-rw-r--r--configs/sama5d36ek_cmp_mmc_defconfig1
-rw-r--r--configs/sama5d36ek_cmp_nandflash_defconfig1
-rw-r--r--configs/sama5d36ek_cmp_spiflash_defconfig1
-rw-r--r--configs/sama5d3xek_mmc_defconfig1
-rw-r--r--configs/sama5d3xek_nandflash_defconfig1
-rw-r--r--configs/silk_defconfig2
-rw-r--r--configs/sksimx6_defconfig1
-rw-r--r--configs/smdk5250_defconfig1
-rw-r--r--configs/smdk5420_defconfig1
-rw-r--r--configs/smdkc100_defconfig2
-rw-r--r--configs/smdkv310_defconfig1
-rw-r--r--configs/snow_defconfig1
-rw-r--r--configs/socfpga_arria10_defconfig2
-rw-r--r--configs/socfpga_arria5_defconfig2
-rw-r--r--configs/socfpga_cyclone5_defconfig2
-rw-r--r--configs/socfpga_dbm_soc1_defconfig2
-rw-r--r--configs/socfpga_de0_nano_soc_defconfig2
-rw-r--r--configs/socfpga_de10_nano_defconfig2
-rw-r--r--configs/socfpga_de1_soc_defconfig2
-rw-r--r--configs/socfpga_is1_defconfig2
-rw-r--r--configs/socfpga_sockit_defconfig2
-rw-r--r--configs/socfpga_socrates_defconfig2
-rw-r--r--configs/socfpga_sr1500_defconfig2
-rw-r--r--configs/socfpga_stratix10_defconfig1
-rw-r--r--configs/socfpga_vining_fpga_defconfig2
-rw-r--r--configs/spear300_defconfig2
-rw-r--r--configs/spear300_nand_defconfig2
-rw-r--r--configs/spear300_usbtty_defconfig2
-rw-r--r--configs/spear300_usbtty_nand_defconfig2
-rw-r--r--configs/spear310_defconfig2
-rw-r--r--configs/spear310_nand_defconfig2
-rw-r--r--configs/spear310_pnor_defconfig2
-rw-r--r--configs/spear310_usbtty_defconfig2
-rw-r--r--configs/spear310_usbtty_nand_defconfig2
-rw-r--r--configs/spear310_usbtty_pnor_defconfig2
-rw-r--r--configs/spear320_defconfig2
-rw-r--r--configs/spear320_nand_defconfig2
-rw-r--r--configs/spear320_pnor_defconfig2
-rw-r--r--configs/spear320_usbtty_defconfig2
-rw-r--r--configs/spear320_usbtty_nand_defconfig2
-rw-r--r--configs/spear320_usbtty_pnor_defconfig2
-rw-r--r--configs/spear600_defconfig2
-rw-r--r--configs/spear600_nand_defconfig2
-rw-r--r--configs/spear600_usbtty_defconfig2
-rw-r--r--configs/spear600_usbtty_nand_defconfig2
-rw-r--r--configs/spring_defconfig1
-rw-r--r--configs/stmark2_defconfig2
-rw-r--r--configs/stout_defconfig2
-rw-r--r--configs/suvd3_defconfig2
-rw-r--r--configs/tinker-rk3288_defconfig1
-rw-r--r--configs/tqma6s_wru4_mmc_defconfig1
-rw-r--r--configs/trats2_defconfig1
-rw-r--r--configs/trats_defconfig1
-rw-r--r--configs/ts4800_defconfig1
-rw-r--r--configs/tuge1_defconfig2
-rw-r--r--configs/tuxx1_defconfig2
-rw-r--r--configs/uDPU_defconfig1
-rw-r--r--configs/udoo_defconfig1
-rw-r--r--configs/usbarmory_defconfig1
-rw-r--r--configs/variscite_dart6ul_defconfig1
-rw-r--r--configs/vexpress_aemv8a_juno_defconfig2
-rw-r--r--configs/vexpress_aemv8a_semi_defconfig2
-rw-r--r--configs/vexpress_ca15_tc2_defconfig2
-rw-r--r--configs/vexpress_ca5x2_defconfig2
-rw-r--r--configs/vexpress_ca9x4_defconfig2
-rw-r--r--configs/vyasa-rk3288_defconfig1
-rw-r--r--configs/warp7_bl33_defconfig1
-rw-r--r--configs/warp7_defconfig1
-rw-r--r--configs/x530_defconfig1
-rw-r--r--configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig2
-rw-r--r--configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig2
-rw-r--r--configs/xpress_defconfig1
-rw-r--r--configs/xpress_spl_defconfig1
-rw-r--r--configs/zc5202_defconfig1
-rw-r--r--configs/zc5601_defconfig1
-rw-r--r--configs/zynq_cse_nand_defconfig2
-rw-r--r--configs/zynq_zc770_xm011_defconfig2
-rw-r--r--configs/zynq_zc770_xm011_x16_defconfig2
-rw-r--r--drivers/mtd/Kconfig12
-rw-r--r--drivers/mtd/Makefile2
-rw-r--r--drivers/mtd/nand/raw/nand.c2
-rw-r--r--drivers/mtd/onenand/onenand_uboot.c2
-rw-r--r--include/configs/mvebu_armada-37xx.h2
-rw-r--r--include/configs/sam9x60ek.h2
-rw-r--r--include/configs/socfpga_stratix10_socdk.h2
-rw-r--r--include/configs/x530.h1
204 files changed, 207 insertions, 92 deletions
diff --git a/cmd/Kconfig b/cmd/Kconfig
index de92455..29df088 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1954,7 +1954,7 @@ config CMD_JFFS2
config CMD_MTDPARTS
bool "MTD partition support"
- select MTD_DEVICE if (CMD_NAND || MTD_RAW_NAND)
+ select MTD if (CMD_NAND || MTD_RAW_NAND)
help
MTD partitioning tool support.
It is strongly encouraged to avoid using this command
diff --git a/configs/10m50_defconfig b/configs/10m50_defconfig
index e99e975..fe96d6f 100644
--- a/configs/10m50_defconfig
+++ b/configs/10m50_defconfig
@@ -26,9 +26,9 @@ CONFIG_DM_GPIO=y
CONFIG_ALTERA_PIO=y
CONFIG_MISC=y
CONFIG_ALTERA_SYSID=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_ALTERA_QSPI=y
CONFIG_PHY_MARVELL=y
CONFIG_DM_ETH=y
diff --git a/configs/TQM834x_defconfig b/configs/TQM834x_defconfig
index 4a28327..8afc884 100644
--- a/configs/TQM834x_defconfig
+++ b/configs/TQM834x_defconfig
@@ -144,8 +144,8 @@ CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_ENV_ADDR=0x80060000
CONFIG_ENV_ADDR_REDUND=0x80080000
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/TWR-P1025_defconfig b/configs/TWR-P1025_defconfig
index 686e523..c52263b 100644
--- a/configs/TWR-P1025_defconfig
+++ b/configs/TWR-P1025_defconfig
@@ -35,8 +35,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xEFF20000
CONFIG_SATA_SIL3114=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/alt_defconfig b/configs/alt_defconfig
index d0e2460..24d7609 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -68,8 +68,8 @@ CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_SH_MMCIF=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/arndale_defconfig b/configs/arndale_defconfig
index 987b0fc..fef8d62 100644
--- a/configs/arndale_defconfig
+++ b/configs/arndale_defconfig
@@ -34,6 +34,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x5000000
CONFIG_SOUND=y
diff --git a/configs/bcm7260_defconfig b/configs/bcm7260_defconfig
index 47f0a7d..97401f5 100644
--- a/configs/bcm7260_defconfig
+++ b/configs/bcm7260_defconfig
@@ -21,4 +21,5 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_BCMSTB=y
+CONFIG_MTD=y
# CONFIG_EFI_LOADER is not set
diff --git a/configs/bcm7445_defconfig b/configs/bcm7445_defconfig
index 2450d24..2fc408f 100644
--- a/configs/bcm7445_defconfig
+++ b/configs/bcm7445_defconfig
@@ -23,6 +23,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_BCMSTB=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
diff --git a/configs/bitmain_antminer_s9_defconfig b/configs/bitmain_antminer_s9_defconfig
index 15c7bdd..dd34cd7 100644
--- a/configs/bitmain_antminer_s9_defconfig
+++ b/configs/bitmain_antminer_s9_defconfig
@@ -58,7 +58,7 @@ CONFIG_FPGA_ZYNQPL=y
CONFIG_DM_GPIO=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ZYNQ=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_ZYNQ=y
CONFIG_NAND_ZYNQ_USE_BOOTLOADER1_TIMINGS=y
diff --git a/configs/blanche_defconfig b/configs/blanche_defconfig
index 65171de..775344f 100644
--- a/configs/blanche_defconfig
+++ b/configs/blanche_defconfig
@@ -49,6 +49,7 @@ CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_SH_MMCIF=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_CFI=y
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index 495ecca..68d2739 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -87,7 +87,7 @@ CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_MISC=y
CONFIG_DM_MMC=y
CONFIG_MMC_OMAP_HS=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_SPEED=24000000
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/chromebit_mickey_defconfig b/configs/chromebit_mickey_defconfig
index 3fa2fcd..a0b1c8d 100644
--- a/configs/chromebit_mickey_defconfig
+++ b/configs/chromebit_mickey_defconfig
@@ -65,6 +65,7 @@ CONFIG_PWRSEQ=y
# CONFIG_SPL_DM_MMC is not set
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_BUS=2
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index 6d004d7..7ba0c95 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -68,6 +68,7 @@ CONFIG_PWRSEQ=y
# CONFIG_SPL_DM_MMC is not set
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_BUS=2
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/chromebook_minnie_defconfig b/configs/chromebook_minnie_defconfig
index ae79915..46e1c18 100644
--- a/configs/chromebook_minnie_defconfig
+++ b/configs/chromebook_minnie_defconfig
@@ -67,6 +67,7 @@ CONFIG_PWRSEQ=y
# CONFIG_SPL_DM_MMC is not set
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_BUS=2
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/chromebook_speedy_defconfig b/configs/chromebook_speedy_defconfig
index b9a133a..34cf727 100644
--- a/configs/chromebook_speedy_defconfig
+++ b/configs/chromebook_speedy_defconfig
@@ -67,6 +67,7 @@ CONFIG_PWRSEQ=y
# CONFIG_SPL_DM_MMC is not set
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_BUS=2
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/cl-som-imx7_defconfig b/configs/cl-som-imx7_defconfig
index 497d6f9..6384937 100644
--- a/configs/cl-som-imx7_defconfig
+++ b/configs/cl-som-imx7_defconfig
@@ -59,6 +59,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=20000000
diff --git a/configs/colibri_imx7_emmc_defconfig b/configs/colibri_imx7_emmc_defconfig
index 6ba2647..4fe1e36 100644
--- a/configs/colibri_imx7_emmc_defconfig
+++ b/configs/colibri_imx7_emmc_defconfig
@@ -58,6 +58,7 @@ CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
diff --git a/configs/crs305-1g-4s_defconfig b/configs/crs305-1g-4s_defconfig
index dfff800..3b513cc 100644
--- a/configs/crs305-1g-4s_defconfig
+++ b/configs/crs305-1g-4s_defconfig
@@ -35,8 +35,8 @@ CONFIG_BLK=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MVTWSI=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index c28cee5..5ff2360 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -60,8 +60,8 @@ CONFIG_DA8XX_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DAVINCI=y
CONFIG_DM_MMC=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_SPEED=30000000
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/db-xc3-24g4xg_defconfig b/configs/db-xc3-24g4xg_defconfig
index bfac43a..0d49d40 100644
--- a/configs/db-xc3-24g4xg_defconfig
+++ b/configs/db-xc3-24g4xg_defconfig
@@ -38,8 +38,8 @@ CONFIG_BLK=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MVTWSI=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_PXA3XX=y
diff --git a/configs/display5_defconfig b/configs/display5_defconfig
index af94dd5..537b3b6 100644
--- a/configs/display5_defconfig
+++ b/configs/display5_defconfig
@@ -91,7 +91,7 @@ CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_BUS=1
CONFIG_SF_DEFAULT_MODE=0
diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig
index 65214bb..676dee8 100644
--- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig
@@ -94,7 +94,7 @@ CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=5
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_BUS=1
CONFIG_SF_DEFAULT_MODE=0
diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig
index 45fe489..19fc73c 100644
--- a/configs/ds414_defconfig
+++ b/configs/ds414_defconfig
@@ -53,7 +53,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_OF_TRANSLATE=y
CONFIG_BLK=y
# CONFIG_MMC is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHY_ADDR_ENABLE=y
CONFIG_PHY_MARVELL=y
diff --git a/configs/evb-rk3036_defconfig b/configs/evb-rk3036_defconfig
index 30ec7d6..a106ae6 100644
--- a/configs/evb-rk3036_defconfig
+++ b/configs/evb-rk3036_defconfig
@@ -42,6 +42,7 @@ CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_LED=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_PINCTRL=y
diff --git a/configs/evb-rk3128_defconfig b/configs/evb-rk3128_defconfig
index dc1f825..2ca7bf3 100644
--- a/configs/evb-rk3128_defconfig
+++ b/configs/evb-rk3128_defconfig
@@ -30,6 +30,7 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_PHY=y
CONFIG_PINCTRL=y
diff --git a/configs/evb-rk3229_defconfig b/configs/evb-rk3229_defconfig
index 5a2466b..6b302e9 100644
--- a/configs/evb-rk3229_defconfig
+++ b/configs/evb-rk3229_defconfig
@@ -51,6 +51,7 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_GMAC_ROCKCHIP=y
diff --git a/configs/evb-rk3288_defconfig b/configs/evb-rk3288_defconfig
index 36f6d4a..05c43a0 100644
--- a/configs/evb-rk3288_defconfig
+++ b/configs/evb-rk3288_defconfig
@@ -52,6 +52,7 @@ CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 3de2cd8..6c2c84a 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -54,6 +54,7 @@ CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/gose_defconfig b/configs/gose_defconfig
index fa76866..dc8b871 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -67,8 +67,8 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index b9876c8..b22a79b 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -69,7 +69,7 @@ CONFIG_DWC_AHSATA=y
CONFIG_SUPPORT_EMMC_RPMB=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_E1000=y
CONFIG_MII=y
diff --git a/configs/gwventana_gw5904_defconfig b/configs/gwventana_gw5904_defconfig
index eb1c125..ecaa047 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -69,7 +69,7 @@ CONFIG_DWC_AHSATA=y
CONFIG_SUPPORT_EMMC_RPMB=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MV88E61XX_SWITCH=y
CONFIG_MV88E61XX_CPU_PORT=5
diff --git a/configs/imx6dl_mamoj_defconfig b/configs/imx6dl_mamoj_defconfig
index 4799222..37168d2 100644
--- a/configs/imx6dl_mamoj_defconfig
+++ b/configs/imx6dl_mamoj_defconfig
@@ -36,6 +36,7 @@ CONFIG_FASTBOOT_FLASH_MMC_DEV=2
CONFIG_SYS_I2C_MXC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
diff --git a/configs/imx6qdl_icore_mipi_defconfig b/configs/imx6qdl_icore_mipi_defconfig
index 9f95edf..3a4ff7a 100644
--- a/configs/imx6qdl_icore_mipi_defconfig
+++ b/configs/imx6qdl_icore_mipi_defconfig
@@ -48,6 +48,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_SMSC=y
CONFIG_FEC_MXC=y
diff --git a/configs/imx6qdl_icore_rqs_defconfig b/configs/imx6qdl_icore_rqs_defconfig
index 4538ffa..b55a301 100644
--- a/configs/imx6qdl_icore_rqs_defconfig
+++ b/configs/imx6qdl_icore_rqs_defconfig
@@ -45,6 +45,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
diff --git a/configs/imx6ul_geam_mmc_defconfig b/configs/imx6ul_geam_mmc_defconfig
index d3f72f0..f0e425d 100644
--- a/configs/imx6ul_geam_mmc_defconfig
+++ b/configs/imx6ul_geam_mmc_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_SMSC=y
CONFIG_FEC_MXC=y
diff --git a/configs/imx6ul_isiot_emmc_defconfig b/configs/imx6ul_isiot_emmc_defconfig
index b8accfb..6e167f5 100644
--- a/configs/imx6ul_isiot_emmc_defconfig
+++ b/configs/imx6ul_isiot_emmc_defconfig
@@ -42,6 +42,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_SMSC=y
CONFIG_FEC_MXC=y
diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index 95de2f2..61d28db 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -68,9 +68,9 @@ CONFIG_MISC=y
CONFIG_DM_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_AM654=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index 2fd2dc3..0a7bb7a 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -46,6 +46,7 @@ CONFIG_SYS_I2C_DAVINCI=y
CONFIG_MISC=y
CONFIG_DM_MMC=y
CONFIG_MMC_OMAP_HS=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_DAVINCI=y
diff --git a/configs/k2g_hs_evm_defconfig b/configs/k2g_hs_evm_defconfig
index 30c0a8b..32ee95c 100644
--- a/configs/k2g_hs_evm_defconfig
+++ b/configs/k2g_hs_evm_defconfig
@@ -39,6 +39,7 @@ CONFIG_SYS_I2C_DAVINCI=y
CONFIG_MISC=y
CONFIG_DM_MMC=y
CONFIG_MMC_OMAP_HS=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_DAVINCI=y
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 4d9f412..18f9625 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -148,8 +148,8 @@ CONFIG_ENV_ADDR_REDUND=0xF00E0000
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/kmopti2_defconfig b/configs/kmopti2_defconfig
index 80af105..7d05971 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -168,8 +168,8 @@ CONFIG_ENV_ADDR_REDUND=0xF00E0000
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/kmsupx5_defconfig b/configs/kmsupx5_defconfig
index 4e58aed..fe17be0 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -148,8 +148,8 @@ CONFIG_ENV_ADDR_REDUND=0xF00E0000
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/kmtepr2_defconfig b/configs/kmtepr2_defconfig
index d84da2d..3605a55 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -168,8 +168,8 @@ CONFIG_ENV_ADDR_REDUND=0xF00E0000
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/koelsch_defconfig b/configs/koelsch_defconfig
index 93aecc4..4b4c4e5 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -67,8 +67,8 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/kp_imx53_defconfig b/configs/kp_imx53_defconfig
index 931726b..8f3a938 100644
--- a/configs/kp_imx53_defconfig
+++ b/configs/kp_imx53_defconfig
@@ -37,6 +37,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_I2C_SET_DEFAULT_BUS_NUM=y
CONFIG_I2C_DEFAULT_BUS_NUMBER=0x1
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_SMSC=y
CONFIG_FEC_MXC=y
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index 78dc14f..9cfc885 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -45,6 +45,7 @@ CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_LED=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_PINCTRL=y
diff --git a/configs/kzm9g_defconfig b/configs/kzm9g_defconfig
index 32f23fa..69c70a3 100644
--- a/configs/kzm9g_defconfig
+++ b/configs/kzm9g_defconfig
@@ -25,6 +25,7 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0x40000
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_CFI=y
diff --git a/configs/lager_defconfig b/configs/lager_defconfig
index 863f279..1d8bbd5 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -69,8 +69,8 @@ CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_SH_MMCIF=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/liteboard_defconfig b/configs/liteboard_defconfig
index 4d2e491..ebe5e00 100644
--- a/configs/liteboard_defconfig
+++ b/configs/liteboard_defconfig
@@ -43,6 +43,7 @@ CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_DM_ETH=y
CONFIG_MII=y
diff --git a/configs/ls1021aiot_qspi_defconfig b/configs/ls1021aiot_qspi_defconfig
index 8420876..d5e3f4e 100644
--- a/configs/ls1021aiot_qspi_defconfig
+++ b/configs/ls1021aiot_qspi_defconfig
@@ -24,6 +24,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/ls1021aiot_sdcard_defconfig b/configs/ls1021aiot_sdcard_defconfig
index 55a17f0..8de8b7f 100644
--- a/configs/ls1021aiot_sdcard_defconfig
+++ b/configs/ls1021aiot_sdcard_defconfig
@@ -29,6 +29,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/ls1021aqds_ddr4_nor_defconfig b/configs/ls1021aqds_ddr4_nor_defconfig
index 60a2e6e..f82623a 100644
--- a/configs/ls1021aqds_ddr4_nor_defconfig
+++ b/configs/ls1021aqds_ddr4_nor_defconfig
@@ -41,6 +41,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021aqds_ddr4_nor_lpuart_defconfig b/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
index 59610b3..e4b7c24 100644
--- a/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
+++ b/configs/ls1021aqds_ddr4_nor_lpuart_defconfig
@@ -42,6 +42,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021aqds_nand_defconfig b/configs/ls1021aqds_nand_defconfig
index 48a1551..d6ae7ca 100644
--- a/configs/ls1021aqds_nand_defconfig
+++ b/configs/ls1021aqds_nand_defconfig
@@ -58,6 +58,7 @@ CONFIG_FSL_CAAM=y
CONFIG_SYS_FSL_DDR3=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
index db05065..3f99035 100644
--- a/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
+++ b/configs/ls1021aqds_nor_SECURE_BOOT_defconfig
@@ -40,6 +40,7 @@ CONFIG_SATA_CEVA=y
CONFIG_SYS_FSL_DDR3=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021aqds_nor_defconfig b/configs/ls1021aqds_nor_defconfig
index 8a3fafb..75ef262 100644
--- a/configs/ls1021aqds_nor_defconfig
+++ b/configs/ls1021aqds_nor_defconfig
@@ -42,6 +42,7 @@ CONFIG_FSL_CAAM=y
CONFIG_SYS_FSL_DDR3=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021aqds_nor_lpuart_defconfig b/configs/ls1021aqds_nor_lpuart_defconfig
index 85471f0..f0f3a01 100644
--- a/configs/ls1021aqds_nor_lpuart_defconfig
+++ b/configs/ls1021aqds_nor_lpuart_defconfig
@@ -43,6 +43,7 @@ CONFIG_FSL_CAAM=y
CONFIG_SYS_FSL_DDR3=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021aqds_qspi_defconfig b/configs/ls1021aqds_qspi_defconfig
index 6dfde1a..a1e0d16 100644
--- a/configs/ls1021aqds_qspi_defconfig
+++ b/configs/ls1021aqds_qspi_defconfig
@@ -44,6 +44,7 @@ CONFIG_FSL_CAAM=y
CONFIG_SYS_FSL_DDR3=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHY_GIGE=y
diff --git a/configs/ls1021aqds_sdcard_ifc_defconfig b/configs/ls1021aqds_sdcard_ifc_defconfig
index 77890a4..c57e5ff 100644
--- a/configs/ls1021aqds_sdcard_ifc_defconfig
+++ b/configs/ls1021aqds_sdcard_ifc_defconfig
@@ -56,6 +56,7 @@ CONFIG_FSL_CAAM=y
CONFIG_SYS_FSL_DDR3=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021aqds_sdcard_qspi_defconfig b/configs/ls1021aqds_sdcard_qspi_defconfig
index 811694f..8ed3dbd 100644
--- a/configs/ls1021aqds_sdcard_qspi_defconfig
+++ b/configs/ls1021aqds_sdcard_qspi_defconfig
@@ -55,6 +55,7 @@ CONFIG_FSL_CAAM=y
CONFIG_SYS_FSL_DDR3=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_PHY_GIGE=y
diff --git a/configs/ls1021atsn_qspi_defconfig b/configs/ls1021atsn_qspi_defconfig
index add2c8b..2d36410 100644
--- a/configs/ls1021atsn_qspi_defconfig
+++ b/configs/ls1021atsn_qspi_defconfig
@@ -31,6 +31,7 @@ CONFIG_DM=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/ls1021atsn_sdcard_defconfig b/configs/ls1021atsn_sdcard_defconfig
index 75b9af9..d488a5d 100644
--- a/configs/ls1021atsn_sdcard_defconfig
+++ b/configs/ls1021atsn_sdcard_defconfig
@@ -42,6 +42,7 @@ CONFIG_DM=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/ls1021atwr_nor_SECURE_BOOT_defconfig b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
index beb5ad9..dbd9d0e 100644
--- a/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
+++ b/configs/ls1021atwr_nor_SECURE_BOOT_defconfig
@@ -34,6 +34,7 @@ CONFIG_DM=y
CONFIG_SATA_CEVA=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021atwr_nor_defconfig b/configs/ls1021atwr_nor_defconfig
index 1032f15..d950bdc 100644
--- a/configs/ls1021atwr_nor_defconfig
+++ b/configs/ls1021atwr_nor_defconfig
@@ -36,6 +36,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021atwr_nor_lpuart_defconfig b/configs/ls1021atwr_nor_lpuart_defconfig
index ed77989..85086a8 100644
--- a/configs/ls1021atwr_nor_lpuart_defconfig
+++ b/configs/ls1021atwr_nor_lpuart_defconfig
@@ -38,6 +38,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021atwr_qspi_defconfig b/configs/ls1021atwr_qspi_defconfig
index 77a144b..9451b3f 100644
--- a/configs/ls1021atwr_qspi_defconfig
+++ b/configs/ls1021atwr_qspi_defconfig
@@ -40,6 +40,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig b/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
index 2098a7f..1859a8f 100644
--- a/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
+++ b/configs/ls1021atwr_sdcard_ifc_SECURE_BOOT_defconfig
@@ -48,6 +48,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM=y
CONFIG_SPL_DM=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021atwr_sdcard_ifc_defconfig b/configs/ls1021atwr_sdcard_ifc_defconfig
index 18ff9fa..b330ca7 100644
--- a/configs/ls1021atwr_sdcard_ifc_defconfig
+++ b/configs/ls1021atwr_sdcard_ifc_defconfig
@@ -50,6 +50,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/ls1021atwr_sdcard_qspi_defconfig b/configs/ls1021atwr_sdcard_qspi_defconfig
index 74ab122..7fbf82e 100644
--- a/configs/ls1021atwr_sdcard_qspi_defconfig
+++ b/configs/ls1021atwr_sdcard_qspi_defconfig
@@ -50,6 +50,7 @@ CONFIG_SATA_CEVA=y
CONFIG_FSL_CAAM=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ATMEL=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index 1ca41f5..737855e3 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -51,9 +51,9 @@ CONFIG_SYS_I2C_MXC_I2C1=y
CONFIG_SYS_I2C_MXC_I2C2=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/mccmon6_sd_defconfig b/configs/mccmon6_sd_defconfig
index 3bc7a15..33fd26e 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -49,9 +49,9 @@ CONFIG_SYS_I2C_MXC_I2C1=y
CONFIG_SYS_I2C_MXC_I2C2=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/meerkat96_defconfig b/configs/meerkat96_defconfig
index 537edb1..d878281 100644
--- a/configs/meerkat96_defconfig
+++ b/configs/meerkat96_defconfig
@@ -37,6 +37,7 @@ CONFIG_DM_GPIO=y
CONFIG_MMC_BROKEN_CD=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
+CONFIG_MTD=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_DM_PMIC=y
diff --git a/configs/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index 3e66986..64c8225 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -49,8 +49,8 @@ CONFIG_SPL_DM=y
CONFIG_XILINX_GPIO=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/miqi-rk3288_defconfig b/configs/miqi-rk3288_defconfig
index 924567f..aecf8bc 100644
--- a/configs/miqi-rk3288_defconfig
+++ b/configs/miqi-rk3288_defconfig
@@ -52,6 +52,7 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/mvebu_db-88f3720_defconfig b/configs/mvebu_db-88f3720_defconfig
index fe50ce9..ac74a81 100644
--- a/configs/mvebu_db-88f3720_defconfig
+++ b/configs/mvebu_db-88f3720_defconfig
@@ -49,6 +49,7 @@ CONFIG_DM_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_XENON=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/mvebu_espressobin-88f3720_defconfig b/configs/mvebu_espressobin-88f3720_defconfig
index f2a5fb3..20c23e6 100644
--- a/configs/mvebu_espressobin-88f3720_defconfig
+++ b/configs/mvebu_espressobin-88f3720_defconfig
@@ -48,6 +48,7 @@ CONFIG_DM_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_XENON=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/mx51evk_defconfig b/configs/mx51evk_defconfig
index dd782b3..1505459 100644
--- a/configs/mx51evk_defconfig
+++ b/configs/mx51evk_defconfig
@@ -26,6 +26,7 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_MII=y
CONFIG_SPI=y
CONFIG_MXC_SPI=y
diff --git a/configs/mx53ard_defconfig b/configs/mx53ard_defconfig
index 7690765..f0ecb4d 100644
--- a/configs/mx53ard_defconfig
+++ b/configs/mx53ard_defconfig
@@ -19,6 +19,7 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_MXC=y
diff --git a/configs/mx53cx9020_defconfig b/configs/mx53cx9020_defconfig
index 3e16f45..112c301 100644
--- a/configs/mx53cx9020_defconfig
+++ b/configs/mx53cx9020_defconfig
@@ -31,6 +31,7 @@ CONFIG_FPGA_CYCLON2=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_FEC_MXC=y
CONFIG_MII=y
CONFIG_PINCTRL=y
diff --git a/configs/mx53evk_defconfig b/configs/mx53evk_defconfig
index 68915c3..e520cba 100644
--- a/configs/mx53evk_defconfig
+++ b/configs/mx53evk_defconfig
@@ -18,5 +18,6 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_MII=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/mx53loco_defconfig b/configs/mx53loco_defconfig
index 28f48bf..277b528 100644
--- a/configs/mx53loco_defconfig
+++ b/configs/mx53loco_defconfig
@@ -28,6 +28,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DWC_AHSATA=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_MII=y
CONFIG_USB=y
CONFIG_USB_EHCI_MX5=y
diff --git a/configs/mx53ppd_defconfig b/configs/mx53ppd_defconfig
index a21cbd8..f1057e3 100644
--- a/configs/mx53ppd_defconfig
+++ b/configs/mx53ppd_defconfig
@@ -43,6 +43,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=10
CONFIG_SYS_BOOTCOUNT_EXT_DEVPART="0:5"
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_MII=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX5=y
diff --git a/configs/mx53smd_defconfig b/configs/mx53smd_defconfig
index 39ecb50..8cf6c80 100644
--- a/configs/mx53smd_defconfig
+++ b/configs/mx53smd_defconfig
@@ -18,5 +18,6 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_MII=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig
index bec90e8..65685af 100644
--- a/configs/mx6slevk_spl_defconfig
+++ b/configs/mx6slevk_spl_defconfig
@@ -46,6 +46,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=20000000
diff --git a/configs/mx6sllevk_defconfig b/configs/mx6sllevk_defconfig
index b43648d..4da460d 100644
--- a/configs/mx6sllevk_defconfig
+++ b/configs/mx6sllevk_defconfig
@@ -34,6 +34,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_DM_PMIC=y
diff --git a/configs/mx6sllevk_plugin_defconfig b/configs/mx6sllevk_plugin_defconfig
index fffcfb3..66560f7 100644
--- a/configs/mx6sllevk_plugin_defconfig
+++ b/configs/mx6sllevk_plugin_defconfig
@@ -35,6 +35,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX6=y
CONFIG_DM_PMIC=y
diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
index 313e918..a2f6fe9 100644
--- a/configs/mx6ul_14x14_evk_defconfig
+++ b/configs/mx6ul_14x14_evk_defconfig
@@ -47,6 +47,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=40000000
diff --git a/configs/mx6ul_9x9_evk_defconfig b/configs/mx6ul_9x9_evk_defconfig
index 2e8af70..b11cec3 100644
--- a/configs/mx6ul_9x9_evk_defconfig
+++ b/configs/mx6ul_9x9_evk_defconfig
@@ -47,6 +47,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=40000000
diff --git a/configs/mx6ull_14x14_evk_defconfig b/configs/mx6ull_14x14_evk_defconfig
index d969a98..2a50387 100644
--- a/configs/mx6ull_14x14_evk_defconfig
+++ b/configs/mx6ull_14x14_evk_defconfig
@@ -33,6 +33,7 @@ CONFIG_DM_74X164=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=40000000
diff --git a/configs/mx6ull_14x14_evk_plugin_defconfig b/configs/mx6ull_14x14_evk_plugin_defconfig
index 3394b41..8f4074e 100644
--- a/configs/mx6ull_14x14_evk_plugin_defconfig
+++ b/configs/mx6ull_14x14_evk_plugin_defconfig
@@ -34,6 +34,7 @@ CONFIG_DM_74X164=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=40000000
diff --git a/configs/mx6ulz_14x14_evk_defconfig b/configs/mx6ulz_14x14_evk_defconfig
index ab06628..f9bdc79 100644
--- a/configs/mx6ulz_14x14_evk_defconfig
+++ b/configs/mx6ulz_14x14_evk_defconfig
@@ -33,6 +33,7 @@ CONFIG_DM_74X164=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=40000000
diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
index 9befbb7..2a9fdac 100644
--- a/configs/mx7dsabresd_defconfig
+++ b/configs/mx7dsabresd_defconfig
@@ -55,6 +55,7 @@ CONFIG_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_EON=y
CONFIG_PHYLIB=y
diff --git a/configs/mx7dsabresd_qspi_defconfig b/configs/mx7dsabresd_qspi_defconfig
index c317453..865ce30 100644
--- a/configs/mx7dsabresd_qspi_defconfig
+++ b/configs/mx7dsabresd_qspi_defconfig
@@ -54,6 +54,7 @@ CONFIG_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=40000000
diff --git a/configs/mx7ulp_evk_defconfig b/configs/mx7ulp_evk_defconfig
index bd75a99..3cf9015 100644
--- a/configs/mx7ulp_evk_defconfig
+++ b/configs/mx7ulp_evk_defconfig
@@ -29,6 +29,7 @@ CONFIG_SYS_I2C_IMX_LPI2C=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7ULP=y
CONFIG_DM_REGULATOR=y
diff --git a/configs/mx7ulp_evk_plugin_defconfig b/configs/mx7ulp_evk_plugin_defconfig
index 0b07962..1c37d6b 100644
--- a/configs/mx7ulp_evk_plugin_defconfig
+++ b/configs/mx7ulp_evk_plugin_defconfig
@@ -27,6 +27,7 @@ CONFIG_SYS_I2C_IMX_LPI2C=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7ULP=y
CONFIG_DM_REGULATOR=y
diff --git a/configs/odroid-xu3_defconfig b/configs/odroid-xu3_defconfig
index 24d2113..20038d4 100644
--- a/configs/odroid-xu3_defconfig
+++ b/configs/odroid-xu3_defconfig
@@ -40,6 +40,7 @@ CONFIG_ADC_EXYNOS=y
CONFIG_DFU_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
+CONFIG_MTD=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x5000000
CONFIG_DM_PMIC=y
diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig
index 4a5e566..be914e4 100644
--- a/configs/odroid_defconfig
+++ b/configs/odroid_defconfig
@@ -44,6 +44,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_DM_PMIC=y
CONFIG_DM_PMIC_MAX77686=y
CONFIG_DM_REGULATOR=y
diff --git a/configs/origen_defconfig b/configs/origen_defconfig
index 32fb190..cd1265b 100644
--- a/configs/origen_defconfig
+++ b/configs/origen_defconfig
@@ -34,6 +34,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_GADGET=y
diff --git a/configs/peach-pi_defconfig b/configs/peach-pi_defconfig
index 5272f1d..5ab24ef 100644
--- a/configs/peach-pi_defconfig
+++ b/configs/peach-pi_defconfig
@@ -46,6 +46,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/peach-pit_defconfig b/configs/peach-pit_defconfig
index 4ad71c1..a9657d2 100644
--- a/configs/peach-pit_defconfig
+++ b/configs/peach-pit_defconfig
@@ -45,6 +45,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/pfla02_defconfig b/configs/pfla02_defconfig
index e824d4c..c2cc796 100644
--- a/configs/pfla02_defconfig
+++ b/configs/pfla02_defconfig
@@ -51,6 +51,7 @@ CONFIG_ENV_OFFSET_REDUND=0x110000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_MXS=y
diff --git a/configs/phycore-rk3288_defconfig b/configs/phycore-rk3288_defconfig
index 103277e..4c48d42 100644
--- a/configs/phycore-rk3288_defconfig
+++ b/configs/phycore-rk3288_defconfig
@@ -56,6 +56,7 @@ CONFIG_MISC=y
CONFIG_I2C_EEPROM=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/phycore_pcl063_defconfig b/configs/phycore_pcl063_defconfig
index 6706b6f..b9c9a79 100644
--- a/configs/phycore_pcl063_defconfig
+++ b/configs/phycore_pcl063_defconfig
@@ -38,6 +38,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_I2C_GPIO=y
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_MXS=y
diff --git a/configs/phycore_pcl063_ull_defconfig b/configs/phycore_pcl063_ull_defconfig
index 814e76b..f2635ce 100644
--- a/configs/phycore_pcl063_ull_defconfig
+++ b/configs/phycore_pcl063_ull_defconfig
@@ -34,6 +34,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_I2C_GPIO=y
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_FEC_MXC=y
diff --git a/configs/pico-dwarf-imx7d_defconfig b/configs/pico-dwarf-imx7d_defconfig
index 533f569..94d73ee 100644
--- a/configs/pico-dwarf-imx7d_defconfig
+++ b/configs/pico-dwarf-imx7d_defconfig
@@ -57,6 +57,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_PINCTRL=y
diff --git a/configs/pico-hobbit-imx7d_defconfig b/configs/pico-hobbit-imx7d_defconfig
index 3dd4f9a..ef86b0c 100644
--- a/configs/pico-hobbit-imx7d_defconfig
+++ b/configs/pico-hobbit-imx7d_defconfig
@@ -57,6 +57,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_PINCTRL=y
diff --git a/configs/pico-imx7d_bl33_defconfig b/configs/pico-imx7d_bl33_defconfig
index 6633115..51d3514 100644
--- a/configs/pico-imx7d_bl33_defconfig
+++ b/configs/pico-imx7d_bl33_defconfig
@@ -48,6 +48,7 @@ CONFIG_DFU_MMC=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_PINCTRL=y
diff --git a/configs/pico-imx7d_defconfig b/configs/pico-imx7d_defconfig
index 3b31088..bf4d56e 100644
--- a/configs/pico-imx7d_defconfig
+++ b/configs/pico-imx7d_defconfig
@@ -57,6 +57,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_PINCTRL=y
diff --git a/configs/pico-nymph-imx7d_defconfig b/configs/pico-nymph-imx7d_defconfig
index 533f569..94d73ee 100644
--- a/configs/pico-nymph-imx7d_defconfig
+++ b/configs/pico-nymph-imx7d_defconfig
@@ -57,6 +57,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_PINCTRL=y
diff --git a/configs/pico-pi-imx7d_defconfig b/configs/pico-pi-imx7d_defconfig
index d8e3c54..c6f5b87 100644
--- a/configs/pico-pi-imx7d_defconfig
+++ b/configs/pico-pi-imx7d_defconfig
@@ -57,6 +57,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_PINCTRL=y
diff --git a/configs/popmetal-rk3288_defconfig b/configs/popmetal-rk3288_defconfig
index 8e71499..f732f6b 100644
--- a/configs/popmetal-rk3288_defconfig
+++ b/configs/popmetal-rk3288_defconfig
@@ -52,6 +52,7 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/porter_defconfig b/configs/porter_defconfig
index c804cc1..7a30e26 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -66,8 +66,8 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index adda500..cd205cd 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -46,9 +46,9 @@ CONFIG_MMC_IO_VOLTAGE=y
CONFIG_MMC_UHS_SUPPORT=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
index ea8b87a..edac2e1 100644
--- a/configs/rock2_defconfig
+++ b/configs/rock2_defconfig
@@ -54,6 +54,7 @@ CONFIG_ROCKCHIP_GPIO=y
CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/rock_defconfig b/configs/rock_defconfig
index 3ce9aa1..0858a1f 100644
--- a/configs/rock_defconfig
+++ b/configs/rock_defconfig
@@ -42,6 +42,7 @@ CONFIG_SYS_I2C_ROCKCHIP=y
CONFIG_LED=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_PINCTRL=y
CONFIG_DM_PMIC=y
diff --git a/configs/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig
index db764e8..65ea3f6 100644
--- a/configs/s5pc210_universal_defconfig
+++ b/configs/s5pc210_universal_defconfig
@@ -37,7 +37,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_S5P=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_PMIC=y
CONFIG_DM_PMIC_MAX8998=y
CONFIG_USB=y
diff --git a/configs/sam9x60ek_nandflash_defconfig b/configs/sam9x60ek_nandflash_defconfig
index 63b137d..1884bd3 100644
--- a/configs/sam9x60ek_nandflash_defconfig
+++ b/configs/sam9x60ek_nandflash_defconfig
@@ -49,6 +49,7 @@ CONFIG_I2C_EEPROM=y
CONFIG_MICROCHIP_FLEXCOM=y
CONFIG_DM_MMC=y
CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_MICREL=y
CONFIG_DM_ETH=y
diff --git a/configs/sam9x60ek_qspiflash_defconfig b/configs/sam9x60ek_qspiflash_defconfig
index 93543cf..26c1ac6 100644
--- a/configs/sam9x60ek_qspiflash_defconfig
+++ b/configs/sam9x60ek_qspiflash_defconfig
@@ -57,6 +57,7 @@ CONFIG_I2C_EEPROM=y
CONFIG_MICROCHIP_FLEXCOM=y
CONFIG_DM_MMC=y
CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/sama5d36ek_cmp_mmc_defconfig b/configs/sama5d36ek_cmp_mmc_defconfig
index 658aece..b949764 100644
--- a/configs/sama5d36ek_cmp_mmc_defconfig
+++ b/configs/sama5d36ek_cmp_mmc_defconfig
@@ -43,6 +43,7 @@ CONFIG_DM_GPIO=y
CONFIG_AT91_GPIO=y
CONFIG_DM_MMC=y
CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
# CONFIG_SYS_NAND_USE_FLASH_BBT is not set
CONFIG_NAND_ATMEL=y
diff --git a/configs/sama5d36ek_cmp_nandflash_defconfig b/configs/sama5d36ek_cmp_nandflash_defconfig
index 59cae66..d01b04a 100644
--- a/configs/sama5d36ek_cmp_nandflash_defconfig
+++ b/configs/sama5d36ek_cmp_nandflash_defconfig
@@ -44,6 +44,7 @@ CONFIG_DM_GPIO=y
CONFIG_AT91_GPIO=y
CONFIG_DM_MMC=y
CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
# CONFIG_SYS_NAND_USE_FLASH_BBT is not set
CONFIG_NAND_ATMEL=y
diff --git a/configs/sama5d36ek_cmp_spiflash_defconfig b/configs/sama5d36ek_cmp_spiflash_defconfig
index 557ece5..538936a 100644
--- a/configs/sama5d36ek_cmp_spiflash_defconfig
+++ b/configs/sama5d36ek_cmp_spiflash_defconfig
@@ -45,6 +45,7 @@ CONFIG_DM_GPIO=y
CONFIG_AT91_GPIO=y
CONFIG_DM_MMC=y
CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
# CONFIG_SYS_NAND_USE_FLASH_BBT is not set
CONFIG_NAND_ATMEL=y
diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
index 980dfbe..74e011a 100644
--- a/configs/sama5d3xek_mmc_defconfig
+++ b/configs/sama5d3xek_mmc_defconfig
@@ -64,6 +64,7 @@ CONFIG_DM_GPIO=y
CONFIG_AT91_GPIO=y
CONFIG_DM_MMC=y
CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig
index 01d938f..57d7d07 100644
--- a/configs/sama5d3xek_nandflash_defconfig
+++ b/configs/sama5d3xek_nandflash_defconfig
@@ -60,6 +60,7 @@ CONFIG_DM_GPIO=y
CONFIG_AT91_GPIO=y
CONFIG_DM_MMC=y
CONFIG_GENERIC_ATMEL_MCI=y
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/silk_defconfig b/configs/silk_defconfig
index 015f2d1..ea17cc3 100644
--- a/configs/silk_defconfig
+++ b/configs/silk_defconfig
@@ -68,8 +68,8 @@ CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_SH_MMCIF=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/sksimx6_defconfig b/configs/sksimx6_defconfig
index cc4f0ab..364b2e8 100644
--- a/configs/sksimx6_defconfig
+++ b/configs/sksimx6_defconfig
@@ -38,6 +38,7 @@ CONFIG_ENV_OFFSET_REDUND=0x64000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
diff --git a/configs/smdk5250_defconfig b/configs/smdk5250_defconfig
index b3e5828..f12542c 100644
--- a/configs/smdk5250_defconfig
+++ b/configs/smdk5250_defconfig
@@ -41,6 +41,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/smdk5420_defconfig b/configs/smdk5420_defconfig
index 968f3a1..ec35a91 100644
--- a/configs/smdk5420_defconfig
+++ b/configs/smdk5420_defconfig
@@ -36,6 +36,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/smdkc100_defconfig b/configs/smdkc100_defconfig
index 76bb74d..b46b9a3 100644
--- a/configs/smdkc100_defconfig
+++ b/configs/smdkc100_defconfig
@@ -24,6 +24,6 @@ CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-smdkc100"
CONFIG_ENV_IS_IN_ONENAND=y
CONFIG_ENV_ADDR=0x40000
# CONFIG_MMC is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x98800300
diff --git a/configs/smdkv310_defconfig b/configs/smdkv310_defconfig
index 95d83cf..4e1698b 100644
--- a/configs/smdkv310_defconfig
+++ b/configs/smdkv310_defconfig
@@ -25,6 +25,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x5000000
CONFIG_USB=y
diff --git a/configs/snow_defconfig b/configs/snow_defconfig
index c0d43e6..7e7a1a1 100644
--- a/configs/snow_defconfig
+++ b/configs/snow_defconfig
@@ -51,6 +51,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
index e822cdc..b482654 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -39,7 +39,7 @@ CONFIG_DWAPB_GPIO=y
CONFIG_FS_LOADER=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_DM_ETH=y
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index a3f3d53..d6788b7 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -44,7 +44,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index 3941db8..b17e2a6 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -44,7 +44,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_dbm_soc1_defconfig b/configs/socfpga_dbm_soc1_defconfig
index 3b4a1f5..3421b3d 100644
--- a/configs/socfpga_dbm_soc1_defconfig
+++ b/configs/socfpga_dbm_soc1_defconfig
@@ -48,7 +48,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_DM_ETH=y
CONFIG_PHY_GIGE=y
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index 5753b18..88b9b18 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -44,7 +44,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
diff --git a/configs/socfpga_de10_nano_defconfig b/configs/socfpga_de10_nano_defconfig
index 98ec7b3..1f49602 100644
--- a/configs/socfpga_de10_nano_defconfig
+++ b/configs/socfpga_de10_nano_defconfig
@@ -41,7 +41,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig
index c70ff1f..f341e43 100644
--- a/configs/socfpga_de1_soc_defconfig
+++ b/configs/socfpga_de1_soc_defconfig
@@ -39,7 +39,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_DM_ETH=y
diff --git a/configs/socfpga_is1_defconfig b/configs/socfpga_is1_defconfig
index 3374823..908a5cb 100644
--- a/configs/socfpga_is1_defconfig
+++ b/configs/socfpga_is1_defconfig
@@ -43,7 +43,7 @@ CONFIG_DWAPB_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_PHY_MICREL=y
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index e7267ae..be941b0 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -44,7 +44,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 06083c9..2adf626 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -45,7 +45,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index fbc471e..aad9199 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -49,7 +49,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=100000000
CONFIG_SPI_FLASH_STMICRO=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
diff --git a/configs/socfpga_stratix10_defconfig b/configs/socfpga_stratix10_defconfig
index e41588b..0665b46 100644
--- a/configs/socfpga_stratix10_defconfig
+++ b/configs/socfpga_stratix10_defconfig
@@ -41,6 +41,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DW=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0x2003
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig
index 130282c..19bed6b 100644
--- a/configs/socfpga_vining_fpga_defconfig
+++ b/configs/socfpga_vining_fpga_defconfig
@@ -72,7 +72,7 @@ CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=3
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=70
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
diff --git a/configs/spear300_defconfig b/configs/spear300_defconfig
index f020249..f8c0be4 100644
--- a/configs/spear300_defconfig
+++ b/configs/spear300_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xF8040000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/spear300_nand_defconfig b/configs/spear300_nand_defconfig
index 91038d0..b8ea9d2 100644
--- a/configs/spear300_nand_defconfig
+++ b/configs/spear300_nand_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/spear300_usbtty_defconfig b/configs/spear300_usbtty_defconfig
index 11b62c4..3b84d50 100644
--- a/configs/spear300_usbtty_defconfig
+++ b/configs/spear300_usbtty_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xF8040000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/spear300_usbtty_nand_defconfig b/configs/spear300_usbtty_nand_defconfig
index 99f3ead..c68df1d 100644
--- a/configs/spear300_usbtty_nand_defconfig
+++ b/configs/spear300_usbtty_nand_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/spear310_defconfig b/configs/spear310_defconfig
index e210ea7..865de76 100644
--- a/configs/spear310_defconfig
+++ b/configs/spear310_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xF8040000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/spear310_nand_defconfig b/configs/spear310_nand_defconfig
index b0b7293..497c5a2 100644
--- a/configs/spear310_nand_defconfig
+++ b/configs/spear310_nand_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/spear310_pnor_defconfig b/configs/spear310_pnor_defconfig
index 27cdb6b..ce26112 100644
--- a/configs/spear310_pnor_defconfig
+++ b/configs/spear310_pnor_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0x50060000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_PROTECTION=y
CONFIG_SYS_FLASH_CFI=y
diff --git a/configs/spear310_usbtty_defconfig b/configs/spear310_usbtty_defconfig
index 33fd690..82ce447 100644
--- a/configs/spear310_usbtty_defconfig
+++ b/configs/spear310_usbtty_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xF8040000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/spear310_usbtty_nand_defconfig b/configs/spear310_usbtty_nand_defconfig
index 8ff6880..239cb46 100644
--- a/configs/spear310_usbtty_nand_defconfig
+++ b/configs/spear310_usbtty_nand_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/spear310_usbtty_pnor_defconfig b/configs/spear310_usbtty_pnor_defconfig
index 79686cb..aa1ab29 100644
--- a/configs/spear310_usbtty_pnor_defconfig
+++ b/configs/spear310_usbtty_pnor_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0x50060000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_PROTECTION=y
CONFIG_SYS_FLASH_CFI=y
diff --git a/configs/spear320_defconfig b/configs/spear320_defconfig
index 0864acd..cd71ebe 100644
--- a/configs/spear320_defconfig
+++ b/configs/spear320_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xF8040000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/spear320_nand_defconfig b/configs/spear320_nand_defconfig
index 47704e9..703a2e8 100644
--- a/configs/spear320_nand_defconfig
+++ b/configs/spear320_nand_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/spear320_pnor_defconfig b/configs/spear320_pnor_defconfig
index 958be6b..f33c67b 100644
--- a/configs/spear320_pnor_defconfig
+++ b/configs/spear320_pnor_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0x44060000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_PROTECTION=y
CONFIG_SYS_FLASH_CFI=y
diff --git a/configs/spear320_usbtty_defconfig b/configs/spear320_usbtty_defconfig
index 954d325..d727959 100644
--- a/configs/spear320_usbtty_defconfig
+++ b/configs/spear320_usbtty_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xF8040000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/spear320_usbtty_nand_defconfig b/configs/spear320_usbtty_nand_defconfig
index 014d1a6..4183171 100644
--- a/configs/spear320_usbtty_nand_defconfig
+++ b/configs/spear320_usbtty_nand_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/spear320_usbtty_pnor_defconfig b/configs/spear320_usbtty_pnor_defconfig
index 0c24687..ee947cf 100644
--- a/configs/spear320_usbtty_pnor_defconfig
+++ b/configs/spear320_usbtty_pnor_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0x44060000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_PROTECTION=y
CONFIG_SYS_FLASH_CFI=y
diff --git a/configs/spear600_defconfig b/configs/spear600_defconfig
index d1369a9..bd69a66 100644
--- a/configs/spear600_defconfig
+++ b/configs/spear600_defconfig
@@ -28,8 +28,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xF8040000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/spear600_nand_defconfig b/configs/spear600_nand_defconfig
index c0a83c8..c7bfcad 100644
--- a/configs/spear600_nand_defconfig
+++ b/configs/spear600_nand_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/spear600_usbtty_defconfig b/configs/spear600_usbtty_defconfig
index 2affcfe..9811ba5 100644
--- a/configs/spear600_usbtty_defconfig
+++ b/configs/spear600_usbtty_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xF8040000
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/spear600_usbtty_nand_defconfig b/configs/spear600_usbtty_nand_defconfig
index 0c514f5..ae87614 100644
--- a/configs/spear600_usbtty_nand_defconfig
+++ b/configs/spear600_usbtty_nand_defconfig
@@ -25,8 +25,8 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/spring_defconfig b/configs/spring_defconfig
index ce98991..816fd71 100644
--- a/configs/spring_defconfig
+++ b/configs/spring_defconfig
@@ -51,6 +51,7 @@ CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig
index 4c5de08..036ff70 100644
--- a/configs/stmark2_defconfig
+++ b/configs/stmark2_defconfig
@@ -27,7 +27,7 @@ CONFIG_USE_ENV_SPI_CS=y
CONFIG_ENV_SPI_CS=1
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
# CONFIG_NET is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SF_DEFAULT_SPEED=50000000
CONFIG_SPI_FLASH_ISSI=y
diff --git a/configs/stout_defconfig b/configs/stout_defconfig
index 29d6420..2055a1e 100644
--- a/configs/stout_defconfig
+++ b/configs/stout_defconfig
@@ -66,8 +66,8 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_RENESAS_SDHI=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/suvd3_defconfig b/configs/suvd3_defconfig
index 659baa2..a3cdc8b 100644
--- a/configs/suvd3_defconfig
+++ b/configs/suvd3_defconfig
@@ -169,8 +169,8 @@ CONFIG_ENV_ADDR_REDUND=0xF00E0000
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index 1282d2c..83c3450 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -56,6 +56,7 @@ CONFIG_MISC=y
CONFIG_I2C_EEPROM=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/tqma6s_wru4_mmc_defconfig b/configs/tqma6s_wru4_mmc_defconfig
index 9feced7..a564e43 100644
--- a/configs/tqma6s_wru4_mmc_defconfig
+++ b/configs/tqma6s_wru4_mmc_defconfig
@@ -63,6 +63,7 @@ CONFIG_LED_STATUS_STATE5=2
CONFIG_LED_STATUS_CMD=y
CONFIG_PCA9551_LED=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_USB=y
diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig
index 3c247c1..74cfe56 100644
--- a/configs/trats2_defconfig
+++ b/configs/trats2_defconfig
@@ -39,6 +39,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_DM_PMIC=y
CONFIG_DM_PMIC_MAX77686=y
CONFIG_DM_REGULATOR=y
diff --git a/configs/trats_defconfig b/configs/trats_defconfig
index cdf3827..2e2bab0 100644
--- a/configs/trats_defconfig
+++ b/configs/trats_defconfig
@@ -38,6 +38,7 @@ CONFIG_MMC_DW=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_S5P=y
+CONFIG_MTD=y
CONFIG_DM_PMIC=y
CONFIG_PMIC_MAX8997=y
CONFIG_USB=y
diff --git a/configs/ts4800_defconfig b/configs/ts4800_defconfig
index 6a6b3e8..5701bfa 100644
--- a/configs/ts4800_defconfig
+++ b/configs/ts4800_defconfig
@@ -19,6 +19,7 @@ CONFIG_CMD_FAT=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_SPI=y
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index b8df1f5..df28752 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -148,8 +148,8 @@ CONFIG_ENV_ADDR_REDUND=0xF00E0000
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/tuxx1_defconfig b/configs/tuxx1_defconfig
index 562dcbd..75cd141 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -170,8 +170,8 @@ CONFIG_ENV_ADDR_REDUND=0xF00E0000
CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/uDPU_defconfig b/configs/uDPU_defconfig
index e9cc822..9a97479 100644
--- a/configs/uDPU_defconfig
+++ b/configs/uDPU_defconfig
@@ -59,6 +59,7 @@ CONFIG_DM_MMC=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_XENON=y
+CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_SF_DEFAULT_MODE=0
CONFIG_SPI_FLASH_BAR=y
diff --git a/configs/udoo_defconfig b/configs/udoo_defconfig
index 9b05ee6..1ec9c42 100644
--- a/configs/udoo_defconfig
+++ b/configs/udoo_defconfig
@@ -33,6 +33,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_DM=y
CONFIG_DWC_AHSATA=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
diff --git a/configs/usbarmory_defconfig b/configs/usbarmory_defconfig
index f66cad7..a0cb3e9 100644
--- a/configs/usbarmory_defconfig
+++ b/configs/usbarmory_defconfig
@@ -17,6 +17,7 @@ CONFIG_CMD_USB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_FSL_ESDHC_IMX=y
+CONFIG_MTD=y
CONFIG_USB=y
CONFIG_USB_EHCI_MX5=y
CONFIG_OF_LIBFDT=y
diff --git a/configs/variscite_dart6ul_defconfig b/configs/variscite_dart6ul_defconfig
index 7178b8e..9387c3b 100644
--- a/configs/variscite_dart6ul_defconfig
+++ b/configs/variscite_dart6ul_defconfig
@@ -35,6 +35,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM_I2C_GPIO=y
CONFIG_SYS_I2C_MXC=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_PHY_MICREL=y
CONFIG_FEC_MXC=y
diff --git a/configs/vexpress_aemv8a_juno_defconfig b/configs/vexpress_aemv8a_juno_defconfig
index d95d40f..153f597 100644
--- a/configs/vexpress_aemv8a_juno_defconfig
+++ b/configs/vexpress_aemv8a_juno_defconfig
@@ -32,8 +32,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xBFC0000
CONFIG_DM=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig
index 12302c6..c9cec83 100644
--- a/configs/vexpress_aemv8a_semi_defconfig
+++ b/configs/vexpress_aemv8a_semi_defconfig
@@ -32,8 +32,8 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xFFC0000
CONFIG_DM=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/vexpress_ca15_tc2_defconfig b/configs/vexpress_ca15_tc2_defconfig
index a1690dc..39bad6d 100644
--- a/configs/vexpress_ca15_tc2_defconfig
+++ b/configs/vexpress_ca15_tc2_defconfig
@@ -23,8 +23,8 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xFF80000
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/vexpress_ca5x2_defconfig b/configs/vexpress_ca5x2_defconfig
index c95cc38..2f2f737 100644
--- a/configs/vexpress_ca5x2_defconfig
+++ b/configs/vexpress_ca5x2_defconfig
@@ -22,8 +22,8 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xFF80000
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig
index 4007c5c..f10e73f 100644
--- a/configs/vexpress_ca9x4_defconfig
+++ b/configs/vexpress_ca9x4_defconfig
@@ -22,8 +22,8 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0x47F80000
+CONFIG_MTD=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/vyasa-rk3288_defconfig b/configs/vyasa-rk3288_defconfig
index 27fb95f..e15fec0 100644
--- a/configs/vyasa-rk3288_defconfig
+++ b/configs/vyasa-rk3288_defconfig
@@ -50,6 +50,7 @@ CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
+CONFIG_MTD=y
CONFIG_SF_DEFAULT_SPEED=20000000
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/warp7_bl33_defconfig b/configs/warp7_bl33_defconfig
index e75afc7..e27d69e 100644
--- a/configs/warp7_bl33_defconfig
+++ b/configs/warp7_bl33_defconfig
@@ -37,6 +37,7 @@ CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_DM_PMIC=y
diff --git a/configs/warp7_defconfig b/configs/warp7_defconfig
index 72cdb68..eb58077 100644
--- a/configs/warp7_defconfig
+++ b/configs/warp7_defconfig
@@ -43,6 +43,7 @@ CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PINCTRL=y
CONFIG_PINCTRL_IMX7=y
CONFIG_DM_PMIC=y
diff --git a/configs/x530_defconfig b/configs/x530_defconfig
index 7441e15..3592e6b 100644
--- a/configs/x530_defconfig
+++ b/configs/x530_defconfig
@@ -56,6 +56,7 @@ CONFIG_SYS_I2C_MVTWSI=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA954x=y
# CONFIG_MMC is not set
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_PXA3XX=y
diff --git a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
index 2637573..f05050d 100644
--- a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
@@ -54,7 +54,7 @@ CONFIG_SYS_I2C_CADENCE=y
CONFIG_MISC=y
# CONFIG_MMC is not set
CONFIG_DM_MMC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_ARASAN=y
CONFIG_SYS_NAND_MAX_CHIPS=2
diff --git a/configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig b/configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig
index deab384..9099c58 100644
--- a/configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig
@@ -52,7 +52,7 @@ CONFIG_MISC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_ZYNQ=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_ARASAN=y
CONFIG_PHY_MARVELL=y
diff --git a/configs/xpress_defconfig b/configs/xpress_defconfig
index 5e3e3b8..124abf1 100644
--- a/configs/xpress_defconfig
+++ b/configs/xpress_defconfig
@@ -30,6 +30,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_USB=y
diff --git a/configs/xpress_spl_defconfig b/configs/xpress_spl_defconfig
index a7bb6e9..6d4d7c4 100644
--- a/configs/xpress_spl_defconfig
+++ b/configs/xpress_spl_defconfig
@@ -41,6 +41,7 @@ CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MII=y
CONFIG_USB=y
diff --git a/configs/zc5202_defconfig b/configs/zc5202_defconfig
index 5755361..b2f6376 100644
--- a/configs/zc5202_defconfig
+++ b/configs/zc5202_defconfig
@@ -40,6 +40,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SF_DEFAULT_BUS=3
CONFIG_SF_DEFAULT_MODE=0
diff --git a/configs/zc5601_defconfig b/configs/zc5601_defconfig
index 49d5f4a..2fd3fcb 100644
--- a/configs/zc5601_defconfig
+++ b/configs/zc5601_defconfig
@@ -39,6 +39,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SF_DEFAULT_BUS=3
CONFIG_SF_DEFAULT_MODE=0
diff --git a/configs/zynq_cse_nand_defconfig b/configs/zynq_cse_nand_defconfig
index a4be252..816d58e 100644
--- a/configs/zynq_cse_nand_defconfig
+++ b/configs/zynq_cse_nand_defconfig
@@ -53,7 +53,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
# CONFIG_DM_DEVICE_REMOVE is not set
CONFIG_SPL_DM_SEQ_ALIAS=y
# CONFIG_MMC is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_ZYNQ=y
# CONFIG_EFI_LOADER is not set
diff --git a/configs/zynq_zc770_xm011_defconfig b/configs/zynq_zc770_xm011_defconfig
index cf4fe60..19f3efe 100644
--- a/configs/zynq_zc770_xm011_defconfig
+++ b/configs/zynq_zc770_xm011_defconfig
@@ -40,7 +40,7 @@ CONFIG_FPGA_XILINX=y
CONFIG_FPGA_ZYNQPL=y
CONFIG_DM_GPIO=y
# CONFIG_MMC is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_ZYNQ=y
CONFIG_DEBUG_UART_ZYNQ=y
diff --git a/configs/zynq_zc770_xm011_x16_defconfig b/configs/zynq_zc770_xm011_x16_defconfig
index b3ae334..0225e7b 100644
--- a/configs/zynq_zc770_xm011_x16_defconfig
+++ b/configs/zynq_zc770_xm011_x16_defconfig
@@ -40,7 +40,7 @@ CONFIG_FPGA_XILINX=y
CONFIG_FPGA_ZYNQPL=y
CONFIG_DM_GPIO=y
# CONFIG_MMC is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_ZYNQ=y
CONFIG_DEBUG_UART_ZYNQ=y
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index fe31273..5e7571c 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -3,6 +3,12 @@ menu "MTD Support"
config MTD_PARTITIONS
bool
+config MTD
+ bool "Enable MTD layer"
+ help
+ Enable the MTD stack, necessary to interract with NAND, NOR,
+ SPI-NOR, SPI-NAND, onenand, etc.
+
config DM_MTD
bool "Enable Driver Model for MTD drivers"
depends on DM
@@ -16,12 +22,6 @@ config MTD_NOR_FLASH
help
Enable support for parallel NOR flash.
-config MTD_DEVICE
- bool "Enable MTD Device for NAND and ONENAND devices"
- help
- Adds the MTD device infrastructure from the Linux kernel.
- Needed for mtdparts command support.
-
config FLASH_CFI_DRIVER
bool "Enable CFI Flash driver"
help
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 88e5711..bd4f533 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -3,7 +3,7 @@
# (C) Copyright 2000-2007
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
-ifneq (,$(findstring y,$(CONFIG_MTD_DEVICE)$(CONFIG_CMD_NAND)$(CONFIG_CMD_ONENAND)$(CONFIG_CMD_SF)$(CONFIG_CMD_MTD)))
+ifneq (,$(findstring y,$(CONFIG_MTD)$(CONFIG_CMD_NAND)$(CONFIG_CMD_ONENAND)$(CONFIG_CMD_SF)$(CONFIG_CMD_MTD)))
obj-y += mtdcore.o mtd_uboot.o
endif
obj-$(CONFIG_DM_MTD) += mtd-uclass.o
diff --git a/drivers/mtd/nand/raw/nand.c b/drivers/mtd/nand/raw/nand.c
index bca51ff..026419e 100644
--- a/drivers/mtd/nand/raw/nand.c
+++ b/drivers/mtd/nand/raw/nand.c
@@ -59,7 +59,7 @@ int nand_register(int devnum, struct mtd_info *mtd)
sprintf(dev_name[devnum], "nand%d", devnum);
mtd->name = dev_name[devnum];
-#ifdef CONFIG_MTD_DEVICE
+#ifdef CONFIG_MTD
/*
* Add MTD device so that we can reference it later
* via the mtdcore infrastructure (e.g. ubi).
diff --git a/drivers/mtd/onenand/onenand_uboot.c b/drivers/mtd/onenand/onenand_uboot.c
index c15ec9d..6893394 100644
--- a/drivers/mtd/onenand/onenand_uboot.c
+++ b/drivers/mtd/onenand/onenand_uboot.c
@@ -43,7 +43,7 @@ void onenand_init(void)
puts("Flex-");
puts("OneNAND: ");
-#ifdef CONFIG_MTD_DEVICE
+#ifdef CONFIG_MTD
/*
* Add MTD device so that we can reference it later
* via the mtdcore infrastructure (e.g. ubi).
diff --git a/include/configs/mvebu_armada-37xx.h b/include/configs/mvebu_armada-37xx.h
index 172bfc8..8b54bee 100644
--- a/include/configs/mvebu_armada-37xx.h
+++ b/include/configs/mvebu_armada-37xx.h
@@ -56,7 +56,7 @@
* SPI Flash configuration
*/
-#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
+#define CONFIG_MTD /* needed for mtdparts commands */
#define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
/* Environment in SPI NOR flash */
diff --git a/include/configs/sam9x60ek.h b/include/configs/sam9x60ek.h
index 3dda869..9b439a6 100644
--- a/include/configs/sam9x60ek.h
+++ b/include/configs/sam9x60ek.h
@@ -52,8 +52,6 @@
#define CONFIG_SYS_NAND_ENABLE_PIN AT91_PIN_PD4
#define CONFIG_SYS_NAND_READY_PIN AT91_PIN_PD5
#define CONFIG_SYS_NAND_ONFI_DETECTION
-
-#define CONFIG_MTD_DEVICE
#endif
/* PMECC & PMERRLOC */
diff --git a/include/configs/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h
index e8e66fa..4e7c300 100644
--- a/include/configs/socfpga_stratix10_socdk.h
+++ b/include/configs/socfpga_stratix10_socdk.h
@@ -62,7 +62,7 @@
/*#define CONFIG_ENV_IS_IN_SPI_FLASH*/
#ifndef CONFIG_SPL_BUILD
-#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD
#define CONFIG_MTD_PARTITIONS
#define MTDIDS_DEFAULT "nor0=ff705000.spi.0"
#endif /* CONFIG_SPL_BUILD */
diff --git a/include/configs/x530.h b/include/configs/x530.h
index b4e986e..b6bff22 100644
--- a/include/configs/x530.h
+++ b/include/configs/x530.h
@@ -73,7 +73,6 @@
#define CONFIG_CMD_UBI
#define CONFIG_CMD_UBIFS
#define CONFIG_LZO
-#define CONFIG_MTD_DEVICE
#define CONFIG_CMD_MTDPARTS
#define CONFIG_SYS_MALLOC_LEN (4 << 20)