[U-Boot] [PATCH v3 04/28] mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD

Miquel Raynal
2018-12-04T23:56:50Z

Like in Linux, just use CONFIG_MTD to compile the MTD stack.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
cmd/Kconfig | 2 +-
configs/10m50_defconfig | 2 +-
configs/TQM834x_defconfig | 2 +-
configs/TWR-P1025_defconfig | 2 +-
configs/alt_defconfig | 2 +-
configs/am335x_evm_norboot_defconfig | 2 +-
configs/am335x_evm_spiboot_defconfig | 2 +-
configs/bitmain_antminer_s9_defconfig | 2 +-
configs/brppt1_spi_defconfig | 2 +-
configs/da850_am18xxevm_defconfig | 2 +-
configs/da850evm_defconfig | 2 +-
configs/display5_defconfig | 2 +-
configs/display5_factory_defconfig | 2 +-
configs/ds414_defconfig | 2 +-
configs/gose_defconfig | 2 +-
configs/gwventana_emmc_defconfig | 2 +-
configs/gwventana_gw5904_defconfig | 2 +-
configs/kmeter1_defconfig | 2 +-
configs/kmopti2_defconfig | 2 +-
configs/kmsupx5_defconfig | 2 +-
configs/kmtepr2_defconfig | 2 +-
configs/kmvect1_defconfig | 2 +-
configs/koelsch_defconfig | 2 +-
configs/lager_defconfig | 2 +-
configs/mccmon6_nor_defconfig | 1 -
configs/mccmon6_sd_defconfig | 1 -
configs/microblaze-generic_defconfig | 2 +-
configs/porter_defconfig | 2 +-
configs/r8a77995_draak_defconfig | 1 -
configs/s5pc210_universal_defconfig | 2 +-
configs/silk_defconfig | 2 +-
configs/smdkc100_defconfig | 2 +-
configs/socfpga_arria10_defconfig | 2 +-
configs/socfpga_arria5_defconfig | 2 +-
configs/socfpga_cyclone5_defconfig | 2 +-
configs/socfpga_dbm_soc1_defconfig | 2 +-
configs/socfpga_de0_nano_soc_defconfig | 2 +-
configs/socfpga_de10_nano_defconfig | 2 +-
configs/socfpga_de1_soc_defconfig | 2 +-
configs/socfpga_is1_defconfig | 2 +-
configs/socfpga_sockit_defconfig | 2 +-
configs/socfpga_socrates_defconfig | 2 +-
configs/socfpga_sr1500_defconfig | 2 +-
configs/socfpga_vining_fpga_defconfig | 2 +-
configs/spear300_defconfig | 2 +-
configs/spear300_nand_defconfig | 2 +-
configs/spear300_usbtty_defconfig | 2 +-
configs/spear300_usbtty_nand_defconfig | 2 +-
configs/spear310_defconfig | 2 +-
configs/spear310_nand_defconfig | 2 +-
configs/spear310_pnor_defconfig | 2 +-
configs/spear310_usbtty_defconfig | 2 +-
configs/spear310_usbtty_nand_defconfig | 2 +-
configs/spear310_usbtty_pnor_defconfig | 2 +-
configs/spear320_defconfig | 2 +-
configs/spear320_nand_defconfig | 2 +-
configs/spear320_pnor_defconfig | 2 +-
configs/spear320_usbtty_defconfig | 2 +-
configs/spear320_usbtty_nand_defconfig | 2 +-
configs/spear320_usbtty_pnor_defconfig | 2 +-
configs/spear600_defconfig | 2 +-
configs/spear600_nand_defconfig | 2 +-
configs/spear600_usbtty_defconfig | 2 +-
configs/spear600_usbtty_nand_defconfig | 2 +-
configs/stmark2_defconfig | 2 +-
configs/stout_defconfig | 2 +-
configs/suvd3_defconfig | 2 +-
configs/tuge1_defconfig | 2 +-
configs/tuxx1_defconfig | 2 +-
configs/vct_platinum_onenand_defconfig | 2 +-
configs/vct_platinum_onenand_small_defconfig | 2 +-
configs/vct_platinumavc_onenand_defconfig | 2 +-
configs/vct_platinumavc_onenand_small_defconfig | 2 +-
configs/vct_premium_onenand_defconfig | 2 +-
configs/vct_premium_onenand_small_defconfig | 2 +-
configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig | 2 +-
configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig | 2 +-
configs/zynq_cse_nand_defconfig | 2 +-
configs/zynq_zc770_xm011_defconfig | 2 +-
configs/zynq_zc770_xm011_x16_defconfig | 2 +-
drivers/mtd/Kconfig | 12 ++++++------
drivers/mtd/Makefile | 2 +-
drivers/mtd/nand/raw/nand.c | 2 +-
drivers/mtd/onenand/onenand_uboot.c | 2 +-
include/configs/mvebu_armada-37xx.h | 2 +-
include/configs/socfpga_stratix10_socdk.h | 2 +-
86 files changed, 88 insertions(+), 91 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index e2973b3c51..bf9cc0c52d 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1733,7 +1733,7 @@ config CMD_JFFS2

