[U-Boot] [PATCH v5 02/26] mtd: rename CONFIG_MTD -> CONFIG_DM_MTD

Miquel Raynal miquel.raynal at bootlin.com
Thu Oct 3 17:50:04 UTC 2019


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 at bootlin.com>
Reviewed-by: Boris Brezillon <boris.brezillon at bootlin.com>
---
 configs/10m50_defconfig                            | 2 +-
 configs/3c120_defconfig                            | 2 +-
 configs/adp-ae3xx_defconfig                        | 2 +-
 configs/alt_defconfig                              | 2 +-
 configs/am335x_guardian_defconfig                  | 2 +-
 configs/bcm963158_ram_defconfig                    | 2 +-
 configs/bcm968380gerg_ram_defconfig                | 2 +-
 configs/bcm968580xref_ram_defconfig                | 2 +-
 configs/bk4r1_defconfig                            | 2 +-
 configs/boston32r2_defconfig                       | 2 +-
 configs/boston32r2el_defconfig                     | 2 +-
 configs/boston32r6_defconfig                       | 2 +-
 configs/boston32r6el_defconfig                     | 2 +-
 configs/boston64r2_defconfig                       | 2 +-
 configs/boston64r2el_defconfig                     | 2 +-
 configs/boston64r6_defconfig                       | 2 +-
 configs/boston64r6el_defconfig                     | 2 +-
 configs/colibri-imx6ull_defconfig                  | 2 +-
 configs/colibri_imx7_defconfig                     | 2 +-
 configs/colibri_t20_defconfig                      | 2 +-
 configs/colibri_vf_defconfig                       | 2 +-
 configs/comtrend_ct5361_ram_defconfig              | 2 +-
 configs/comtrend_wap5813n_ram_defconfig            | 2 +-
 configs/crs305-1g-4s_defconfig                     | 2 +-
 configs/db-xc3-24g4xg_defconfig                    | 2 +-
 configs/gardena-smart-gateway-mt7688-ram_defconfig | 2 +-
 configs/gardena-smart-gateway-mt7688_defconfig     | 2 +-
 configs/gazerbeam_defconfig                        | 2 +-
 configs/gose_defconfig                             | 2 +-
 configs/harmony_defconfig                          | 2 +-
 configs/huawei_hg556a_ram_defconfig                | 2 +-
 configs/imx6q_logic_defconfig                      | 2 +-
 configs/khadas-vim2_defconfig                      | 2 +-
 configs/koelsch_defconfig                          | 2 +-
 configs/lager_defconfig                            | 2 +-
 configs/libretech-ac_defconfig                     | 2 +-
 configs/mccmon6_nor_defconfig                      | 2 +-
 configs/mccmon6_sd_defconfig                       | 2 +-
 configs/mscc_ocelot_defconfig                      | 2 +-
 configs/pcm052_defconfig                           | 2 +-
 configs/pcm058_defconfig                           | 2 +-
 configs/pfla02_defconfig                           | 2 +-
 configs/phycore_pcl063_defconfig                   | 2 +-
 configs/porter_defconfig                           | 2 +-
 configs/qemu_arm64_defconfig                       | 2 +-
 configs/qemu_arm_defconfig                         | 2 +-
 configs/r8a77995_draak_defconfig                   | 2 +-
 configs/sfr_nb4-ser_ram_defconfig                  | 2 +-
 configs/silk_defconfig                             | 2 +-
 configs/stm32f469-discovery_defconfig              | 2 +-
 configs/stm32f746-disco_defconfig                  | 2 +-
 configs/stm32mp15_basic_defconfig                  | 2 +-
 configs/stm32mp15_trusted_defconfig                | 2 +-
 configs/stout_defconfig                            | 2 +-
 configs/uDPU_defconfig                             | 2 +-
 drivers/mtd/Kconfig                                | 2 +-
 drivers/mtd/Makefile                               | 2 +-
 drivers/mtd/mtd_uboot.c                            | 2 +-
 include/flash.h                                    | 2 +-
 59 files changed, 59 insertions(+), 59 deletions(-)

