aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2019-10-03 19:50:04 +0200
committerTom Rini <trini@konsulko.com>2019-12-03 23:04:10 -0500
commit1de770d5442769778c96bdac271590b44b2c7b78 (patch)
treeb35b1b0fae01ea4af15f852dd16d8b01c76ea5ee
parent88718be3001055fa2801a44ab10570279b3f2cb7 (diff)
downloadu-boot-1de770d5442769778c96bdac271590b44b2c7b78.zip
u-boot-1de770d5442769778c96bdac271590b44b2c7b78.tar.gz
u-boot-1de770d5442769778c96bdac271590b44b2c7b78.tar.bz2
mtd: rename CONFIG_MTD -> CONFIG_DM_MTD
CONFIG_MTD must be reserved for the MTD core. Like any other subsystem, prefix the symbol by DM when it comes to DM support. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Boris Brezillon <boris.brezillon@bootlin.com> [trini: Add Kconfig files] Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--configs/10m50_defconfig2
-rw-r--r--configs/3c120_defconfig2
-rw-r--r--configs/adp-ae3xx_defconfig2
-rw-r--r--configs/ae350_rv32_defconfig1
-rw-r--r--configs/ae350_rv32_xip_defconfig1
-rw-r--r--configs/ae350_rv64_defconfig1
-rw-r--r--configs/ae350_rv64_xip_defconfig1
-rw-r--r--configs/alt_defconfig2
-rw-r--r--configs/am335x_guardian_defconfig2
-rw-r--r--configs/bcm963158_ram_defconfig2
-rw-r--r--configs/bcm968380gerg_ram_defconfig2
-rw-r--r--configs/bcm968580xref_ram_defconfig2
-rw-r--r--configs/bk4r1_defconfig2
-rw-r--r--configs/boston32r2_defconfig2
-rw-r--r--configs/boston32r2el_defconfig2
-rw-r--r--configs/boston32r6_defconfig2
-rw-r--r--configs/boston32r6el_defconfig2
-rw-r--r--configs/boston64r2_defconfig2
-rw-r--r--configs/boston64r2el_defconfig2
-rw-r--r--configs/boston64r6_defconfig2
-rw-r--r--configs/boston64r6el_defconfig2
-rw-r--r--configs/colibri-imx6ull_defconfig2
-rw-r--r--configs/colibri_imx7_defconfig2
-rw-r--r--configs/colibri_t20_defconfig2
-rw-r--r--configs/colibri_vf_defconfig2
-rw-r--r--configs/comtrend_ct5361_ram_defconfig2
-rw-r--r--configs/comtrend_vr3032u_ram_defconfig2
-rw-r--r--configs/comtrend_wap5813n_ram_defconfig2
-rw-r--r--configs/crs305-1g-4s_defconfig2
-rw-r--r--configs/da850evm_defconfig2
-rw-r--r--configs/da850evm_direct_nor_defconfig2
-rw-r--r--configs/da850evm_nand_defconfig2
-rw-r--r--configs/db-xc3-24g4xg_defconfig2
-rw-r--r--configs/gardena-smart-gateway-mt7688-ram_defconfig2
-rw-r--r--configs/gardena-smart-gateway-mt7688_defconfig2
-rw-r--r--configs/gazerbeam_defconfig2
-rw-r--r--configs/gose_defconfig2
-rw-r--r--configs/harmony_defconfig2
-rw-r--r--configs/huawei_hg556a_ram_defconfig2
-rw-r--r--configs/imx6q_logic_defconfig2
-rw-r--r--configs/j721e_evm_a72_defconfig2
-rw-r--r--configs/khadas-vim2_defconfig2
-rw-r--r--configs/koelsch_defconfig2
-rw-r--r--configs/lager_defconfig2
-rw-r--r--configs/libretech-ac_defconfig2
-rw-r--r--configs/mccmon6_nor_defconfig2
-rw-r--r--configs/mccmon6_sd_defconfig2
-rw-r--r--configs/microchip_mpfs_icicle_defconfig1
-rw-r--r--configs/mscc_ocelot_defconfig2
-rw-r--r--configs/omapl138_lcdk_defconfig2
-rw-r--r--configs/pcm052_defconfig2
-rw-r--r--configs/pcm058_defconfig2
-rw-r--r--configs/pfla02_defconfig2
-rw-r--r--configs/phycore-am335x-r2-wega_defconfig2
-rw-r--r--configs/phycore_pcl063_defconfig2
-rw-r--r--configs/porter_defconfig2
-rw-r--r--configs/qemu-riscv32_defconfig1
-rw-r--r--configs/qemu-riscv32_smode_defconfig1
-rw-r--r--configs/qemu-riscv32_spl_defconfig1
-rw-r--r--configs/qemu-riscv64_defconfig1
-rw-r--r--configs/qemu-riscv64_smode_defconfig1
-rw-r--r--configs/qemu-riscv64_spl_defconfig1
-rw-r--r--configs/qemu_arm64_defconfig2
-rw-r--r--configs/qemu_arm_defconfig2
-rw-r--r--configs/r8a77995_draak_defconfig2
-rw-r--r--configs/sam9x60ek_qspiflash_defconfig2
-rw-r--r--configs/sfr_nb4-ser_ram_defconfig2
-rw-r--r--configs/sifive_fu540_defconfig1
-rw-r--r--configs/silk_defconfig2
-rw-r--r--configs/stm32f469-discovery_defconfig2
-rw-r--r--configs/stm32f746-disco_defconfig2
-rw-r--r--configs/stm32f769-disco_defconfig2
-rw-r--r--configs/stm32mp15_basic_defconfig2
-rw-r--r--configs/stm32mp15_optee_defconfig2
-rw-r--r--configs/stm32mp15_trusted_defconfig2
-rw-r--r--configs/stout_defconfig2
-rw-r--r--configs/uDPU_defconfig2
-rw-r--r--drivers/dfu/Kconfig2
-rw-r--r--drivers/mtd/Kconfig10
-rw-r--r--drivers/mtd/Makefile2
-rw-r--r--drivers/mtd/mtd_uboot.c2
-rw-r--r--drivers/mtd/nand/raw/Kconfig6
-rw-r--r--drivers/mtd/nand/spi/Kconfig2
-rw-r--r--include/flash.h2
84 files changed, 90 insertions, 78 deletions
diff --git a/configs/10m50_defconfig b/configs/10m50_defconfig
index 138bb52..e99e975 100644
--- a/configs/10m50_defconfig
+++ b/configs/10m50_defconfig
@@ -26,7 +26,7 @@ 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
diff --git a/configs/3c120_defconfig b/configs/3c120_defconfig
index 08758ca..e40f542 100644
--- a/configs/3c120_defconfig
+++ b/configs/3c120_defconfig
@@ -26,7 +26,7 @@ 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_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/adp-ae3xx_defconfig b/configs/adp-ae3xx_defconfig
index 2ea0609..1713cf9 100644
--- a/configs/adp-ae3xx_defconfig
+++ b/configs/adp-ae3xx_defconfig
@@ -30,7 +30,7 @@ CONFIG_MMC=y
CONFIG_DM_MMC=y
CONFIG_FTSDC010=y
CONFIG_FTSDC010_SDIO=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/ae350_rv32_defconfig b/configs/ae350_rv32_defconfig
index fdf3bdb..6ee182d 100644
--- a/configs/ae350_rv32_defconfig
+++ b/configs/ae350_rv32_defconfig
@@ -22,6 +22,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_MMC=y
CONFIG_FTSDC010=y
CONFIG_FTSDC010_SDIO=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/ae350_rv32_xip_defconfig b/configs/ae350_rv32_xip_defconfig
index 8ca2b80..719aeee 100644
--- a/configs/ae350_rv32_xip_defconfig
+++ b/configs/ae350_rv32_xip_defconfig
@@ -22,6 +22,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_MMC=y
CONFIG_FTSDC010=y
CONFIG_FTSDC010_SDIO=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/ae350_rv64_defconfig b/configs/ae350_rv64_defconfig
index dcce3d2..5824c85 100644
--- a/configs/ae350_rv64_defconfig
+++ b/configs/ae350_rv64_defconfig
@@ -23,6 +23,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_MMC=y
CONFIG_FTSDC010=y
CONFIG_FTSDC010_SDIO=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/ae350_rv64_xip_defconfig b/configs/ae350_rv64_xip_defconfig
index 4544828..85f2bcd 100644
--- a/configs/ae350_rv64_xip_defconfig
+++ b/configs/ae350_rv64_xip_defconfig
@@ -23,6 +23,7 @@ CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_MMC=y
CONFIG_FTSDC010=y
CONFIG_FTSDC010_SDIO=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/alt_defconfig b/configs/alt_defconfig
index f5b68e5..d0e2460 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -68,7 +68,7 @@ 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
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index 9a8fe5f..2d6204b 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -60,7 +60,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_BOOTCOUNT_ENV=y
CONFIG_MISC=y
# CONFIG_MMC is not set
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
CONFIG_SYS_NAND_U_BOOT_OFFS=0x100000
diff --git a/configs/bcm963158_ram_defconfig b/configs/bcm963158_ram_defconfig
index 22b74cd..4a203be 100644
--- a/configs/bcm963158_ram_defconfig
+++ b/configs/bcm963158_ram_defconfig
@@ -36,7 +36,7 @@ CONFIG_LED=y
CONFIG_LED_BCM6858=y
CONFIG_LED_BLINK=y
# CONFIG_MMC is not set
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_BRCMNAND=y
CONFIG_NAND_BRCMNAND_63158=y
diff --git a/configs/bcm968380gerg_ram_defconfig b/configs/bcm968380gerg_ram_defconfig
index c06be27..e84c7b7 100644
--- a/configs/bcm968380gerg_ram_defconfig
+++ b/configs/bcm968380gerg_ram_defconfig
@@ -39,7 +39,7 @@ CONFIG_BCM6345_GPIO=y
CONFIG_LED=y
CONFIG_LED_BCM6328=y
CONFIG_LED_BLINK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_BRCMNAND=y
CONFIG_NAND_BRCMNAND_6838=y
diff --git a/configs/bcm968580xref_ram_defconfig b/configs/bcm968580xref_ram_defconfig
index 9e86084..07c9928 100644
--- a/configs/bcm968580xref_ram_defconfig
+++ b/configs/bcm968580xref_ram_defconfig
@@ -32,7 +32,7 @@ CONFIG_LED=y
CONFIG_LED_BCM6858=y
CONFIG_LED_BLINK=y
# CONFIG_MMC is not set
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_BRCMNAND=y
CONFIG_NAND_BRCMNAND_6858=y
diff --git a/configs/bk4r1_defconfig b/configs/bk4r1_defconfig
index 9b68650..7b69d68 100644
--- a/configs/bk4r1_defconfig
+++ b/configs/bk4r1_defconfig
@@ -58,7 +58,7 @@ CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=6
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC_IMX=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_VF610_NFC=y
CONFIG_NAND_VF610_NFC_DT=y
diff --git a/configs/boston32r2_defconfig b/configs/boston32r2_defconfig
index 3904d0f..309ed2e 100644
--- a/configs/boston32r2_defconfig
+++ b/configs/boston32r2_defconfig
@@ -30,7 +30,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xBFFE0000
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CLK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/boston32r2el_defconfig b/configs/boston32r2el_defconfig
index 8974e71..4c31a1a 100644
--- a/configs/boston32r2el_defconfig
+++ b/configs/boston32r2el_defconfig
@@ -31,7 +31,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xBFFE0000
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CLK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/boston32r6_defconfig b/configs/boston32r6_defconfig
index 0724423..7e33423 100644
--- a/configs/boston32r6_defconfig
+++ b/configs/boston32r6_defconfig
@@ -31,7 +31,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xBFFE0000
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CLK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/boston32r6el_defconfig b/configs/boston32r6el_defconfig
index 5d316d7..e3a752c 100644
--- a/configs/boston32r6el_defconfig
+++ b/configs/boston32r6el_defconfig
@@ -32,7 +32,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xBFFE0000
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CLK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/boston64r2_defconfig b/configs/boston64r2_defconfig
index 09aa978..accedd4 100644
--- a/configs/boston64r2_defconfig
+++ b/configs/boston64r2_defconfig
@@ -31,7 +31,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xFFFFFFFFBFFE0000
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CLK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/boston64r2el_defconfig b/configs/boston64r2el_defconfig
index d48083d..d8657a3 100644
--- a/configs/boston64r2el_defconfig
+++ b/configs/boston64r2el_defconfig
@@ -32,7 +32,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xFFFFFFFFBFFE0000
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CLK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/boston64r6_defconfig b/configs/boston64r6_defconfig
index 140817f..e47268b 100644
--- a/configs/boston64r6_defconfig
+++ b/configs/boston64r6_defconfig
@@ -31,7 +31,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xFFFFFFFFBFFE0000
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CLK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/boston64r6el_defconfig b/configs/boston64r6el_defconfig
index 9c99a92..6df19e2 100644
--- a/configs/boston64r6el_defconfig
+++ b/configs/boston64r6el_defconfig
@@ -32,7 +32,7 @@ CONFIG_ENV_IS_IN_FLASH=y
CONFIG_ENV_ADDR=0xFFFFFFFFBFFE0000
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_CLK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig
index 73b53c3..cc50d43 100644
--- a/configs/colibri-imx6ull_defconfig
+++ b/configs/colibri-imx6ull_defconfig
@@ -58,7 +58,7 @@ CONFIG_DM_I2C=y
CONFIG_SYS_I2C_MXC=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_MXS=y
diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig
index badaaa5..79eec78 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -58,7 +58,7 @@ CONFIG_DM_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_MXS_DT=y
CONFIG_MTD_UBI_FASTMAP=y
diff --git a/configs/colibri_t20_defconfig b/configs/colibri_t20_defconfig
index 0d18de0..4428433 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -42,7 +42,7 @@ CONFIG_IP_DEFRAG=y
CONFIG_TFTP_BLOCKSIZE=1536
CONFIG_SPL_DM=y
CONFIG_SYS_I2C_TEGRA=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_UBI_FASTMAP=y
CONFIG_DM_PMIC=y
CONFIG_DM_REGULATOR=y
diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig
index 10f935e..1cbbff9 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -62,7 +62,7 @@ CONFIG_VYBRID_GPIO=y
CONFIG_DM_MMC=y
# CONFIG_MMC_HW_PARTITIONING is not set
CONFIG_FSL_ESDHC_IMX=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_VF610_NFC=y
CONFIG_NAND_VF610_NFC_DT=y
diff --git a/configs/comtrend_ct5361_ram_defconfig b/configs/comtrend_ct5361_ram_defconfig
index 46b4f0d..55a20c8 100644
--- a/configs/comtrend_ct5361_ram_defconfig
+++ b/configs/comtrend_ct5361_ram_defconfig
@@ -38,7 +38,7 @@ CONFIG_DM_GPIO=y
CONFIG_BCM6345_GPIO=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/comtrend_vr3032u_ram_defconfig b/configs/comtrend_vr3032u_ram_defconfig
index e2383f2..835e09b 100644
--- a/configs/comtrend_vr3032u_ram_defconfig
+++ b/configs/comtrend_vr3032u_ram_defconfig
@@ -40,7 +40,7 @@ CONFIG_DM_GPIO=y
CONFIG_LED=y
CONFIG_LED_BCM6328=y
CONFIG_LED_BLINK=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_BRCMNAND=y
CONFIG_NAND_BRCMNAND_6368=y
diff --git a/configs/comtrend_wap5813n_ram_defconfig b/configs/comtrend_wap5813n_ram_defconfig
index 21edb3e..52ca909 100644
--- a/configs/comtrend_wap5813n_ram_defconfig
+++ b/configs/comtrend_wap5813n_ram_defconfig
@@ -38,7 +38,7 @@ CONFIG_DM_GPIO=y
CONFIG_BCM6345_GPIO=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/crs305-1g-4s_defconfig b/configs/crs305-1g-4s_defconfig
index 81f3d0a..dfff800 100644
--- a/configs/crs305-1g-4s_defconfig
+++ b/configs/crs305-1g-4s_defconfig
@@ -35,7 +35,7 @@ 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
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 1a9bf52..c28cee5 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -60,7 +60,7 @@ 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
diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig
index c8cdb2b..65b774b 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -48,7 +48,7 @@ CONFIG_DA8XX_GPIO=y
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_DAVINCI=y
# CONFIG_MMC is not set
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
diff --git a/configs/da850evm_nand_defconfig b/configs/da850evm_nand_defconfig
index 2ffb931..6a293b7 100644
--- a/configs/da850evm_nand_defconfig
+++ b/configs/da850evm_nand_defconfig
@@ -54,7 +54,7 @@ CONFIG_DM_GPIO=y
CONFIG_DA8XX_GPIO=y
CONFIG_DM_I2C=y
CONFIG_DM_MMC=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_DAVINCI=y
diff --git a/configs/db-xc3-24g4xg_defconfig b/configs/db-xc3-24g4xg_defconfig
index e190ffe..bfac43a 100644
--- a/configs/db-xc3-24g4xg_defconfig
+++ b/configs/db-xc3-24g4xg_defconfig
@@ -38,7 +38,7 @@ 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
diff --git a/configs/gardena-smart-gateway-mt7688-ram_defconfig b/configs/gardena-smart-gateway-mt7688-ram_defconfig
index 9a149a5..6fea45e 100644
--- a/configs/gardena-smart-gateway-mt7688-ram_defconfig
+++ b/configs/gardena-smart-gateway-mt7688-ram_defconfig
@@ -53,7 +53,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_LED=y
CONFIG_LED_BLINK=y
CONFIG_LED_GPIO=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_SPI_NAND=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/gardena-smart-gateway-mt7688_defconfig b/configs/gardena-smart-gateway-mt7688_defconfig
index 45407d8..992e915 100644
--- a/configs/gardena-smart-gateway-mt7688_defconfig
+++ b/configs/gardena-smart-gateway-mt7688_defconfig
@@ -56,7 +56,7 @@ CONFIG_BOOTCOUNT_LIMIT=y
CONFIG_LED=y
CONFIG_LED_BLINK=y
CONFIG_LED_GPIO=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_SPI_NAND=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/gazerbeam_defconfig b/configs/gazerbeam_defconfig
index 1c71666..f2907c7 100644
--- a/configs/gazerbeam_defconfig
+++ b/configs/gazerbeam_defconfig
@@ -169,7 +169,7 @@ CONFIG_GDSYS_SOC=y
CONFIG_IHS_FPGA=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/gose_defconfig b/configs/gose_defconfig
index 5983e40..fa76866 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -67,7 +67,7 @@ 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
diff --git a/configs/harmony_defconfig b/configs/harmony_defconfig
index 0ff1f2c..cf992b2 100644
--- a/configs/harmony_defconfig
+++ b/configs/harmony_defconfig
@@ -32,7 +32,7 @@ CONFIG_DEFAULT_DEVICE_TREE="tegra20-harmony"
CONFIG_ENV_IS_IN_NAND=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_SPL_DM=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_UBI_FASTMAP=y
CONFIG_PCI=y
CONFIG_DM_PCI=y
diff --git a/configs/huawei_hg556a_ram_defconfig b/configs/huawei_hg556a_ram_defconfig
index 73f2f43..d7787ea 100644
--- a/configs/huawei_hg556a_ram_defconfig
+++ b/configs/huawei_hg556a_ram_defconfig
@@ -38,7 +38,7 @@ CONFIG_DM_GPIO=y
CONFIG_BCM6345_GPIO=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/imx6q_logic_defconfig b/configs/imx6q_logic_defconfig
index cd20ecc..018d8a1 100644
--- a/configs/imx6q_logic_defconfig
+++ b/configs/imx6q_logic_defconfig
@@ -71,7 +71,7 @@ CONFIG_PCF8575_GPIO=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_FSL_USDHC=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_MXS=y
diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
index 2112ce8..95de2f2 100644
--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -68,7 +68,7 @@ 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
diff --git a/configs/khadas-vim2_defconfig b/configs/khadas-vim2_defconfig
index cc9935d..0c07f5c 100644
--- a/configs/khadas-vim2_defconfig
+++ b/configs/khadas-vim2_defconfig
@@ -29,7 +29,7 @@ CONFIG_SARADC_MESON=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_PHY_REALTEK=y
CONFIG_DM_ETH=y
CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/koelsch_defconfig b/configs/koelsch_defconfig
index 34ef807..93aecc4 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -67,7 +67,7 @@ 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
diff --git a/configs/lager_defconfig b/configs/lager_defconfig
index 1be6df2..863f279 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -69,7 +69,7 @@ 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
diff --git a/configs/libretech-ac_defconfig b/configs/libretech-ac_defconfig
index 7e9f02a..401087d 100644
--- a/configs/libretech-ac_defconfig
+++ b/configs/libretech-ac_defconfig
@@ -37,7 +37,7 @@ CONFIG_SARADC_MESON=y
CONFIG_DM_GPIO=y
CONFIG_DM_MMC=y
CONFIG_MMC_MESON_GX=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_GIGADEVICE=y
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index c92d50f..1ca41f5 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -51,7 +51,7 @@ 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
diff --git a/configs/mccmon6_sd_defconfig b/configs/mccmon6_sd_defconfig
index dc15994..3bc7a15 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -49,7 +49,7 @@ 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
diff --git a/configs/microchip_mpfs_icicle_defconfig b/configs/microchip_mpfs_icicle_defconfig
index 0bc1cc2..45edb41 100644
--- a/configs/microchip_mpfs_icicle_defconfig
+++ b/configs/microchip_mpfs_icicle_defconfig
@@ -8,3 +8,4 @@ CONFIG_BOOTDELAY=3
CONFIG_SYS_PROMPT="RISC-V # "
CONFIG_OF_PRIOR_STAGE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MTD=y
diff --git a/configs/mscc_ocelot_defconfig b/configs/mscc_ocelot_defconfig
index e68ff0e..f9c20cb 100644
--- a/configs/mscc_ocelot_defconfig
+++ b/configs/mscc_ocelot_defconfig
@@ -54,7 +54,7 @@ CONFIG_DM_GPIO=y
CONFIG_MSCC_SGPIO=y
CONFIG_LED=y
CONFIG_LED_GPIO=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_SPI_NAND=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_BAR=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index b212104..b03de0d 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -53,7 +53,7 @@ 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_RAW_NAND=y
CONFIG_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_DAVINCI=y
diff --git a/configs/pcm052_defconfig b/configs/pcm052_defconfig
index f261b4f..fb8ac1a 100644
--- a/configs/pcm052_defconfig
+++ b/configs/pcm052_defconfig
@@ -45,7 +45,7 @@ CONFIG_SYS_EEPROM_PAGE_WRITE_BITS=6
CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC_IMX=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_VF610_NFC=y
CONFIG_NAND_VF610_NFC_DT=y
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index 5332fdc..d5e0c7f 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -51,7 +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_SYS_NAND_USE_FLASH_BBT=y
CONFIG_NAND_MXS=y
diff --git a/configs/pfla02_defconfig b/configs/pfla02_defconfig
index 56cba32..e824d4c 100644
--- a/configs/pfla02_defconfig
+++ b/configs/pfla02_defconfig
@@ -51,7 +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
CONFIG_SPI_FLASH=y
diff --git a/configs/phycore-am335x-r2-wega_defconfig b/configs/phycore-am335x-r2-wega_defconfig
index 0f2aa1f..3277192 100644
--- a/configs/phycore-am335x-r2-wega_defconfig
+++ b/configs/phycore-am335x-r2-wega_defconfig
@@ -59,7 +59,7 @@ CONFIG_DM_I2C=y
CONFIG_MISC=y
CONFIG_DM_MMC=y
CONFIG_MMC_OMAP_HS=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
diff --git a/configs/phycore_pcl063_defconfig b/configs/phycore_pcl063_defconfig
index f4e356e..6706b6f 100644
--- a/configs/phycore_pcl063_defconfig
+++ b/configs/phycore_pcl063_defconfig
@@ -38,7 +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
CONFIG_NAND_MXS_DT=y
diff --git a/configs/porter_defconfig b/configs/porter_defconfig
index d496a26..c804cc1 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -66,7 +66,7 @@ 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
diff --git a/configs/qemu-riscv32_defconfig b/configs/qemu-riscv32_defconfig
index d3f8fed..4f5ed80 100644
--- a/configs/qemu-riscv32_defconfig
+++ b/configs/qemu-riscv32_defconfig
@@ -11,3 +11,4 @@ CONFIG_CMD_NVEDIT_EFI=y
# CONFIG_CMD_MII is not set
CONFIG_OF_PRIOR_STAGE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MTD=y
diff --git a/configs/qemu-riscv32_smode_defconfig b/configs/qemu-riscv32_smode_defconfig
index 20fc8f3..6afc84c 100644
--- a/configs/qemu-riscv32_smode_defconfig
+++ b/configs/qemu-riscv32_smode_defconfig
@@ -12,3 +12,4 @@ CONFIG_CMD_NVEDIT_EFI=y
# CONFIG_CMD_MII is not set
CONFIG_OF_PRIOR_STAGE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MTD=y
diff --git a/configs/qemu-riscv32_spl_defconfig b/configs/qemu-riscv32_spl_defconfig
index fcaf0d5..000c74d 100644
--- a/configs/qemu-riscv32_spl_defconfig
+++ b/configs/qemu-riscv32_spl_defconfig
@@ -11,3 +11,4 @@ CONFIG_DISPLAY_BOARDINFO=y
# CONFIG_CMD_MII is not set
CONFIG_OF_PRIOR_STAGE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MTD=y
diff --git a/configs/qemu-riscv64_defconfig b/configs/qemu-riscv64_defconfig
index 7cda5e5..d1949ad 100644
--- a/configs/qemu-riscv64_defconfig
+++ b/configs/qemu-riscv64_defconfig
@@ -12,3 +12,4 @@ CONFIG_CMD_NVEDIT_EFI=y
# CONFIG_CMD_MII is not set
CONFIG_OF_PRIOR_STAGE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MTD=y
diff --git a/configs/qemu-riscv64_smode_defconfig b/configs/qemu-riscv64_smode_defconfig
index 33776f0..a7b0e06 100644
--- a/configs/qemu-riscv64_smode_defconfig
+++ b/configs/qemu-riscv64_smode_defconfig
@@ -13,3 +13,4 @@ CONFIG_CMD_NVEDIT_EFI=y
# CONFIG_CMD_MII is not set
CONFIG_OF_PRIOR_STAGE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MTD=y
diff --git a/configs/qemu-riscv64_spl_defconfig b/configs/qemu-riscv64_spl_defconfig
index 6da9dd7..34f9630 100644
--- a/configs/qemu-riscv64_spl_defconfig
+++ b/configs/qemu-riscv64_spl_defconfig
@@ -12,3 +12,4 @@ CONFIG_DISPLAY_BOARDINFO=y
# CONFIG_CMD_MII is not set
CONFIG_OF_PRIOR_STAGE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MTD=y
diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig
index d2d7c38..b7c3207 100644
--- a/configs/qemu_arm64_defconfig
+++ b/configs/qemu_arm64_defconfig
@@ -21,7 +21,7 @@ CONFIG_SCSI_AHCI=y
CONFIG_AHCI_PCI=y
CONFIG_BLK=y
# CONFIG_MMC is not set
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/qemu_arm_defconfig b/configs/qemu_arm_defconfig
index ed6d591..521c679 100644
--- a/configs/qemu_arm_defconfig
+++ b/configs/qemu_arm_defconfig
@@ -22,7 +22,7 @@ CONFIG_SCSI_AHCI=y
CONFIG_AHCI_PCI=y
CONFIG_BLK=y
# CONFIG_MMC is not set
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/r8a77995_draak_defconfig b/configs/r8a77995_draak_defconfig
index d0dd69d..adda500 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -46,7 +46,7 @@ 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
diff --git a/configs/sam9x60ek_qspiflash_defconfig b/configs/sam9x60ek_qspiflash_defconfig
index 0b09286..93543cf 100644
--- a/configs/sam9x60ek_qspiflash_defconfig
+++ b/configs/sam9x60ek_qspiflash_defconfig
@@ -57,7 +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
CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/sfr_nb4-ser_ram_defconfig b/configs/sfr_nb4-ser_ram_defconfig
index 325893a..f442be3 100644
--- a/configs/sfr_nb4-ser_ram_defconfig
+++ b/configs/sfr_nb4-ser_ram_defconfig
@@ -40,7 +40,7 @@ CONFIG_BCM6345_GPIO=y
CONFIG_LED=y
CONFIG_LED_BCM6358=y
CONFIG_LED_GPIO=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_FLASH_CFI_DRIVER=y
CONFIG_CFI_FLASH=y
diff --git a/configs/sifive_fu540_defconfig b/configs/sifive_fu540_defconfig
index 790da97..48eccd7 100644
--- a/configs/sifive_fu540_defconfig
+++ b/configs/sifive_fu540_defconfig
@@ -11,3 +11,4 @@ CONFIG_DISPLAY_CPUINFO=y
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_OF_PRIOR_STAGE=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_DM_MTD=y
diff --git a/configs/silk_defconfig b/configs/silk_defconfig
index 3043e17..015f2d1 100644
--- a/configs/silk_defconfig
+++ b/configs/silk_defconfig
@@ -68,7 +68,7 @@ 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
diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig
index 61ae8dc..e5739d9 100644
--- a/configs/stm32f469-discovery_defconfig
+++ b/configs/stm32f469-discovery_defconfig
@@ -27,7 +27,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
# CONFIG_NET is not set
CONFIG_DM_MMC=y
CONFIG_ARM_PL180_MMCI=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig
index fc335c2..0d3e9a3 100644
--- a/configs/stm32f746-disco_defconfig
+++ b/configs/stm32f746-disco_defconfig
@@ -40,7 +40,7 @@ CONFIG_NETCONSOLE=y
CONFIG_DM_MMC=y
# CONFIG_SPL_DM_MMC is not set
CONFIG_ARM_PL180_MMCI=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/stm32f769-disco_defconfig b/configs/stm32f769-disco_defconfig
index dd5f728..a59e03c 100644
--- a/configs/stm32f769-disco_defconfig
+++ b/configs/stm32f769-disco_defconfig
@@ -40,7 +40,7 @@ CONFIG_NETCONSOLE=y
CONFIG_DM_MMC=y
# CONFIG_SPL_DM_MMC is not set
CONFIG_ARM_PL180_MMCI=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_NOR_FLASH=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
index b900be5..607c078 100644
--- a/configs/stm32mp15_basic_defconfig
+++ b/configs/stm32mp15_basic_defconfig
@@ -86,7 +86,7 @@ CONFIG_STM32_IPCC=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_STM32_SDMMC2=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_STM32_FMC2=y
CONFIG_MTD_SPI_NAND=y
diff --git a/configs/stm32mp15_optee_defconfig b/configs/stm32mp15_optee_defconfig
index a63b9e0..68a1e30 100644
--- a/configs/stm32mp15_optee_defconfig
+++ b/configs/stm32mp15_optee_defconfig
@@ -73,7 +73,7 @@ CONFIG_STM32_IPCC=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_STM32_SDMMC2=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_STM32_FMC2=y
CONFIG_MTD_SPI_NAND=y
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
index 6ef52c8..d804819 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -72,7 +72,7 @@ CONFIG_STM32_IPCC=y
CONFIG_DM_MMC=y
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_STM32_SDMMC2=y
-CONFIG_MTD=y
+CONFIG_DM_MTD=y
CONFIG_MTD_RAW_NAND=y
CONFIG_NAND_STM32_FMC2=y
CONFIG_MTD_SPI_NAND=y
diff --git a/configs/stout_defconfig b/configs/stout_defconfig
index 69a914b..29d6420 100644
--- a/configs/stout_defconfig
+++ b/configs/stout_defconfig
@@ -66,7 +66,7 @@ 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
diff --git a/configs/uDPU_defconfig b/configs/uDPU_defconfig
index 2c31d22..e9cc822 100644
--- a/configs/uDPU_defconfig
+++ b/configs/uDPU_defconfig
@@ -59,7 +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
CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig
index 9fe5bc0..02bc28f 100644
--- a/drivers/dfu/Kconfig
+++ b/drivers/dfu/Kconfig
@@ -56,7 +56,7 @@ config DFU_SF_PART
config DFU_MTD
bool "MTD back end for DFU"
- depends on MTD
+ depends on DM_MTD
help
This option enables using DFU to read and write to on any MTD device.
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 37f379d..fe31273 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -3,7 +3,7 @@ menu "MTD Support"
config MTD_PARTITIONS
bool
-config MTD
+config DM_MTD
bool "Enable Driver Model for MTD drivers"
depends on DM
help
@@ -34,7 +34,7 @@ config FLASH_CFI_DRIVER
config CFI_FLASH
bool "Enable Driver Model for CFI Flash driver"
- depends on MTD
+ depends on DM_MTD
help
The Common Flash Interface specification was developed by Intel,
AMD and other flash manufactures. It provides a universal method
@@ -73,7 +73,7 @@ config SYS_FLASH_CFI
config ALTERA_QSPI
bool "Altera Generic Quad SPI Controller"
- depends on MTD
+ depends on DM_MTD
help
This enables access to Altera EPCQ/EPCS flash chips using the
Altera Generic Quad SPI Controller. The controller converts SPI
@@ -82,14 +82,14 @@ config ALTERA_QSPI
config FLASH_PIC32
bool "Microchip PIC32 Flash driver"
- depends on MACH_PIC32 && MTD
+ depends on MACH_PIC32 && DM_MTD
help
This enables access to Microchip PIC32 internal non-CFI flash
chips through PIC32 Non-Volatile-Memory Controller.
config RENESAS_RPC_HF
bool "Renesas RCar Gen3 RPC Hyperflash driver"
- depends on RCAR_GEN3 && MTD
+ depends on RCAR_GEN3 && DM_MTD
help
This enables access to Hyperflash memory through the Renesas
RCar Gen3 RPC controller.
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 293079d..88e5711 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -6,7 +6,7 @@
ifneq (,$(findstring y,$(CONFIG_MTD_DEVICE)$(CONFIG_CMD_NAND)$(CONFIG_CMD_ONENAND)$(CONFIG_CMD_SF)$(CONFIG_CMD_MTD)))
obj-y += mtdcore.o mtd_uboot.o
endif
-obj-$(CONFIG_MTD) += mtd-uclass.o
+obj-$(CONFIG_DM_MTD) += mtd-uclass.o
obj-$(CONFIG_MTD_PARTITIONS) += mtdpart.o
obj-$(CONFIG_MTD_CONCAT) += mtdconcat.o
obj-$(CONFIG_ALTERA_QSPI) += altera_qspi.o
diff --git a/drivers/mtd/mtd_uboot.c b/drivers/mtd/mtd_uboot.c
index 55742275..7c6c9ac 100644
--- a/drivers/mtd/mtd_uboot.c
+++ b/drivers/mtd/mtd_uboot.c
@@ -99,7 +99,7 @@ int mtd_search_alternate_name(const char *mtdname, char *altname,
return -EINVAL;
}
-#if IS_ENABLED(CONFIG_MTD)
+#if IS_ENABLED(CONFIG_DM_MTD)
static void mtd_probe_uclass_mtd_devs(void)
{
struct udevice *dev;
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
index 26cc91a..16165f8 100644
--- a/drivers/mtd/nand/raw/Kconfig
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -67,7 +67,7 @@ endif
config NAND_BRCMNAND
bool "Support Broadcom NAND controller"
- depends on OF_CONTROL && DM && MTD
+ depends on OF_CONTROL && DM && DM_MTD
help
Enable the driver for NAND flash on platforms using a Broadcom NAND
controller.
@@ -173,7 +173,7 @@ if NAND_VF610_NFC
config NAND_VF610_NFC_DT
bool "Support Vybrid's vf610 NAND controller as a DT device"
- depends on OF_CONTROL && MTD
+ depends on OF_CONTROL && DM_MTD
help
Enable the driver for Vybrid's vf610 NAND flash on platforms
using device tree.
@@ -266,7 +266,7 @@ if NAND_MXS
config NAND_MXS_DT
bool "Support MXS NAND controller as a DT device"
- depends on OF_CONTROL && MTD
+ depends on OF_CONTROL && DM_MTD
help
Enable the driver for MXS NAND flash on platforms using
device tree.
diff --git a/drivers/mtd/nand/spi/Kconfig b/drivers/mtd/nand/spi/Kconfig
index 2197cb5..0777dfd 100644
--- a/drivers/mtd/nand/spi/Kconfig
+++ b/drivers/mtd/nand/spi/Kconfig
@@ -1,6 +1,6 @@
menuconfig MTD_SPI_NAND
bool "SPI NAND device Support"
- depends on MTD && DM_SPI
+ depends on DM_MTD && DM_SPI
select MTD_NAND_CORE
select SPI_MEM
help
diff --git a/include/flash.h b/include/flash.h
index 70ab435..807800b 100644
--- a/include/flash.h
+++ b/include/flash.h
@@ -44,7 +44,7 @@ typedef struct {
uchar sr_supported; /* status register supported */
const char *name; /* human-readable name */
#endif
-#ifdef CONFIG_MTD
+#ifdef CONFIG_DM_MTD
struct mtd_info *mtd;
#endif
#ifdef CONFIG_CFI_FLASH /* DM-specific parts */