config CMD_MTDPARTS
bool "MTD partition support"
- select MTD_DEVICE if (CMD_NAND || NAND)
+ select MTD if (CMD_NAND || 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 8df747904b..d283a17105 100644
--- a/configs/10m50_defconfig
+++ b/configs/10m50_defconfig
@@ -23,9 +23,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 e1a7a06306..0922f246b8 100644
--- a/configs/TQM834x_defconfig
+++ b/configs/TQM834x_defconfig
@@ -24,7 +24,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=TQM834x-0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=TQM834x-0:256k(u-boot),256k(env),1m(kernel),2m(initrd),-(user);"
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 5ed6b5aa4a..47134f1e00 100644
--- a/configs/TWR-P1025_defconfig
+++ b/configs/TWR-P1025_defconfig
@@ -33,7 +33,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SATA_SIL3114=y
CONFIG_FSL_ESDHC=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 060f08ddd2..bc059a4ac4 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -62,8 +62,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_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig
index 5d7ccf0c5a..4911d26f2f 100644
--- a/configs/am335x_evm_norboot_defconfig
+++ b/configs/am335x_evm_norboot_defconfig
@@ -23,7 +23,7 @@ CONFIG_DFU_RAM=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_MMC_OMAP_HS=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig
index 10a935f0c0..57aae4a617 100644
--- a/configs/am335x_evm_spiboot_defconfig
+++ b/configs/am335x_evm_spiboot_defconfig
@@ -27,7 +27,7 @@ CONFIG_DFU_MMC=y
CONFIG_DFU_RAM=y
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_MMC_OMAP_HS=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_WINBOND=y
CONFIG_DRIVER_TI_CPSW=y
diff --git a/configs/bitmain_antminer_s9_defconfig b/configs/bitmain_antminer_s9_defconfig
index b3eca53fee..5774ad7173 100644
--- a/configs/bitmain_antminer_s9_defconfig
+++ b/configs/bitmain_antminer_s9_defconfig
@@ -54,7 +54,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_MTD_RAW_NAND_ZYNQ_USE_BOOTLOADER1_TIMINGS=y
diff --git a/configs/brppt1_spi_defconfig b/configs/brppt1_spi_defconfig
index 2fa5dacd7a..bb1d3abead 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -81,7 +81,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_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig
index 58745fec82..9ff40126bf 100644
--- a/configs/da850_am18xxevm_defconfig
+++ b/configs/da850_am18xxevm_defconfig
@@ -44,7 +44,7 @@ CONFIG_DA8XX_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_I2C_COMPAT=y
CONFIG_SYS_I2C_DAVINCI=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 1bb7b9a03e..e0869aecc9 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -48,7 +48,7 @@ CONFIG_DA8XX_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DAVINCI=y
CONFIG_DM_MMC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/display5_defconfig b/configs/display5_defconfig
index e6162e3cfb..0d1c769835 100644
--- a/configs/display5_defconfig
+++ b/configs/display5_defconfig
@@ -62,7 +62,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_SINGLEWORD=y
CONFIG_SYS_BOOTCOUNT_ADDR=0x020CC068
CONFIG_FSL_ESDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/display5_factory_defconfig b/configs/display5_factory_defconfig
index 6ef85e246c..c2becc5f62 100644
--- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig
@@ -63,7 +63,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_DFU_MMC=y
CONFIG_DFU_SF=y
CONFIG_FSL_ESDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig
index 5325bd9968..fe29ec46b4 100644
--- a/configs/ds414_defconfig
+++ b/configs/ds414_defconfig
@@ -42,7 +42,7 @@ CONFIG_DEFAULT_DEVICE_TREE="armada-xp-synology-ds414"
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_SPL_OF_TRANSLATE=y
# CONFIG_MMC is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/gose_defconfig b/configs/gose_defconfig
index 667f65f509..c3bbc4f05f 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -61,8 +61,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_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/gwventana_emmc_defconfig b/configs/gwventana_emmc_defconfig
index eb7614a75a..deb4e11947 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -61,7 +61,7 @@ CONFIG_DM=y
CONFIG_DWC_AHSATA=y
CONFIG_SUPPORT_EMMC_RPMB=y
CONFIG_FSL_ESDHC=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 e2408766e2..240933db97 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -61,7 +61,7 @@ CONFIG_DM=y
CONFIG_DWC_AHSATA=y
CONFIG_SUPPORT_EMMC_RPMB=y
CONFIG_FSL_ESDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_PHYLIB=y
CONFIG_MV88E61XX_SWITCH=y
CONFIG_MV88E61XX_CPU_PORT=5
diff --git a/configs/kmeter1_defconfig b/configs/kmeter1_defconfig
index 0c3fadfcf8..4e5e34c34a 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -32,7 +32,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0xE011BFF8
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 e8e821fb80..8fe3c09428 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -32,7 +32,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 86e2bd9237..cacd9bb4dc 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -32,7 +32,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 6170dc3f16..2a10fc19e7 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -32,7 +32,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/kmvect1_defconfig b/configs/kmvect1_defconfig
index 74b688fb5f..70d0742588 100644
--- a/configs/kmvect1_defconfig
+++ b/configs/kmvect1_defconfig
@@ -33,7 +33,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 40993ce625..aa265b06f7 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -61,8 +61,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_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/lager_defconfig b/configs/lager_defconfig
index 3a471fea94..88f6a7a7d7 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -63,8 +63,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_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index 87794b464a..645c3c8b74 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -30,7 +30,6 @@ CONFIG_DM=y
CONFIG_FSL_ESDHC=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 ec92be936a..4f14434488 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -31,7 +31,6 @@ CONFIG_DM=y
CONFIG_FSL_ESDHC=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/microblaze-generic_defconfig b/configs/microblaze-generic_defconfig
index 0b21020cff..3419b0f074 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -45,7 +45,7 @@ CONFIG_XILINX_GPIO=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/porter_defconfig b/configs/porter_defconfig
index 2c93bd2cb0..dd57fd668c 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -61,8 +61,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_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index 8165855b00..3b1412030c 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -45,7 +45,6 @@ CONFIG_MMC_HS200_SUPPORT=y
CONFIG_RENESAS_SDHI=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/s5pc210_universal_defconfig b/configs/s5pc210_universal_defconfig
index 5f5ff164ee..0e057726de 100644
--- a/configs/s5pc210_universal_defconfig
+++ b/configs/s5pc210_universal_defconfig
@@ -34,7 +34,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/silk_defconfig b/configs/silk_defconfig
index 7af02a34fc..bd8585b1a4 100644
--- a/configs/silk_defconfig
+++ b/configs/silk_defconfig
@@ -63,8 +63,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_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/smdkc100_defconfig b/configs/smdkc100_defconfig
index 87b638f21d..b841e4d026 100644
--- a/configs/smdkc100_defconfig
+++ b/configs/smdkc100_defconfig
@@ -21,6 +21,6 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=s3c-onenand:256k(bootloader),128k at 0x40000(para
CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-smdkc100"
CONFIG_ENV_IS_IN_ONENAND=y
# CONFIG_MMC is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x98800300
diff --git a/configs/socfpga_arria10_defconfig b/configs/socfpga_arria10_defconfig
index 6ebda81135..a9b0c7319a 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -33,7 +33,7 @@ CONFIG_FPGA_SOCFPGA=y
CONFIG_DM_GPIO=y
CONFIG_DWAPB_GPIO=y
CONFIG_DM_MMC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_MII=y
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index e7e1121c5c..04cf5d254a 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_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_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index 8989c4dc96..bd8216df59 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_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_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/socfpga_dbm_soc1_defconfig b/configs/socfpga_dbm_soc1_defconfig
index b6f4f8a3dd..f3103f0dfb 100644
--- a/configs/socfpga_dbm_soc1_defconfig
+++ b/configs/socfpga_dbm_soc1_defconfig
@@ -50,7 +50,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_DM_ETH=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index 1a9f2b6038..90850d9cab 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_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_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_DM_ETH=y
diff --git a/configs/socfpga_de10_nano_defconfig b/configs/socfpga_de10_nano_defconfig
index c9490d47a4..af15f1759b 100644
--- a/configs/socfpga_de10_nano_defconfig
+++ b/configs/socfpga_de10_nano_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_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_DM_ETH=y
diff --git a/configs/socfpga_de1_soc_defconfig b/configs/socfpga_de1_soc_defconfig
index b6c8e6c84d..c97c34c675 100644
--- a/configs/socfpga_de1_soc_defconfig
+++ b/configs/socfpga_de1_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_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 682e58fdb8..601b7018b0 100644
--- a/configs/socfpga_is1_defconfig
+++ b/configs/socfpga_is1_defconfig
@@ -46,7 +46,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=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index 66f7733ee8..2963bae333 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_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_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 05f38cbcd2..6cf12cb272 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -50,7 +50,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=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index 97366cdfff..41d8af06b1 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -51,7 +51,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=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig
index 6fcf8c66f8..a666fe1d32 100644
--- a/configs/socfpga_vining_fpga_defconfig
+++ b/configs/socfpga_vining_fpga_defconfig
@@ -66,7 +66,7 @@ CONFIG_LED_STATUS_BIT3=65
CONFIG_LED_STATUS_CMD=y
CONFIG_DM_MMC=y
CONFIG_MMC_DW=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/spear300_defconfig b/configs/spear300_defconfig
index 72f460c912..3a2e03081b 100644
--- a/configs/spear300_defconfig
+++ b/configs/spear300_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 441b8085e7..c34cf0bc25 100644
--- a/configs/spear300_nand_defconfig
+++ b/configs/spear300_nand_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 bc0c3ec091..1673163aaa 100644
--- a/configs/spear300_usbtty_defconfig
+++ b/configs/spear300_usbtty_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 5288573abb..449634bc39 100644
--- a/configs/spear300_usbtty_nand_defconfig
+++ b/configs/spear300_usbtty_nand_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 0fc0d0e939..3a6c50f822 100644
--- a/configs/spear310_defconfig
+++ b/configs/spear310_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 1d4d66f290..b8369d1f65 100644
--- a/configs/spear310_nand_defconfig
+++ b/configs/spear310_nand_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 906d813453..6066a2ff86 100644
--- a/configs/spear310_pnor_defconfig
+++ b/configs/spear310_pnor_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 7786e66998..83e291b0be 100644
--- a/configs/spear310_usbtty_defconfig
+++ b/configs/spear310_usbtty_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 83d1d5c1d7..e99024e1e1 100644
--- a/configs/spear310_usbtty_nand_defconfig
+++ b/configs/spear310_usbtty_nand_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 b5214b5d82..7e4dba1c82 100644
--- a/configs/spear310_usbtty_pnor_defconfig
+++ b/configs/spear310_usbtty_pnor_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 9c66bcf424..50c3769b8a 100644
--- a/configs/spear320_defconfig
+++ b/configs/spear320_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 4326cdd603..c7a765952f 100644
--- a/configs/spear320_nand_defconfig
+++ b/configs/spear320_nand_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 7177efea10..e54e04148d 100644
--- a/configs/spear320_pnor_defconfig
+++ b/configs/spear320_pnor_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 3c10f3261e..341f096cef 100644
--- a/configs/spear320_usbtty_defconfig
+++ b/configs/spear320_usbtty_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 e363ea9662..3e759aa2b7 100644
--- a/configs/spear320_usbtty_nand_defconfig
+++ b/configs/spear320_usbtty_nand_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 2cf39b450c..d7e20f8c04 100644
--- a/configs/spear320_usbtty_pnor_defconfig
+++ b/configs/spear320_usbtty_pnor_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 d2972c1f04..377fd18d1b 100644
--- a/configs/spear600_defconfig
+++ b/configs/spear600_defconfig
@@ -25,7 +25,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 bc5473a8d3..4460ac0814 100644
--- a/configs/spear600_nand_defconfig
+++ b/configs/spear600_nand_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 5c7b0a8ab4..369c20158b 100644
--- a/configs/spear600_usbtty_defconfig
+++ b/configs/spear600_usbtty_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 cbd25baa18..059ff1493e 100644
--- a/configs/spear600_usbtty_nand_defconfig
+++ b/configs/spear600_usbtty_nand_defconfig
@@ -22,7 +22,7 @@ CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_I2C_DW=y
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_PHY_GIGE=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig
index 48e851d4a4..15b7214c35 100644
--- a/configs/stmark2_defconfig
+++ b/configs/stmark2_defconfig
@@ -21,7 +21,7 @@ CONFIG_MTDIDS_DEFAULT="nor0=spi-flash.0"
CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-flash.0:1m(u-boot),7m(kernel),-(rootfs)"
CONFIG_ENV_IS_IN_SPI_FLASH=y
# CONFIG_NET is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_ISSI=y
CONFIG_SPI_FLASH_MTD=y
diff --git a/configs/stout_defconfig b/configs/stout_defconfig
index cbfc887045..ce00e56821 100644
--- a/configs/stout_defconfig
+++ b/configs/stout_defconfig
@@ -62,7 +62,7 @@ CONFIG_SYS_I2C_RCAR_IIC=y
CONFIG_DM_MMC=y
CONFIG_RENESAS_SDHI=y
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/suvd3_defconfig b/configs/suvd3_defconfig
index e6b97b866d..4e1e54060b 100644
--- a/configs/suvd3_defconfig
+++ b/configs/suvd3_defconfig
@@ -32,7 +32,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/tuge1_defconfig b/configs/tuge1_defconfig
index e5826719b9..2d92a98f5f 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -32,7 +32,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 204d3e4f68..8b32e0efb4 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -32,7 +32,7 @@ CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SYS_BOOTCOUNT_ADDR=0xE0113FF8
# CONFIG_MMC is not set
CONFIG_MTD_NOR_FLASH=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
CONFIG_FLASH_CFI_MTD=y
diff --git a/configs/vct_platinum_onenand_defconfig b/configs/vct_platinum_onenand_defconfig
index ded3de0499..1d3d405d8e 100644
--- a/configs/vct_platinum_onenand_defconfig
+++ b/configs/vct_platinum_onenand_defconfig
@@ -23,7 +23,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(u-boot),128k(env),20m(kernel),-(r
CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_ONENAND=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x00000000
CONFIG_SMC911X_32_BIT=y
diff --git a/configs/vct_platinum_onenand_small_defconfig b/configs/vct_platinum_onenand_small_defconfig
index 4afb03ee9e..50adb73129 100644
--- a/configs/vct_platinum_onenand_small_defconfig
+++ b/configs/vct_platinum_onenand_small_defconfig
@@ -29,5 +29,5 @@ CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
CONFIG_ENV_IS_IN_ONENAND=y
# CONFIG_NET is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vct_platinumavc_onenand_defconfig b/configs/vct_platinumavc_onenand_defconfig
index e7e9c6cde1..692fae7036 100644
--- a/configs/vct_platinumavc_onenand_defconfig
+++ b/configs/vct_platinumavc_onenand_defconfig
@@ -20,6 +20,6 @@ CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
# CONFIG_ISO_PARTITION is not set
CONFIG_ENV_IS_IN_ONENAND=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SYS_NS16550=y
# CONFIG_REGEX is not set
diff --git a/configs/vct_platinumavc_onenand_small_defconfig b/configs/vct_platinumavc_onenand_small_defconfig
index 776472666c..bcf39bc1ed 100644
--- a/configs/vct_platinumavc_onenand_small_defconfig
+++ b/configs/vct_platinumavc_onenand_small_defconfig
@@ -29,5 +29,5 @@ CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
CONFIG_ENV_IS_IN_ONENAND=y
# CONFIG_NET is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SYS_NS16550=y
diff --git a/configs/vct_premium_onenand_defconfig b/configs/vct_premium_onenand_defconfig
index f1d01d9c90..2e87bdf358 100644
--- a/configs/vct_premium_onenand_defconfig
+++ b/configs/vct_premium_onenand_defconfig
@@ -23,7 +23,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=onenand:128k(u-boot),128k(env),20m(kernel),-(r
CONFIG_CMD_UBI=y
# CONFIG_CMD_UBIFS is not set
CONFIG_ENV_IS_IN_ONENAND=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SMC911X=y
CONFIG_SMC911X_BASE=0x00000000
CONFIG_SMC911X_32_BIT=y
diff --git a/configs/vct_premium_onenand_small_defconfig b/configs/vct_premium_onenand_small_defconfig
index 751f881942..93fd4299d2 100644
--- a/configs/vct_premium_onenand_small_defconfig
+++ b/configs/vct_premium_onenand_small_defconfig
@@ -29,5 +29,5 @@ CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
CONFIG_ENV_IS_IN_ONENAND=y
# CONFIG_NET is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SYS_NS16550=y
diff --git a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
index 38871e5d6a..ebbda31f2e 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_SPI_FLASH=y
diff --git a/configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig b/configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig
index b1e4f4b60d..4851c5fe5d 100644
--- a/configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig
@@ -53,7 +53,7 @@ CONFIG_MISC=y
CONFIG_DM_MMC=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/zynq_cse_nand_defconfig b/configs/zynq_cse_nand_defconfig
index 77ccdb529d..575d9e3e86 100644
--- a/configs/zynq_cse_nand_defconfig
+++ b/configs/zynq_cse_nand_defconfig
@@ -45,7 +45,7 @@ CONFIG_DEFAULT_DEVICE_TREE="zynq-cse-nand"
# 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 29f30c90d0..373725baa0 100644
--- a/configs/zynq_zc770_xm011_defconfig
+++ b/configs/zynq_zc770_xm011_defconfig
@@ -36,7 +36,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 7632a876d5..f7d68e9bef 100644
--- a/configs/zynq_zc770_xm011_x16_defconfig
+++ b/configs/zynq_zc770_xm011_x16_defconfig
@@ -36,7 +36,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 ecd62642eb..345046c2a6 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 d490114147..486634b562 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -3,7 +3,7 @@
# (C) Copyright 2000-2007
# Wolfgang Denk, DENX Software Engineering, wd at 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 bca51ffbf2..026419e4e6 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 c15ec9df07..6893394e08 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 cf9440f90c..f93ab0f830 100644
--- a/include/configs/mvebu_armada-37xx.h
+++ b/include/configs/mvebu_armada-37xx.h
@@ -64,7 +64,7 @@
#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_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/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h
index e190b3d988..22e1dc84a1 100644
--- a/include/configs/socfpga_stratix10_socdk.h
+++ b/include/configs/socfpga_stratix10_socdk.h
@@ -76,7 +76,7 @@
#endif /* 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 */
--
2.19.1