diff --git a/configs/10m50_defconfig b/configs/10m50_defconfig
index 119cbcd354..8df747904b 100644
--- a/configs/10m50_defconfig
+++ b/configs/10m50_defconfig
@@ -23,7 +23,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 42a032f1e7..a6f369603a 100644
--- a/configs/3c120_defconfig
+++ b/configs/3c120_defconfig
@@ -23,7 +23,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 a591681819..322fc8da84 100644
--- a/configs/adp-ae3xx_defconfig
+++ b/configs/adp-ae3xx_defconfig
@@ -27,7 +27,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/alt_defconfig b/configs/alt_defconfig
index 0284d80b93..44a1698d45 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -65,7 +65,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=y
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index bd6c8c86c2..ed288136c3 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -66,7 +66,7 @@ CONFIG_BOOTCOUNT_ENV=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=0x100000
diff --git a/configs/bcm963158_ram_defconfig b/configs/bcm963158_ram_defconfig
index 3b4c86ce59..a08ece81ad 100644
--- a/configs/bcm963158_ram_defconfig
+++ b/configs/bcm963158_ram_defconfig
@@ -34,7 +34,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 0d04863721..4f963ee38e 100644
--- a/configs/bcm968380gerg_ram_defconfig
+++ b/configs/bcm968380gerg_ram_defconfig
@@ -37,7 +37,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 f3a87edebb..0812a81c72 100644
--- a/configs/bcm968580xref_ram_defconfig
+++ b/configs/bcm968580xref_ram_defconfig
@@ -29,7 +29,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 20d3e33e96..9b965c5b7a 100644
--- a/configs/bk4r1_defconfig
+++ b/configs/bk4r1_defconfig
@@ -54,7 +54,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_NAND_VF610_NFC=y
 CONFIG_NAND_VF610_NFC_DT=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
diff --git a/configs/boston32r2_defconfig b/configs/boston32r2_defconfig
index 3d8d97252c..7023dbe5c9 100644
--- a/configs/boston32r2_defconfig
+++ b/configs/boston32r2_defconfig
@@ -27,7 +27,7 @@ CONFIG_DEFAULT_DEVICE_TREE="img,boston"
 CONFIG_ENV_IS_IN_FLASH=y
 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 6650211b48..44b4f9be78 100644
--- a/configs/boston32r2el_defconfig
+++ b/configs/boston32r2el_defconfig
@@ -28,7 +28,7 @@ CONFIG_DEFAULT_DEVICE_TREE="img,boston"
 CONFIG_ENV_IS_IN_FLASH=y
 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 b916460f05..6a48a8b7dc 100644
--- a/configs/boston32r6_defconfig
+++ b/configs/boston32r6_defconfig
@@ -28,7 +28,7 @@ CONFIG_DEFAULT_DEVICE_TREE="img,boston"
 CONFIG_ENV_IS_IN_FLASH=y
 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 6bf0027e69..f6cc9f2551 100644
--- a/configs/boston32r6el_defconfig
+++ b/configs/boston32r6el_defconfig
@@ -29,7 +29,7 @@ CONFIG_DEFAULT_DEVICE_TREE="img,boston"
 CONFIG_ENV_IS_IN_FLASH=y
 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 250a70da90..bcea44b03e 100644
--- a/configs/boston64r2_defconfig
+++ b/configs/boston64r2_defconfig
@@ -28,7 +28,7 @@ CONFIG_DEFAULT_DEVICE_TREE="img,boston"
 CONFIG_ENV_IS_IN_FLASH=y
 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 84c4e5372b..0383c0932b 100644
--- a/configs/boston64r2el_defconfig
+++ b/configs/boston64r2el_defconfig
@@ -29,7 +29,7 @@ CONFIG_DEFAULT_DEVICE_TREE="img,boston"
 CONFIG_ENV_IS_IN_FLASH=y
 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 133a0a9115..55bf9906d9 100644
--- a/configs/boston64r6_defconfig
+++ b/configs/boston64r6_defconfig
@@ -28,7 +28,7 @@ CONFIG_DEFAULT_DEVICE_TREE="img,boston"
 CONFIG_ENV_IS_IN_FLASH=y
 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 8c97dca774..8ebc293acc 100644
--- a/configs/boston64r6el_defconfig
+++ b/configs/boston64r6el_defconfig
@@ -29,7 +29,7 @@ CONFIG_DEFAULT_DEVICE_TREE="img,boston"
 CONFIG_ENV_IS_IN_FLASH=y
 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 4980f91d37..71f64bae6a 100644
--- a/configs/colibri-imx6ull_defconfig
+++ b/configs/colibri-imx6ull_defconfig
@@ -53,7 +53,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 8e2657dcf0..973b681bdd 100644
--- a/configs/colibri_imx7_defconfig
+++ b/configs/colibri_imx7_defconfig
@@ -53,7 +53,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 262ff9e5fc..49ed114522 100644
--- a/configs/colibri_t20_defconfig
+++ b/configs/colibri_t20_defconfig
@@ -39,7 +39,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 c21efa2cf1..593ff34117 100644
--- a/configs/colibri_vf_defconfig
+++ b/configs/colibri_vf_defconfig
@@ -59,7 +59,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_NAND_VF610_NFC=y
 CONFIG_NAND_VF610_NFC_DT=y
 CONFIG_SYS_NAND_VF610_NFC_60_ECC_BYTES=y
