[U-Boot] [PATCH v5 03/26] mtd: rename CONFIG_MTD_DEVICE -> CONFIG_MTD
Miquel Raynal
miquel.raynal at bootlin.com
Thu Oct 3 17:50:05 UTC 2019
Like in Linux, just use CONFIG_MTD to compile the MTD stack.
Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon at bootlin.com>
---
cmd/Kconfig | 2 +-
configs/10m50_defconfig | 2 +-
configs/TQM834x_defconfig | 2 +-
configs/TWR-P1025_defconfig | 2 +-
configs/alt_defconfig | 2 +-
configs/bitmain_antminer_s9_defconfig | 2 +-
configs/brppt1_spi_defconfig | 2 +-
configs/crs305-1g-4s_defconfig | 2 +-
configs/da850evm_defconfig | 1 -
configs/db-xc3-24g4xg_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/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/vexpress_aemv8a_juno_defconfig | 2 +-
configs/vexpress_aemv8a_semi_defconfig | 2 +-
configs/vexpress_ca15_tc2_defconfig | 2 +-
configs/vexpress_ca5x2_defconfig | 2 +-
configs/vexpress_ca9x4_defconfig | 2 +-
configs/x530_defconfig | 1 +
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 +-
include/configs/x530.h | 1 -
91 files changed, 91 insertions(+), 95 deletions(-)
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 98647f58b7..bcfbbb4fc6 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1895,7 +1895,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 d2e85c9408..effd305a3c 100644
--- a/configs/TQM834x_defconfig
+++ b/configs/TQM834x_defconfig
@@ -140,7 +140,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 53f66c714d..d997666b4b 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 44a1698d45..e9280d587a 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -65,8 +65,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=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/bitmain_antminer_s9_defconfig b/configs/bitmain_antminer_s9_defconfig
index 966fc9134e..21cd33a2ec 100644
--- a/configs/bitmain_antminer_s9_defconfig
+++ b/configs/bitmain_antminer_s9_defconfig
@@ -57,7 +57,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 a29dc0385e..4d7bab6d10 100644
--- a/configs/brppt1_spi_defconfig
+++ b/configs/brppt1_spi_defconfig
@@ -85,7 +85,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_SF_DEFAULT_SPEED=24000000
diff --git a/configs/crs305-1g-4s_defconfig b/configs/crs305-1g-4s_defconfig
index 6146556968..8049747f0a 100644
--- a/configs/crs305-1g-4s_defconfig
+++ b/configs/crs305-1g-4s_defconfig
@@ -33,7 +33,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MVTWSI=y
# CONFIG_MMC is not set
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SFDP_SUPPORT=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 5eb015022f..e352c75f6f 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -57,7 +57,6 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DAVINCI=y
CONFIG_DM_MMC=y
CONFIG_MTD=y
-CONFIG_MTD_DEVICE=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SF_DEFAULT_SPEED=30000000
diff --git a/configs/db-xc3-24g4xg_defconfig b/configs/db-xc3-24g4xg_defconfig
index 20c7f8931b..58b2843c47 100644
--- a/configs/db-xc3-24g4xg_defconfig
+++ b/configs/db-xc3-24g4xg_defconfig
@@ -36,7 +36,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MVTWSI=y
# CONFIG_MMC is not set
CONFIG_DM_MTD=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=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 e48b6467e6..33b6dda17a 100644
--- a/configs/display5_defconfig
+++ b/configs/display5_defconfig
@@ -68,7 +68,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_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 5b79057074..955c6f3d5d 100644
--- a/configs/display5_factory_defconfig
+++ b/configs/display5_factory_defconfig
@@ -67,7 +67,7 @@ CONFIG_DFU_MMC=y
CONFIG_DFU_SF=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_SPI_FLASH=y
CONFIG_SF_DEFAULT_BUS=1
CONFIG_SF_DEFAULT_MODE=0
diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig
index 408904df22..9720ff8e91 100644
--- a/configs/ds414_defconfig
+++ b/configs/ds414_defconfig
@@ -50,7 +50,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=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_PHY_ADDR_ENABLE=y
diff --git a/configs/gose_defconfig b/configs/gose_defconfig
index d5649aff79..0109bf7552 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -63,8 +63,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 8c79cbad40..6b343bf7b3 100644
--- a/configs/gwventana_emmc_defconfig
+++ b/configs/gwventana_emmc_defconfig
@@ -64,7 +64,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 6b2e0c7fc4..48ce0112ae 100644
--- a/configs/gwventana_gw5904_defconfig
+++ b/configs/gwventana_gw5904_defconfig
@@ -64,7 +64,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/kmeter1_defconfig b/configs/kmeter1_defconfig
index 518e9f4229..369ba6a9d4 100644
--- a/configs/kmeter1_defconfig
+++ b/configs/kmeter1_defconfig
@@ -144,7 +144,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# 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 8231ce4d7c..a72dc7f808 100644
--- a/configs/kmopti2_defconfig
+++ b/configs/kmopti2_defconfig
@@ -164,7 +164,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# 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 72931a716f..8ce90cd23f 100644
--- a/configs/kmsupx5_defconfig
+++ b/configs/kmsupx5_defconfig
@@ -144,7 +144,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# 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 42fbbbbac3..c131d7f2ef 100644
--- a/configs/kmtepr2_defconfig
+++ b/configs/kmtepr2_defconfig
@@ -164,7 +164,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# 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 1118e7b69c..232714e578 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -63,8 +63,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/lager_defconfig b/configs/lager_defconfig
index c6f5b71a31..cde19d1b83 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -65,8 +65,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/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index f0aac83850..586ea618a7 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -31,7 +31,6 @@ CONFIG_DM=y
CONFIG_FSL_USDHC=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 f8acb5e81b..cfc911d13f 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -32,7 +32,6 @@ CONFIG_DM=y
CONFIG_FSL_USDHC=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 94b9c78a6c..dbf5cecaeb 100644
--- a/configs/microblaze-generic_defconfig
+++ b/configs/microblaze-generic_defconfig
@@ -47,7 +47,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 8bfa845439..2d2ba05170 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -63,8 +63,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=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index f5a8428f21..4acdd21662 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -46,7 +46,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 ad52e3a2cb..de4a094b79 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 60ca53baa9..07da617814 100644
--- a/configs/silk_defconfig
+++ b/configs/silk_defconfig
@@ -65,8 +65,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=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/smdkc100_defconfig b/configs/smdkc100_defconfig
index 88b56cbb81..8ecae59679 100644
--- a/configs/smdkc100_defconfig
+++ b/configs/smdkc100_defconfig
@@ -22,6 +22,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 a2d555b9b4..f2f3acfd6f 100644
--- a/configs/socfpga_arria10_defconfig
+++ b/configs/socfpga_arria10_defconfig
@@ -36,7 +36,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 d591c7e4d7..7517df6e1e 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -42,7 +42,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_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index 3f9766d0fb..1c576cedfe 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -42,7 +42,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_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/socfpga_dbm_soc1_defconfig b/configs/socfpga_dbm_soc1_defconfig
index c6c8f073ea..7a2532cd5f 100644
--- a/configs/socfpga_dbm_soc1_defconfig
+++ b/configs/socfpga_dbm_soc1_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_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 bbd9d7f4b4..f677149bec 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -42,7 +42,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 a2f58766cc..0fdaf402f2 100644
--- a/configs/socfpga_de10_nano_defconfig
+++ b/configs/socfpga_de10_nano_defconfig
@@ -38,7 +38,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 fa2bace56f..2882b54779 100644
--- a/configs/socfpga_de1_soc_defconfig
+++ b/configs/socfpga_de1_soc_defconfig
@@ -36,7 +36,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 9e58fd1158..274e2aa382 100644
--- a/configs/socfpga_is1_defconfig
+++ b/configs/socfpga_is1_defconfig
@@ -40,7 +40,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_STMICRO=y
CONFIG_PHY_MICREL=y
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index a3c6af7810..8e804a425f 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -42,7 +42,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_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index 1143cd3f37..7c78fa3224 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -43,7 +43,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_MACRONIX=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index 89349ceb4e..e4286e5415 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_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=y
CONFIG_SF_DEFAULT_SPEED=100000000
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/socfpga_vining_fpga_defconfig b/configs/socfpga_vining_fpga_defconfig
index 6b2266fdfd..627009d632 100644
--- a/configs/socfpga_vining_fpga_defconfig
+++ b/configs/socfpga_vining_fpga_defconfig
@@ -67,7 +67,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=y
CONFIG_SPI_FLASH_SPANSION=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/spear300_defconfig b/configs/spear300_defconfig
index 8e22c1e9d1..c44167bedf 100644
--- a/configs/spear300_defconfig
+++ b/configs/spear300_defconfig
@@ -23,7 +23,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 0fc1198d4a..85976ee03a 100644
--- a/configs/spear300_nand_defconfig
+++ b/configs/spear300_nand_defconfig
@@ -23,7 +23,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 fbdd4a31af..6ebab8be1f 100644
--- a/configs/spear300_usbtty_defconfig
+++ b/configs/spear300_usbtty_defconfig
@@ -23,7 +23,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 93979928e0..31292e27bb 100644
--- a/configs/spear300_usbtty_nand_defconfig
+++ b/configs/spear300_usbtty_nand_defconfig
@@ -23,7 +23,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 423e1ff009..7b8bd93e9c 100644
--- a/configs/spear310_defconfig
+++ b/configs/spear310_defconfig
@@ -23,7 +23,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 bd2bb5abcd..22dc7a10fb 100644
--- a/configs/spear310_nand_defconfig
+++ b/configs/spear310_nand_defconfig
@@ -23,7 +23,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 dea51b9efe..7d61243bf6 100644
--- a/configs/spear310_pnor_defconfig
+++ b/configs/spear310_pnor_defconfig
@@ -23,7 +23,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 722c84804d..71713f242c 100644
--- a/configs/spear310_usbtty_defconfig
+++ b/configs/spear310_usbtty_defconfig
@@ -23,7 +23,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 9802082f11..877c09f39a 100644
--- a/configs/spear310_usbtty_nand_defconfig
+++ b/configs/spear310_usbtty_nand_defconfig
@@ -23,7 +23,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 7fd7dda431..3b4af6bc41 100644
--- a/configs/spear310_usbtty_pnor_defconfig
+++ b/configs/spear310_usbtty_pnor_defconfig
@@ -23,7 +23,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 979bf04121..319ae23147 100644
--- a/configs/spear320_defconfig
+++ b/configs/spear320_defconfig
@@ -23,7 +23,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 cb8feb655c..e1f2b19cc2 100644
--- a/configs/spear320_nand_defconfig
+++ b/configs/spear320_nand_defconfig
@@ -23,7 +23,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 f7dd487115..311d69e085 100644
--- a/configs/spear320_pnor_defconfig
+++ b/configs/spear320_pnor_defconfig
@@ -23,7 +23,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 9fab406f13..f7f933093d 100644
--- a/configs/spear320_usbtty_defconfig
+++ b/configs/spear320_usbtty_defconfig
@@ -23,7 +23,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 9b3ad1b354..36e7d2afcd 100644
--- a/configs/spear320_usbtty_nand_defconfig
+++ b/configs/spear320_usbtty_nand_defconfig
@@ -23,7 +23,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 1dfac113d3..6908fb7435 100644
--- a/configs/spear320_usbtty_pnor_defconfig
+++ b/configs/spear320_usbtty_pnor_defconfig
@@ -23,7 +23,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 eeb2746a9e..7120cd6c1e 100644
--- a/configs/spear600_defconfig
+++ b/configs/spear600_defconfig
@@ -26,7 +26,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 b37b19d87e..9c7c604e12 100644
--- a/configs/spear600_nand_defconfig
+++ b/configs/spear600_nand_defconfig
@@ -23,7 +23,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 2e6f3f159c..1d001ca057 100644
--- a/configs/spear600_usbtty_defconfig
+++ b/configs/spear600_usbtty_defconfig
@@ -23,7 +23,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 1d57def8a9..dd98ff137d 100644
--- a/configs/spear600_usbtty_nand_defconfig
+++ b/configs/spear600_usbtty_nand_defconfig
@@ -23,7 +23,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 b039ebb9ea..796a69ed55 100644
--- a/configs/stmark2_defconfig
+++ b/configs/stmark2_defconfig
@@ -24,7 +24,7 @@ CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_USE_ENV_SPI_CS=y
CONFIG_ENV_SPI_CS=1
# CONFIG_NET is not set
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SF_DEFAULT_SPEED=50000000
diff --git a/configs/stout_defconfig b/configs/stout_defconfig
index c38d0c339f..63623a020b 100644
--- a/configs/stout_defconfig
+++ b/configs/stout_defconfig
@@ -64,7 +64,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_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/suvd3_defconfig b/configs/suvd3_defconfig
index bb21bde3ee..9c45501038 100644
--- a/configs/suvd3_defconfig
+++ b/configs/suvd3_defconfig
@@ -165,7 +165,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# 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 22ba1929c7..3ddcad39d4 100644
--- a/configs/tuge1_defconfig
+++ b/configs/tuge1_defconfig
@@ -144,7 +144,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# 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 94214a2356..621e4ece7e 100644
--- a/configs/tuxx1_defconfig
+++ b/configs/tuxx1_defconfig
@@ -166,7 +166,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_BOOTLIMIT=3
# 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/vexpress_aemv8a_juno_defconfig b/configs/vexpress_aemv8a_juno_defconfig
index 0823d17c11..6891e79469 100644
--- a/configs/vexpress_aemv8a_juno_defconfig
+++ b/configs/vexpress_aemv8a_juno_defconfig
@@ -30,7 +30,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_DM=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_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/vexpress_aemv8a_semi_defconfig b/configs/vexpress_aemv8a_semi_defconfig
index db5ad3dfa5..ea96403e8e 100644
--- a/configs/vexpress_aemv8a_semi_defconfig
+++ b/configs/vexpress_aemv8a_semi_defconfig
@@ -30,7 +30,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_DM=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_USE_BUFFER_WRITE=y
CONFIG_SYS_FLASH_PROTECTION=y
diff --git a/configs/vexpress_ca15_tc2_defconfig b/configs/vexpress_ca15_tc2_defconfig
index 904c75614f..db242a7828 100644
--- a/configs/vexpress_ca15_tc2_defconfig
+++ b/configs/vexpress_ca15_tc2_defconfig
@@ -21,7 +21,7 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_FLASH=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_SYS_FLASH_PROTECTION=y
diff --git a/configs/vexpress_ca5x2_defconfig b/configs/vexpress_ca5x2_defconfig
index ca847a2f9a..18cdb8f734 100644
--- a/configs/vexpress_ca5x2_defconfig
+++ b/configs/vexpress_ca5x2_defconfig
@@ -20,7 +20,7 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_FLASH=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_SYS_FLASH_PROTECTION=y
diff --git a/configs/vexpress_ca9x4_defconfig b/configs/vexpress_ca9x4_defconfig
index 06fcfee1d3..771d5c9bbb 100644
--- a/configs/vexpress_ca9x4_defconfig
+++ b/configs/vexpress_ca9x4_defconfig
@@ -20,7 +20,7 @@ CONFIG_CMD_MMC=y
CONFIG_CMD_UBI=y
CONFIG_ENV_IS_IN_FLASH=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_SYS_FLASH_PROTECTION=y
diff --git a/configs/x530_defconfig b/configs/x530_defconfig
index 852039d32d..0b19a1af90 100644
--- a/configs/x530_defconfig
+++ b/configs/x530_defconfig
@@ -53,6 +53,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 9db0e21f56..9faebdcf46 100644
--- a/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
+++ b/configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
@@ -55,7 +55,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 826a48702f..2a0f97f456 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_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/zynq_cse_nand_defconfig b/configs/zynq_cse_nand_defconfig
index a07799fbcb..ae0e6d3690 100644
--- a/configs/zynq_cse_nand_defconfig
+++ b/configs/zynq_cse_nand_defconfig
@@ -53,7 +53,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 911148cc8f..029093396e 100644
--- a/configs/zynq_zc770_xm011_defconfig
+++ b/configs/zynq_zc770_xm011_defconfig
@@ -39,7 +39,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 a2cf0786fa..b24764e42d 100644
--- a/configs/zynq_zc770_xm011_x16_defconfig
+++ b/configs/zynq_zc770_xm011_x16_defconfig
@@ -39,7 +39,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 eac6930de6..3542042245 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 bc249039c8..3a890ab843 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/socfpga_stratix10_socdk.h b/include/configs/socfpga_stratix10_socdk.h
index 7b55dd14da..a1920caa9d 100644
--- a/include/configs/socfpga_stratix10_socdk.h
+++ b/include/configs/socfpga_stratix10_socdk.h
@@ -71,7 +71,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 */
diff --git a/include/configs/x530.h b/include/configs/x530.h
index 2269d1ed8c..c7d2aa91ae 100644
--- a/include/configs/x530.h
+++ b/include/configs/x530.h
@@ -77,7 +77,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)
--
2.20.1
More information about the U-Boot
mailing list