diff --git a/configs/comtrend_ct5361_ram_defconfig b/configs/comtrend_ct5361_ram_defconfig
index 41ce399194..f95ea35880 100644
--- a/configs/comtrend_ct5361_ram_defconfig
+++ b/configs/comtrend_ct5361_ram_defconfig
@@ -36,7 +36,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_wap5813n_ram_defconfig b/configs/comtrend_wap5813n_ram_defconfig
index f466cabc61..8b2107bec5 100644
--- a/configs/comtrend_wap5813n_ram_defconfig
+++ b/configs/comtrend_wap5813n_ram_defconfig
@@ -36,7 +36,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 c396a7c5ba..6146556968 100644
--- a/configs/crs305-1g-4s_defconfig
+++ b/configs/crs305-1g-4s_defconfig
@@ -32,7 +32,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=y
 CONFIG_SPI_FLASH_SFDP_SUPPORT=y
diff --git a/configs/db-xc3-24g4xg_defconfig b/configs/db-xc3-24g4xg_defconfig
index 5850536ce6..20c7f8931b 100644
--- a/configs/db-xc3-24g4xg_defconfig
+++ b/configs/db-xc3-24g4xg_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_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 03f9d99760..281ad308e6 100644
--- a/configs/gardena-smart-gateway-mt7688-ram_defconfig
+++ b/configs/gardena-smart-gateway-mt7688-ram_defconfig
@@ -49,7 +49,7 @@ CONFIG_CLK=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=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/gardena-smart-gateway-mt7688_defconfig b/configs/gardena-smart-gateway-mt7688_defconfig
index 6cb8fc0631..d5792b63d8 100644
--- a/configs/gardena-smart-gateway-mt7688_defconfig
+++ b/configs/gardena-smart-gateway-mt7688_defconfig
@@ -52,7 +52,7 @@ CONFIG_CLK=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=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/gazerbeam_defconfig b/configs/gazerbeam_defconfig
index 3a29bb1277..a176bcd431 100644
--- a/configs/gazerbeam_defconfig
+++ b/configs/gazerbeam_defconfig
@@ -164,7 +164,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 15a9c5c8f1..d5649aff79 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -63,7 +63,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 519da65c19..c7c8bc249c 100644
--- a/configs/harmony_defconfig
+++ b/configs/harmony_defconfig
@@ -29,7 +29,7 @@ CONFIG_OF_LIVE=y
 CONFIG_DEFAULT_DEVICE_TREE="tegra20-harmony"
 CONFIG_ENV_IS_IN_NAND=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 8c4f87ad57..3401e18c2b 100644
--- a/configs/huawei_hg556a_ram_defconfig
+++ b/configs/huawei_hg556a_ram_defconfig
@@ -36,7 +36,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 c1e3971432..110f91c4b2 100644
--- a/configs/imx6q_logic_defconfig
+++ b/configs/imx6q_logic_defconfig
@@ -67,7 +67,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/khadas-vim2_defconfig b/configs/khadas-vim2_defconfig
index a9f6a0e281..be49256320 100644
--- a/configs/khadas-vim2_defconfig
+++ b/configs/khadas-vim2_defconfig
@@ -27,7 +27,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 393a1c680a..1118e7b69c 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -63,7 +63,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 c3a96471f4..c6f5b71a31 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -65,7 +65,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 f4f7b068a1..20a153770a 100644
--- a/configs/libretech-ac_defconfig
+++ b/configs/libretech-ac_defconfig
@@ -34,7 +34,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=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/mccmon6_nor_defconfig b/configs/mccmon6_nor_defconfig
index a738ddba7c..f0aac83850 100644
--- a/configs/mccmon6_nor_defconfig
+++ b/configs/mccmon6_nor_defconfig
@@ -29,7 +29,7 @@ CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_DM=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 377c52a41a..f8acb5e81b 100644
--- a/configs/mccmon6_sd_defconfig
+++ b/configs/mccmon6_sd_defconfig
@@ -30,7 +30,7 @@ CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_DM=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/mscc_ocelot_defconfig b/configs/mscc_ocelot_defconfig
index edc476d143..18dd956b98 100644
--- a/configs/mscc_ocelot_defconfig
+++ b/configs/mscc_ocelot_defconfig
@@ -49,7 +49,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=y
diff --git a/configs/pcm052_defconfig b/configs/pcm052_defconfig
index b7e3d04641..cce7cf435a 100644
--- a/configs/pcm052_defconfig
+++ b/configs/pcm052_defconfig
@@ -40,7 +40,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_NAND_VF610_NFC=y
 CONFIG_NAND_VF610_NFC_DT=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
diff --git a/configs/pcm058_defconfig b/configs/pcm058_defconfig
index 9fd33da324..86999429ef 100644
--- a/configs/pcm058_defconfig
+++ b/configs/pcm058_defconfig
@@ -45,7 +45,7 @@ CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_SPI_FLASH=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 e6a679554e..bfbc30f680 100644
--- a/configs/pfla02_defconfig
+++ b/configs/pfla02_defconfig
@@ -44,7 +44,7 @@ CONFIG_CMD_UBI=y
 # CONFIG_SPL_PARTITION_UUIDS is not set
 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_pcl063_defconfig b/configs/phycore_pcl063_defconfig
index 27e3a7c88e..6b11bfe2f3 100644
--- a/configs/phycore_pcl063_defconfig
+++ b/configs/phycore_pcl063_defconfig
@@ -36,7 +36,7 @@ CONFIG_DEFAULT_DEVICE_TREE="imx6ul-phycore-segin"
 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 f3f5105aa6..8bfa845439 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -63,7 +63,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=y
diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig
index 7237819909..5cde505e78 100644
--- a/configs/qemu_arm64_defconfig
+++ b/configs/qemu_arm64_defconfig
@@ -17,7 +17,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 7c95892d98..e8604d8e2a 100644
--- a/configs/qemu_arm_defconfig
+++ b/configs/qemu_arm_defconfig
@@ -18,7 +18,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 1f6add93e4..f5a8428f21 100644
--- a/configs/r8a77995_draak_defconfig
+++ b/configs/r8a77995_draak_defconfig
@@ -44,7 +44,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/sfr_nb4-ser_ram_defconfig b/configs/sfr_nb4-ser_ram_defconfig
index db12ce85d5..d2ba552777 100644
--- a/configs/sfr_nb4-ser_ram_defconfig
+++ b/configs/sfr_nb4-ser_ram_defconfig
@@ -38,7 +38,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/silk_defconfig b/configs/silk_defconfig
index db63b14f19..60ca53baa9 100644
--- a/configs/silk_defconfig
+++ b/configs/silk_defconfig
@@ -65,7 +65,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=y
diff --git a/configs/stm32f469-discovery_defconfig b/configs/stm32f469-discovery_defconfig
index dcd0697677..6de461555c 100644
--- a/configs/stm32f469-discovery_defconfig
+++ b/configs/stm32f469-discovery_defconfig
@@ -26,7 +26,7 @@ CONFIG_OF_CONTROL=y
 CONFIG_DEFAULT_DEVICE_TREE="stm32f469-disco"
 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=y
diff --git a/configs/stm32f746-disco_defconfig b/configs/stm32f746-disco_defconfig
index 3c43d2a591..8543f9d002 100644
--- a/configs/stm32f746-disco_defconfig
+++ b/configs/stm32f746-disco_defconfig
@@ -39,7 +39,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=y
diff --git a/configs/stm32mp15_basic_defconfig b/configs/stm32mp15_basic_defconfig
index daa126ec2d..a9c3ad5dec 100644
--- a/configs/stm32mp15_basic_defconfig
+++ b/configs/stm32mp15_basic_defconfig
@@ -79,7 +79,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_DM_SPI_FLASH=y
diff --git a/configs/stm32mp15_trusted_defconfig b/configs/stm32mp15_trusted_defconfig
index 88d342ae7c..f7f9f4d0a0 100644
--- a/configs/stm32mp15_trusted_defconfig
+++ b/configs/stm32mp15_trusted_defconfig
@@ -65,7 +65,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_DM_SPI_FLASH=y
diff --git a/configs/stout_defconfig b/configs/stout_defconfig
index f32c005e8c..c38d0c339f 100644
--- a/configs/stout_defconfig
+++ b/configs/stout_defconfig
@@ -63,7 +63,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=y
diff --git a/configs/uDPU_defconfig b/configs/uDPU_defconfig
index ec0b731a3f..672a1b857b 100644
--- a/configs/uDPU_defconfig
+++ b/configs/uDPU_defconfig
@@ -56,7 +56,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_SPI_FLASH=y
 CONFIG_SF_DEFAULT_MODE=0
 CONFIG_SPI_FLASH_BAR=y
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index 0050fb2b9b..ecd62642eb 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
diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 22ceda93c0..eac6930de6 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 5574227598..7c6c9ac0bc 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/include/flash.h b/include/flash.h
index 70ab435199..807800b524 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 */
-- 
2.20.1



More information about the U-Boot mailing list