[U-Boot] [PATCH v7 59/87] config: Enable SPI-NOR framework

Jagan Teki jteki at openedev.com
Tue Mar 22 08:38:11 CET 2016


- CONFIG_DM_SPI_FLASH
- CONFIG_SPI_FLASH
- CONFIG_SPL_SPI_FLASH_SUPPORT
+ CONFIG_MTD
+ CONFIG_MTD_M25P80
+ CONFIG_MTD_SPI_NOR
+ CONFIG_SPL_SPI_NOR_SUPPORT
+ CONFIG_SPL_MTD_SUPPORT

for conditional construct
CONFIG_SPI_FLASH => CONFIG_MTD_SPI_NOR

Cc: Tom Rini <trini at konsulko.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Bin Meng <bmeng.cn at gmail.com>
Cc: York Sun <york.sun at nxp.com>
Cc: Mugunthan V N <mugunthanvnm at ti.com>
Cc: Michal Simek <michal.simek at xilinx.com>
Cc: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
Signed-off-by: Jagan Teki <jteki at openedev.com>
---
 arch/Kconfig                                           |  2 +-
 arch/arm/Kconfig                                       | 11 ++++++-----
 arch/arm/mach-rockchip/Kconfig                         |  2 +-
 arch/arm/mach-tegra/Kconfig                            |  2 +-
 board/davinci/ea20/ea20.c                              |  2 +-
 configs/B4420QDS_NAND_defconfig                        |  3 ++-
 configs/B4420QDS_SPIFLASH_defconfig                    |  3 ++-
 configs/B4420QDS_defconfig                             |  3 ++-
 configs/B4860QDS_NAND_defconfig                        |  3 ++-
 configs/B4860QDS_SECURE_BOOT_defconfig                 |  3 ++-
 configs/B4860QDS_SPIFLASH_defconfig                    |  3 ++-
 configs/B4860QDS_SRIO_PCIE_BOOT_defconfig              |  3 ++-
 configs/B4860QDS_defconfig                             |  3 ++-
 configs/BSC9131RDB_NAND_SYSCLK100_defconfig            |  3 ++-
 configs/BSC9131RDB_NAND_defconfig                      |  3 ++-
 configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig        |  3 ++-
 configs/BSC9131RDB_SPIFLASH_defconfig                  |  3 ++-
 configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig     |  3 ++-
 configs/BSC9132QDS_NAND_DDRCLK100_defconfig            |  3 ++-
 configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig     |  3 ++-
 configs/BSC9132QDS_NAND_DDRCLK133_defconfig            |  3 ++-
 configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig      |  3 ++-
 configs/BSC9132QDS_NOR_DDRCLK100_defconfig             |  3 ++-
 configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig      |  3 ++-
 configs/BSC9132QDS_NOR_DDRCLK133_defconfig             |  3 ++-
 configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig   |  3 ++-
 configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig          |  3 ++-
 configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig   |  3 ++-
 configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig          |  3 ++-
 configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig |  3 ++-
 configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig        |  3 ++-
 configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig |  3 ++-
 configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig        |  3 ++-
 configs/C29XPCIE_NAND_defconfig                        |  3 ++-
 configs/C29XPCIE_NOR_SECBOOT_defconfig                 |  3 ++-
 configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig            |  3 ++-
 configs/C29XPCIE_SPIFLASH_defconfig                    |  3 ++-
 configs/C29XPCIE_defconfig                             |  3 ++-
 configs/M52277EVB_defconfig                            |  3 ++-
 configs/M52277EVB_stmicro_defconfig                    |  3 ++-
 configs/M54418TWR_defconfig                            |  3 ++-
 configs/M54418TWR_nand_mii_defconfig                   |  3 ++-
 configs/M54418TWR_nand_rmii_defconfig                  |  3 ++-
 configs/M54418TWR_nand_rmii_lowfreq_defconfig          |  3 ++-
 configs/M54418TWR_serial_mii_defconfig                 |  3 ++-
 configs/M54418TWR_serial_rmii_defconfig                |  3 ++-
 configs/M54451EVB_defconfig                            |  3 ++-
 configs/M54451EVB_stmicro_defconfig                    |  3 ++-
 configs/M54455EVB_a66_defconfig                        |  3 ++-
 configs/M54455EVB_defconfig                            |  3 ++-
 configs/M54455EVB_i66_defconfig                        |  3 ++-
 configs/M54455EVB_intel_defconfig                      |  3 ++-
 configs/M54455EVB_stm33_defconfig                      |  3 ++-
 configs/MPC8536DS_36BIT_defconfig                      |  3 ++-
 configs/MPC8536DS_SDCARD_defconfig                     |  3 ++-
 configs/MPC8536DS_SPIFLASH_defconfig                   |  3 ++-
 configs/MPC8536DS_defconfig                            |  3 ++-
 configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig       |  3 ++-
 configs/P1010RDB-PA_36BIT_NAND_defconfig               |  3 ++-
 configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig        |  3 ++-
 configs/P1010RDB-PA_36BIT_NOR_defconfig                |  3 ++-
 configs/P1010RDB-PA_36BIT_SDCARD_defconfig             |  3 ++-
 configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig   |  3 ++-
 configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig           |  3 ++-
 configs/P1010RDB-PA_NAND_SECBOOT_defconfig             |  3 ++-
 configs/P1010RDB-PA_NAND_defconfig                     |  3 ++-
 configs/P1010RDB-PA_NOR_SECBOOT_defconfig              |  3 ++-
 configs/P1010RDB-PA_NOR_defconfig                      |  3 ++-
 configs/P1010RDB-PA_SDCARD_defconfig                   |  3 ++-
 configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig         |  3 ++-
 configs/P1010RDB-PA_SPIFLASH_defconfig                 |  3 ++-
 configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig       |  3 ++-
 configs/P1010RDB-PB_36BIT_NAND_defconfig               |  3 ++-
 configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig        |  3 ++-
 configs/P1010RDB-PB_36BIT_NOR_defconfig                |  3 ++-
 configs/P1010RDB-PB_36BIT_SDCARD_defconfig             |  3 ++-
 configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig   |  3 ++-
 configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig           |  3 ++-
 configs/P1010RDB-PB_NAND_SECBOOT_defconfig             |  3 ++-
 configs/P1010RDB-PB_NAND_defconfig                     |  3 ++-
 configs/P1010RDB-PB_NOR_SECBOOT_defconfig              |  3 ++-
 configs/P1010RDB-PB_NOR_defconfig                      |  3 ++-
 configs/P1010RDB-PB_SDCARD_defconfig                   |  3 ++-
 configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig         |  3 ++-
 configs/P1010RDB-PB_SPIFLASH_defconfig                 |  3 ++-
 configs/P1020RDB-PC_36BIT_NAND_defconfig               |  3 ++-
 configs/P1020RDB-PC_36BIT_SDCARD_defconfig             |  3 ++-
 configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig           |  3 ++-
 configs/P1020RDB-PC_36BIT_defconfig                    |  3 ++-
 configs/P1020RDB-PC_NAND_defconfig                     |  3 ++-
 configs/P1020RDB-PC_SDCARD_defconfig                   |  3 ++-
 configs/P1020RDB-PC_SPIFLASH_defconfig                 |  3 ++-
 configs/P1020RDB-PC_defconfig                          |  3 ++-
 configs/P1020RDB-PD_NAND_defconfig                     |  3 ++-
 configs/P1020RDB-PD_SDCARD_defconfig                   |  3 ++-
 configs/P1020RDB-PD_SPIFLASH_defconfig                 |  3 ++-
 configs/P1020RDB-PD_defconfig                          |  3 ++-
 configs/P1021RDB-PC_36BIT_NAND_defconfig               |  3 ++-
 configs/P1021RDB-PC_36BIT_SDCARD_defconfig             |  3 ++-
 configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig           |  3 ++-
 configs/P1021RDB-PC_36BIT_defconfig                    |  3 ++-
 configs/P1021RDB-PC_NAND_defconfig                     |  3 ++-
 configs/P1021RDB-PC_SDCARD_defconfig                   |  3 ++-
 configs/P1021RDB-PC_SPIFLASH_defconfig                 |  3 ++-
 configs/P1021RDB-PC_defconfig                          |  3 ++-
 configs/P1022DS_36BIT_NAND_defconfig                   |  3 ++-
 configs/P1022DS_36BIT_SDCARD_defconfig                 |  3 ++-
 configs/P1022DS_36BIT_SPIFLASH_defconfig               |  3 ++-
 configs/P1022DS_36BIT_defconfig                        |  3 ++-
 configs/P1022DS_NAND_defconfig                         |  3 ++-
 configs/P1022DS_SDCARD_defconfig                       |  3 ++-
 configs/P1022DS_SPIFLASH_defconfig                     |  3 ++-
 configs/P1022DS_defconfig                              |  3 ++-
 configs/P1024RDB_36BIT_defconfig                       |  3 ++-
 configs/P1024RDB_NAND_defconfig                        |  3 ++-
 configs/P1024RDB_SDCARD_defconfig                      |  3 ++-
 configs/P1024RDB_SPIFLASH_defconfig                    |  3 ++-
 configs/P1024RDB_defconfig                             |  3 ++-
 configs/P1025RDB_36BIT_defconfig                       |  3 ++-
 configs/P1025RDB_NAND_defconfig                        |  3 ++-
 configs/P1025RDB_SDCARD_defconfig                      |  3 ++-
 configs/P1025RDB_SPIFLASH_defconfig                    |  3 ++-
 configs/P1025RDB_defconfig                             |  3 ++-
 configs/P2020RDB-PC_36BIT_NAND_defconfig               |  3 ++-
 configs/P2020RDB-PC_36BIT_SDCARD_defconfig             |  3 ++-
 configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig           |  3 ++-
 configs/P2020RDB-PC_36BIT_defconfig                    |  3 ++-
 configs/P2020RDB-PC_NAND_defconfig                     |  3 ++-
 configs/P2020RDB-PC_SDCARD_defconfig                   |  3 ++-
 configs/P2020RDB-PC_SPIFLASH_defconfig                 |  3 ++-
 configs/P2020RDB-PC_defconfig                          |  3 ++-
 configs/P2041RDB_NAND_defconfig                        |  3 ++-
 configs/P2041RDB_SDCARD_defconfig                      |  3 ++-
 configs/P2041RDB_SECURE_BOOT_defconfig                 |  3 ++-
 configs/P2041RDB_SPIFLASH_defconfig                    |  3 ++-
 configs/P2041RDB_SRIO_PCIE_BOOT_defconfig              |  3 ++-
 configs/P2041RDB_defconfig                             |  3 ++-
 configs/P3041DS_NAND_SECURE_BOOT_defconfig             |  3 ++-
 configs/P3041DS_NAND_defconfig                         |  3 ++-
 configs/P3041DS_SDCARD_defconfig                       |  3 ++-
 configs/P3041DS_SECURE_BOOT_defconfig                  |  3 ++-
 configs/P3041DS_SPIFLASH_defconfig                     |  3 ++-
 configs/P3041DS_SRIO_PCIE_BOOT_defconfig               |  3 ++-
 configs/P3041DS_defconfig                              |  3 ++-
 configs/P4080DS_SDCARD_defconfig                       |  3 ++-
 configs/P4080DS_SECURE_BOOT_defconfig                  |  3 ++-
 configs/P4080DS_SPIFLASH_defconfig                     |  3 ++-
 configs/P4080DS_SRIO_PCIE_BOOT_defconfig               |  3 ++-
 configs/P4080DS_defconfig                              |  3 ++-
 configs/P5020DS_NAND_SECURE_BOOT_defconfig             |  3 ++-
 configs/P5020DS_NAND_defconfig                         |  3 ++-
 configs/P5020DS_SDCARD_defconfig                       |  3 ++-
 configs/P5020DS_SECURE_BOOT_defconfig                  |  3 ++-
 configs/P5020DS_SPIFLASH_defconfig                     |  3 ++-
 configs/P5020DS_SRIO_PCIE_BOOT_defconfig               |  3 ++-
 configs/P5020DS_defconfig                              |  3 ++-
 configs/P5040DS_NAND_SECURE_BOOT_defconfig             |  3 ++-
 configs/P5040DS_NAND_defconfig                         |  3 ++-
 configs/P5040DS_SDCARD_defconfig                       |  3 ++-
 configs/P5040DS_SECURE_BOOT_defconfig                  |  3 ++-
 configs/P5040DS_SPIFLASH_defconfig                     |  3 ++-
 configs/P5040DS_defconfig                              |  3 ++-
 configs/T1023RDB_NAND_defconfig                        |  3 ++-
 configs/T1023RDB_SDCARD_defconfig                      |  3 ++-
 configs/T1023RDB_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T1023RDB_SPIFLASH_defconfig                    |  3 ++-
 configs/T1023RDB_defconfig                             |  3 ++-
 configs/T1024QDS_DDR4_SECURE_BOOT_defconfig            |  3 ++-
 configs/T1024QDS_DDR4_defconfig                        |  3 ++-
 configs/T1024QDS_NAND_defconfig                        |  3 ++-
 configs/T1024QDS_SDCARD_defconfig                      |  3 ++-
 configs/T1024QDS_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T1024QDS_SPIFLASH_defconfig                    |  3 ++-
 configs/T1024QDS_defconfig                             |  3 ++-
 configs/T1024RDB_NAND_defconfig                        |  3 ++-
 configs/T1024RDB_SDCARD_defconfig                      |  3 ++-
 configs/T1024RDB_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T1024RDB_SPIFLASH_defconfig                    |  3 ++-
 configs/T1024RDB_defconfig                             |  3 ++-
 configs/T1040D4RDB_NAND_defconfig                      |  3 ++-
 configs/T1040D4RDB_SDCARD_defconfig                    |  3 ++-
 configs/T1040D4RDB_SECURE_BOOT_defconfig               |  3 ++-
 configs/T1040D4RDB_SPIFLASH_defconfig                  |  3 ++-
 configs/T1040D4RDB_defconfig                           |  3 ++-
 configs/T1040QDS_DDR4_defconfig                        |  3 ++-
 configs/T1040QDS_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T1040QDS_defconfig                             |  3 ++-
 configs/T1040RDB_NAND_defconfig                        |  3 ++-
 configs/T1040RDB_SDCARD_defconfig                      |  3 ++-
 configs/T1040RDB_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T1040RDB_SPIFLASH_defconfig                    |  3 ++-
 configs/T1040RDB_defconfig                             |  3 ++-
 configs/T1042D4RDB_NAND_defconfig                      |  3 ++-
 configs/T1042D4RDB_SDCARD_defconfig                    |  3 ++-
 configs/T1042D4RDB_SECURE_BOOT_defconfig               |  3 ++-
 configs/T1042D4RDB_SPIFLASH_defconfig                  |  3 ++-
 configs/T1042D4RDB_defconfig                           |  3 ++-
 configs/T1042RDB_PI_NAND_defconfig                     |  3 ++-
 configs/T1042RDB_PI_SDCARD_defconfig                   |  3 ++-
 configs/T1042RDB_PI_SPIFLASH_defconfig                 |  3 ++-
 configs/T1042RDB_PI_defconfig                          |  3 ++-
 configs/T1042RDB_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T1042RDB_defconfig                             |  3 ++-
 configs/T2080QDS_NAND_defconfig                        |  3 ++-
 configs/T2080QDS_SDCARD_defconfig                      |  3 ++-
 configs/T2080QDS_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T2080QDS_SPIFLASH_defconfig                    |  3 ++-
 configs/T2080QDS_SRIO_PCIE_BOOT_defconfig              |  3 ++-
 configs/T2080QDS_defconfig                             |  3 ++-
 configs/T2080RDB_NAND_defconfig                        |  3 ++-
 configs/T2080RDB_SDCARD_defconfig                      |  3 ++-
 configs/T2080RDB_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T2080RDB_SPIFLASH_defconfig                    |  3 ++-
 configs/T2080RDB_SRIO_PCIE_BOOT_defconfig              |  3 ++-
 configs/T2080RDB_defconfig                             |  3 ++-
 configs/T2081QDS_NAND_defconfig                        |  3 ++-
 configs/T2081QDS_SDCARD_defconfig                      |  3 ++-
 configs/T2081QDS_SPIFLASH_defconfig                    |  3 ++-
 configs/T2081QDS_SRIO_PCIE_BOOT_defconfig              |  3 ++-
 configs/T2081QDS_defconfig                             |  3 ++-
 configs/T4160QDS_NAND_defconfig                        |  3 ++-
 configs/T4160QDS_SDCARD_defconfig                      |  3 ++-
 configs/T4160QDS_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T4160QDS_defconfig                             |  3 ++-
 configs/T4160RDB_defconfig                             |  3 ++-
 configs/T4240QDS_NAND_defconfig                        |  3 ++-
 configs/T4240QDS_SDCARD_defconfig                      |  3 ++-
 configs/T4240QDS_SECURE_BOOT_defconfig                 |  3 ++-
 configs/T4240QDS_SRIO_PCIE_BOOT_defconfig              |  3 ++-
 configs/T4240QDS_defconfig                             |  3 ++-
 configs/T4240RDB_SDCARD_defconfig                      |  3 ++-
 configs/T4240RDB_defconfig                             |  3 ++-
 configs/UCP1020_SPIFLASH_defconfig                     |  3 ++-
 configs/UCP1020_defconfig                              |  3 ++-
 configs/alt_defconfig                                  |  3 ++-
 configs/am335x_boneblack_defconfig                     |  3 ++-
 configs/am335x_boneblack_vboot_defconfig               |  3 ++-
 configs/am335x_evm_defconfig                           |  3 ++-
 configs/am335x_evm_nor_defconfig                       |  3 ++-
 configs/am335x_evm_norboot_defconfig                   |  3 ++-
 configs/am335x_evm_spiboot_defconfig                   |  3 ++-
 configs/am335x_evm_usbspl_defconfig                    |  3 ++-
 configs/am335x_gp_evm_defconfig                        |  3 ++-
 configs/am437x_gp_evm_defconfig                        |  3 ++-
 configs/am437x_sk_evm_defconfig                        |  5 +++--
 configs/am43xx_evm_defconfig                           |  3 ++-
 configs/am43xx_evm_ethboot_defconfig                   |  3 ++-
 configs/am43xx_evm_qspiboot_defconfig                  |  3 ++-
 configs/am43xx_evm_usbhost_boot_defconfig              |  3 ++-
 configs/am57xx_evm_defconfig                           |  3 ++-
 configs/aristainetos2_defconfig                        |  3 ++-
 configs/aristainetos2b_defconfig                       |  3 ++-
 configs/aristainetos_defconfig                         |  3 ++-
 configs/at91sam9n12ek_mmc_defconfig                    |  3 ++-
 configs/at91sam9n12ek_nandflash_defconfig              |  3 ++-
 configs/at91sam9n12ek_spiflash_defconfig               |  3 ++-
 configs/at91sam9x5ek_dataflash_defconfig               |  3 ++-
 configs/at91sam9x5ek_mmc_defconfig                     |  3 ++-
 configs/at91sam9x5ek_nandflash_defconfig               |  3 ++-
 configs/at91sam9x5ek_spiflash_defconfig                |  3 ++-
 configs/atngw100_defconfig                             |  3 ++-
 configs/atngw100mkii_defconfig                         |  3 ++-
 configs/axm_defconfig                                  |  3 ++-
 configs/bayleybay_defconfig                            |  3 ++-
 configs/beaver_defconfig                               |  3 ++-
 configs/bf518f-ezbrd_defconfig                         |  3 ++-
 configs/bf525-ucr2_defconfig                           |  3 ++-
 configs/bf526-ezbrd_defconfig                          |  3 ++-
 configs/bf527-ad7160-eval_defconfig                    |  3 ++-
 configs/bf527-ezkit-v2_defconfig                       |  3 ++-
 configs/bf527-ezkit_defconfig                          |  3 ++-
 configs/bf527-sdp_defconfig                            |  3 ++-
 configs/bf537-minotaur_defconfig                       |  3 ++-
 configs/bf537-pnav_defconfig                           |  3 ++-
 configs/bf537-srv1_defconfig                           |  3 ++-
 configs/bf537-stamp_defconfig                          |  3 ++-
 configs/bf548-ezkit_defconfig                          |  3 ++-
 configs/bf561-acvilon_defconfig                        |  3 ++-
 configs/bf609-ezkit_defconfig                          |  3 ++-
 configs/bg0900_defconfig                               |  3 ++-
 configs/birdland_bav335a_defconfig                     |  3 ++-
 configs/birdland_bav335b_defconfig                     |  3 ++-
 configs/blackstamp_defconfig                           |  3 ++-
 configs/blackvme_defconfig                             |  3 ++-
 configs/br4_defconfig                                  |  3 ++-
 configs/cardhu_defconfig                               |  3 ++-
 configs/cgtqmx6eval_defconfig                          |  2 ++
 configs/chromebook_jerry_defconfig                     |  2 ++
 configs/chromebook_link_defconfig                      |  3 ++-
 configs/chromebook_samus_defconfig                     |  3 ++-
 configs/chromebox_panther_defconfig                    |  3 ++-
 configs/clearfog_defconfig                             |  3 ++-
 configs/cm_fx6_defconfig                               |  3 ++-
 configs/cm_t43_defconfig                               |  3 ++-
 configs/conga-qeval20-qa3-e3845_defconfig              |  3 ++-
 configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig  |  3 ++-
 configs/controlcenterd_36BIT_SDCARD_defconfig          |  3 ++-
 configs/coreboot-x86_defconfig                         |  3 ++-
 configs/cougarcanyon2_defconfig                        |  3 ++-
 configs/crownbay_defconfig                             |  3 ++-
 configs/d2net_v2_defconfig                             |  3 ++-
 configs/da850_am18xxevm_defconfig                      |  3 ++-
 configs/da850evm_defconfig                             |  3 ++-
 configs/da850evm_direct_nor_defconfig                  |  3 ++-
 configs/dalmore_defconfig                              |  3 ++-
 configs/db-88f6820-gp_defconfig                        |  3 ++-
 configs/db-mv784mp-gp_defconfig                        |  3 ++-
 configs/dra72_evm_defconfig                            |  5 +++--
 configs/dra74_evm_defconfig                            |  5 +++--
 configs/dra7xx_evm_defconfig                           |  4 +++-
 configs/dra7xx_evm_qspiboot_defconfig                  |  4 +++-
 configs/dra7xx_evm_uart3_defconfig                     |  4 +++-
 configs/draco_defconfig                                |  3 ++-
 configs/dreamplug_defconfig                            |  3 ++-
 configs/ds414_defconfig                                |  3 ++-
 configs/e2220-1170_defconfig                           |  3 ++-
 configs/ea20_defconfig                                 |  3 ++-
 configs/ethernut5_defconfig                            |  3 ++-
 configs/firefly-rk3288_defconfig                       |  2 ++
 configs/galileo_defconfig                              |  3 ++-
 configs/gose_defconfig                                 |  3 ++-
 configs/gplugd_defconfig                               |  3 ++-
 configs/inetspace_v2_defconfig                         |  3 ++-
 configs/ip04_defconfig                                 |  3 ++-
 configs/jetson-tk1_defconfig                           |  3 ++-
 configs/k2e_evm_defconfig                              |  3 ++-
 configs/k2g_evm_defconfig                              |  3 ++-
 configs/k2hk_evm_defconfig                             |  3 ++-
 configs/k2l_evm_defconfig                              |  3 ++-
 configs/km_kirkwood_128m16_defconfig                   |  3 ++-
 configs/km_kirkwood_defconfig                          |  3 ++-
 configs/km_kirkwood_pci_defconfig                      |  3 ++-
 configs/kmcoge4_defconfig                              |  3 ++-
 configs/kmcoge5un_defconfig                            |  3 ++-
 configs/kmlion1_defconfig                              |  3 ++-
 configs/kmnusa_defconfig                               |  3 ++-
 configs/kmsugp1_defconfig                              |  3 ++-
 configs/kmsuv31_defconfig                              |  3 ++-
 configs/koelsch_defconfig                              |  3 ++-
 configs/kylin-rk3036_defconfig                         |  2 ++
 configs/lager_defconfig                                |  3 ++-
 configs/legoev3_defconfig                              |  3 ++-
 configs/ls1021aqds_sdcard_qspi_defconfig               |  3 ++-
 configs/ls1021atwr_qspi_defconfig                      |  4 +++-
 configs/ls1021atwr_sdcard_qspi_defconfig               |  3 ++-
 configs/ls1043aqds_defconfig                           |  3 ++-
 configs/ls1043aqds_lpuart_defconfig                    |  3 ++-
 configs/ls1043aqds_nand_defconfig                      |  3 ++-
 configs/ls1043aqds_nor_ddr3_defconfig                  |  3 ++-
 configs/ls1043aqds_qspi_defconfig                      |  3 ++-
 configs/ls1043aqds_sdcard_ifc_defconfig                |  3 ++-
 configs/ls1043aqds_sdcard_qspi_defconfig               |  3 ++-
 configs/ls1043ardb_SECURE_BOOT_defconfig               |  3 ++-
 configs/ls1043ardb_defconfig                           |  3 ++-
 configs/ls1043ardb_nand_defconfig                      |  3 ++-
 configs/ls1043ardb_sdcard_defconfig                    |  3 ++-
 configs/ls2080aqds_defconfig                           |  2 +-
 configs/ls2080ardb_defconfig                           |  2 +-
 configs/ls2085aqds_defconfig                           |  2 +-
 configs/ls2085ardb_defconfig                           |  2 +-
 configs/lschlv2_defconfig                              |  3 ++-
 configs/lsxhl_defconfig                                |  3 ++-
 configs/m28evk_defconfig                               |  3 ++-
 configs/ma5d4evk_defconfig                             |  3 ++-
 configs/marsboard_defconfig                            |  3 ++-
 configs/maxbcm_defconfig                               |  3 ++-
 configs/mgcoge3un_defconfig                            |  3 ++-
 configs/minnowmax_defconfig                            |  3 ++-
 configs/mx28evk_auart_console_defconfig                |  3 ++-
 configs/mx28evk_defconfig                              |  3 ++-
 configs/mx28evk_nand_defconfig                         |  3 ++-
 configs/mx28evk_spi_defconfig                          |  3 ++-
 configs/mx6dlsabreauto_defconfig                       |  3 ++-
 configs/mx6dlsabresd_defconfig                         |  3 ++-
 configs/mx6qpsabreauto_defconfig                       |  3 ++-
 configs/mx6qsabreauto_defconfig                        |  3 ++-
 configs/mx6qsabrelite_defconfig                        |  3 ++-
 configs/mx6qsabresd_defconfig                          |  3 ++-
 configs/mx6sabresd_spl_defconfig                       |  3 ++-
 configs/mx6slevk_defconfig                             |  3 ++-
 configs/mx6slevk_spinor_defconfig                      |  3 ++-
 configs/mx6slevk_spl_defconfig                         |  3 ++-
 configs/mx6sxsabreauto_defconfig                       |  3 ++-
 configs/mx6sxsabresd_defconfig                         |  3 ++-
 configs/mx6sxsabresd_spl_defconfig                     |  3 ++-
 configs/net2big_v2_defconfig                           |  3 ++-
 configs/netspace_lite_v2_defconfig                     |  3 ++-
 configs/netspace_max_v2_defconfig                      |  3 ++-
 configs/netspace_mini_v2_defconfig                     |  3 ++-
 configs/netspace_v2_defconfig                          |  3 ++-
 configs/nitrogen6dl2g_defconfig                        |  3 ++-
 configs/nitrogen6dl_defconfig                          |  3 ++-
 configs/nitrogen6q2g_defconfig                         |  3 ++-
 configs/nitrogen6q_defconfig                           |  3 ++-
 configs/nitrogen6s1g_defconfig                         |  3 ++-
 configs/nitrogen6s_defconfig                           |  3 ++-
 configs/nyan-big_defconfig                             |  3 ++-
 configs/omapl138_lcdk_defconfig                        |  3 ++-
 configs/ot1200_defconfig                               |  3 ++-
 configs/ot1200_spl_defconfig                           |  3 ++-
 configs/p2371-0000_defconfig                           |  3 ++-
 configs/p2371-2180_defconfig                           |  3 ++-
 configs/p2571_defconfig                                |  3 ++-
 configs/pcm051_rev1_defconfig                          |  3 ++-
 configs/pcm051_rev3_defconfig                          |  3 ++-
 configs/peach-pi_defconfig                             |  3 ++-
 configs/peach-pit_defconfig                            |  3 ++-
 configs/porter_defconfig                               |  3 ++-
 configs/portl2_defconfig                               |  3 ++-
 configs/pr1_defconfig                                  |  3 ++-
 configs/pxm2_defconfig                                 |  3 ++-
 configs/qemu-x86_defconfig                             |  3 ++-
 configs/rastaban_defconfig                             |  3 ++-
 configs/riotboard_defconfig                            |  3 ++-
 configs/rock2_defconfig                                |  2 ++
 configs/rut_defconfig                                  |  3 ++-
 configs/sama5d2_xplained_mmc_defconfig                 |  3 ++-
 configs/sama5d2_xplained_spiflash_defconfig            |  3 ++-
 configs/sama5d3xek_mmc_defconfig                       |  3 ++-
 configs/sama5d3xek_nandflash_defconfig                 |  3 ++-
 configs/sama5d3xek_spiflash_defconfig                  |  3 ++-
 configs/sama5d4_xplained_mmc_defconfig                 |  3 ++-
 configs/sama5d4_xplained_nandflash_defconfig           |  3 ++-
 configs/sama5d4_xplained_spiflash_defconfig            |  3 ++-
 configs/sama5d4ek_mmc_defconfig                        |  3 ++-
 configs/sama5d4ek_nandflash_defconfig                  |  3 ++-
 configs/sama5d4ek_spiflash_defconfig                   |  3 ++-
 configs/sh7752evb_defconfig                            |  3 ++-
 configs/sh7753evb_defconfig                            |  3 ++-
 configs/sh7757lcr_defconfig                            |  3 ++-
 configs/silk_defconfig                                 |  3 ++-
 configs/smdk5250_defconfig                             |  3 ++-
 configs/smdk5420_defconfig                             |  3 ++-
 configs/snow_defconfig                                 |  3 ++-
 configs/socfpga_arria5_defconfig                       |  3 ++-
 configs/socfpga_cyclone5_defconfig                     |  3 ++-
 configs/socfpga_de0_nano_soc_defconfig                 |  3 +++
 configs/socfpga_mcvevk_defconfig                       |  2 ++
 configs/socfpga_sockit_defconfig                       |  3 ++-
 configs/socfpga_socrates_defconfig                     |  3 ++-
 configs/socfpga_sr1500_defconfig                       |  3 ++-
 configs/spring_defconfig                               |  3 ++-
 configs/stout_defconfig                                |  3 ++-
 configs/taurus_defconfig                               |  3 ++-
 configs/tec-ng_defconfig                               |  3 ++-
 configs/theadorable_debug_defconfig                    |  3 ++-
 configs/theadorable_defconfig                          |  3 ++-
 configs/thuban_defconfig                               |  3 ++-
 configs/tqma6q_mba6_mmc_defconfig                      |  3 ++-
 configs/tqma6q_mba6_spi_defconfig                      |  3 ++-
 configs/tqma6s_mba6_mmc_defconfig                      |  3 ++-
 configs/tqma6s_mba6_spi_defconfig                      |  3 ++-
 configs/trimslice_defconfig                            |  3 ++-
 configs/tseries_spi_defconfig                          |  3 ++-
 configs/venice2_defconfig                              |  3 ++-
 configs/vf610twr_defconfig                             |  3 ++-
 configs/vf610twr_nand_defconfig                        |  3 ++-
 configs/vinco_defconfig                                |  3 ++-
 configs/zynq_microzed_defconfig                        |  3 ++-
 configs/zynq_zc702_defconfig                           |  3 ++-
 configs/zynq_zc706_defconfig                           |  3 ++-
 configs/zynq_zc770_xm010_defconfig                     |  3 ++-
 configs/zynq_zc770_xm013_defconfig                     |  3 ++-
 configs/zynq_zed_defconfig                             |  3 ++-
 configs/zynq_zybo_defconfig                            |  3 ++-
 include/configs/MPC8536DS.h                            |  2 +-
 include/configs/P1010RDB.h                             |  3 ++-
 include/configs/P1022DS.h                              |  3 ++-
 include/configs/T102xQDS.h                             |  3 ++-
 include/configs/T102xRDB.h                             |  3 ++-
 include/configs/T104xRDB.h                             |  3 ++-
 include/configs/T208xQDS.h                             |  5 +++--
 include/configs/T208xRDB.h                             |  5 +++--
 include/configs/UCP1020.h                              |  4 ++--
 include/configs/am335x_evm.h                           |  3 ++-
 include/configs/am43xx_evm.h                           |  2 +-
 include/configs/at91sam9n12ek.h                        |  3 ++-
 include/configs/at91sam9x5ek.h                         |  3 ++-
 include/configs/bav335x.h                              |  3 ++-
 include/configs/bfin_adi_common.h                      |  2 +-
 include/configs/cgtqmx6eval.h                          |  4 ++--
 include/configs/chromebook_jerry.h                     |  3 ++-
 include/configs/clearfog.h                             |  3 ++-
 include/configs/cm_fx6.h                               |  3 ++-
 include/configs/cm_t43.h                               |  3 ++-
 include/configs/da850evm.h                             |  6 ++++--
 include/configs/db-88f6820-gp.h                        |  3 ++-
 include/configs/db-mv784mp-gp.h                        |  3 ++-
 include/configs/dra7xx_evm.h                           |  5 +++--
 include/configs/dreamplug.h                            |  2 +-
 include/configs/ds414.h                                |  3 ++-
 include/configs/exynos5-common.h                       |  2 +-
 include/configs/gw_ventana.h                           | 10 +++++-----
 include/configs/ls1021atwr.h                           |  1 -
 include/configs/ls1043a_common.h                       |  2 +-
 include/configs/ls2080aqds.h                           |  3 ++-
 include/configs/ls2080ardb.h                           |  3 ++-
 include/configs/lsxl.h                                 |  2 +-
 include/configs/ma5d4evk.h                             |  3 ++-
 include/configs/maxbcm.h                               |  3 ++-
 include/configs/mx6ul_14x14_evk.h                      |  3 ++-
 include/configs/mx7dsabresd.h                          |  3 ++-
 include/configs/omapl138_lcdk.h                        |  3 ++-
 include/configs/ot1200.h                               |  3 ++-
 include/configs/p1_p2_rdb_pc.h                         |  5 +++--
 include/configs/pcm051.h                               |  3 ++-
 include/configs/pcm052.h                               |  3 ++-
 include/configs/rk3036_common.h                        |  1 -
 include/configs/rk3288_common.h                        |  1 -
 include/configs/sama5d2_xplained.h                     |  3 ++-
 include/configs/sama5d3xek.h                           |  3 ++-
 include/configs/sama5d4_xplained.h                     |  3 ++-
 include/configs/sama5d4ek.h                            |  3 ++-
 include/configs/siemens-am33x-common.h                 |  3 ++-
 include/configs/socfpga_common.h                       |  3 ++-
 include/configs/taurus.h                               |  3 ++-
 include/configs/tegra-common-usb-gadget.h              |  2 +-
 include/configs/theadorable.h                          |  3 ++-
 include/configs/ti_armv7_keystone2.h                   |  3 ++-
 include/configs/tseries.h                              |  3 ++-
 include/configs/zynq-common.h                          |  3 ++-
 521 files changed, 1041 insertions(+), 532 deletions(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 2c58b9a..4aa4dd5 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -113,7 +113,7 @@ config X86
 	select DM_SERIAL
 	select DM_GPIO
 	select DM_SPI
-	select DM_SPI_FLASH
+	select MTD
 
 endchoice
 
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index b22a04f..c6487ac 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -120,7 +120,7 @@ config ARCH_MVEBU
 	select DM_ETH
 	select DM_SERIAL
 	select DM_SPI
-	select DM_SPI_FLASH
+	select MTD
 	select SPL_DM
 	select SPL_DM_SEQ_ALIAS
 	select SPL_OF_CONTROL
@@ -220,8 +220,9 @@ config TARGET_STV0991
 	select DM
 	select DM_SERIAL
 	select DM_SPI
-	select DM_SPI_FLASH
-	select SPI_FLASH
+	select MTD
+	select MTD_M25P80
+	select MTD_SPI_NOR
 
 config TARGET_X600
 	bool "Support x600"
@@ -424,7 +425,7 @@ config ARCH_EXYNOS
 	bool "Samsung EXYNOS"
 	select CPU_V7
 	select DM
-	select DM_SPI_FLASH
+	select MTD
 	select DM_SERIAL
 	select DM_SPI
 	select DM_GPIO
@@ -514,7 +515,7 @@ config ARCH_SOCFPGA
 	select OF_CONTROL
 	select SPL_OF_CONTROL
 	select DM
-	select DM_SPI_FLASH
+	select MTD
 	select DM_SPI
 
 config TARGET_CM_T43
diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
index d3bddb7..a515a5c 100644
--- a/arch/arm/mach-rockchip/Kconfig
+++ b/arch/arm/mach-rockchip/Kconfig
@@ -32,7 +32,7 @@ config DM_SERIAL
 config DM_SPI
 	default y
 
-config DM_SPI_FLASH
+config MTD
 	default y
 
 config DM_I2C
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index ba6983f..2bc8747 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -12,7 +12,7 @@ config TEGRA_COMMON
 	select DM_PWM
 	select DM_SERIAL
 	select DM_SPI
-	select DM_SPI_FLASH
+	select MTD
 	select OF_CONTROL
 	select VIDCONSOLE_AS_LCD if DM_VIDEO
 
diff --git a/board/davinci/ea20/ea20.c b/board/davinci/ea20/ea20.c
index 66804d7..ef72d6b 100644
--- a/board/davinci/ea20/ea20.c
+++ b/board/davinci/ea20/ea20.c
@@ -160,7 +160,7 @@ const struct pinmux_config halten_pin[] = {
 };
 
 static const struct pinmux_resource pinmuxes[] = {
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 	PINMUX_ITEM(spi1_pins),
 #endif
 	PINMUX_ITEM(uart_pins),
diff --git a/configs/B4420QDS_NAND_defconfig b/configs/B4420QDS_NAND_defconfig
index 0e2b0a8..c343a26 100644
--- a/configs/B4420QDS_NAND_defconfig
+++ b/configs/B4420QDS_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_B4420,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/B4420QDS_SPIFLASH_defconfig b/configs/B4420QDS_SPIFLASH_defconfig
index 9875191..a0486c0 100644
--- a/configs/B4420QDS_SPIFLASH_defconfig
+++ b/configs/B4420QDS_SPIFLASH_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_B4420,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/B4420QDS_defconfig b/configs/B4420QDS_defconfig
index c2f903b..8490edf 100644
--- a/configs/B4420QDS_defconfig
+++ b/configs/B4420QDS_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_B4420"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/B4860QDS_NAND_defconfig b/configs/B4860QDS_NAND_defconfig
index 5533cb3..108af5d 100644
--- a/configs/B4860QDS_NAND_defconfig
+++ b/configs/B4860QDS_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_B4860,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/B4860QDS_SECURE_BOOT_defconfig b/configs/B4860QDS_SECURE_BOOT_defconfig
index 051dccb..5ae9de8 100644
--- a/configs/B4860QDS_SECURE_BOOT_defconfig
+++ b/configs/B4860QDS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_B4860,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/B4860QDS_SPIFLASH_defconfig b/configs/B4860QDS_SPIFLASH_defconfig
index e6807df..0bb8c60 100644
--- a/configs/B4860QDS_SPIFLASH_defconfig
+++ b/configs/B4860QDS_SPIFLASH_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_B4860,RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig b/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
index b7832db..963a942 100644
--- a/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/B4860QDS_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_B4860,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/B4860QDS_defconfig b/configs/B4860QDS_defconfig
index e68c19f..04f0672 100644
--- a/configs/B4860QDS_defconfig
+++ b/configs/B4860QDS_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_B4860"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9131RDB_NAND_SYSCLK100_defconfig b/configs/BSC9131RDB_NAND_SYSCLK100_defconfig
index a199806..98b2c75 100644
--- a/configs/BSC9131RDB_NAND_SYSCLK100_defconfig
+++ b/configs/BSC9131RDB_NAND_SYSCLK100_defconfig
@@ -9,7 +9,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9131RDB,NAND,SYS_CLK_100"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
diff --git a/configs/BSC9131RDB_NAND_defconfig b/configs/BSC9131RDB_NAND_defconfig
index 1f2d2b8..a146494 100644
--- a/configs/BSC9131RDB_NAND_defconfig
+++ b/configs/BSC9131RDB_NAND_defconfig
@@ -9,7 +9,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9131RDB,NAND"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
diff --git a/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig b/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
index e9c3723..69718ad 100644
--- a/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
+++ b/configs/BSC9131RDB_SPIFLASH_SYSCLK100_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9131RDB,SPIFLASH,SYS_CLK_100"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
diff --git a/configs/BSC9131RDB_SPIFLASH_defconfig b/configs/BSC9131RDB_SPIFLASH_defconfig
index f46c0ca..6673920 100644
--- a/configs/BSC9131RDB_SPIFLASH_defconfig
+++ b/configs/BSC9131RDB_SPIFLASH_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9131RDB,SPIFLASH"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
index b3829f5..d9726ab 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK100_SECURE_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,NAND_SECBOOT,SYS_CLK_100_DDR_100,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK100_defconfig b/configs/BSC9132QDS_NAND_DDRCLK100_defconfig
index 88f2ade..69bcfd7 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK100_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,NAND,SYS_CLK_100_DDR_100"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
index 568470b..0cee1d6 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK133_SECURE_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,NAND_SECBOOT,SYS_CLK_100_DDR_133,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_NAND_DDRCLK133_defconfig b/configs/BSC9132QDS_NAND_DDRCLK133_defconfig
index 58bf069..d512def 100644
--- a/configs/BSC9132QDS_NAND_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_NAND_DDRCLK133_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,NAND,SYS_CLK_100_DDR_133"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
index 13e8325..d8653ca 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK100_SECURE_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SYS_CLK_100_DDR_100,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK100_defconfig b/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
index 92c4e28..09677c2 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK100_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SYS_CLK_100_DDR_100"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
index 291c879..1f7955e 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK133_SECURE_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SYS_CLK_100_DDR_133,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_NOR_DDRCLK133_defconfig b/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
index bb49265..3f2097d 100644
--- a/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_NOR_DDRCLK133_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SYS_CLK_100_DDR_133"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
index 076a99e..bc8bffd 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK100_SECURE_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SDCARD,SYS_CLK_100_DDR_100,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
index 3e21ef4..b997cb0 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK100_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SDCARD,SYS_CLK_100_DDR_100"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
index 5c4ba30..b1c287e 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK133_SECURE_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SDCARD,SYS_CLK_100_DDR_133,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig b/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
index 047f315..3d5f683 100644
--- a/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_SDCARD_DDRCLK133_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SDCARD,SYS_CLK_100_DDR_133"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
index 1aa92e5..4de2c88 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_SECURE_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SPIFLASH,SYS_CLK_100_DDR_100,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
index 66500e7..867a3c0 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK100_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SPIFLASH,SYS_CLK_100_DDR_100"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
index 3531479..45c3442 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_SECURE_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SPIFLASH,SYS_CLK_100_DDR_133,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
index 7ceec10..ed738f7 100644
--- a/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
+++ b/configs/BSC9132QDS_SPIFLASH_DDRCLK133_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="BSC9132QDS,SPIFLASH,SYS_CLK_100_DDR_133"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/C29XPCIE_NAND_defconfig b/configs/C29XPCIE_NAND_defconfig
index bea850f..8f927ee 100644
--- a/configs/C29XPCIE_NAND_defconfig
+++ b/configs/C29XPCIE_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
diff --git a/configs/C29XPCIE_NOR_SECBOOT_defconfig b/configs/C29XPCIE_NOR_SECBOOT_defconfig
index c6e5e08..291051d 100644
--- a/configs/C29XPCIE_NOR_SECBOOT_defconfig
+++ b/configs/C29XPCIE_NOR_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
diff --git a/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig b/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
index 53889f1..5035b66 100644
--- a/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
+++ b/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,SPIFLASH,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
diff --git a/configs/C29XPCIE_SPIFLASH_defconfig b/configs/C29XPCIE_SPIFLASH_defconfig
index e236129..9e553c8 100644
--- a/configs/C29XPCIE_SPIFLASH_defconfig
+++ b/configs/C29XPCIE_SPIFLASH_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
diff --git a/configs/C29XPCIE_defconfig b/configs/C29XPCIE_defconfig
index 214aff7..d421a5e 100644
--- a/configs/C29XPCIE_defconfig
+++ b/configs/C29XPCIE_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
diff --git a/configs/M52277EVB_defconfig b/configs/M52277EVB_defconfig
index 711a411..9683bb9 100644
--- a/configs/M52277EVB_defconfig
+++ b/configs/M52277EVB_defconfig
@@ -6,5 +6,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/M52277EVB_stmicro_defconfig b/configs/M52277EVB_stmicro_defconfig
index 05d20d6..7ca2611 100644
--- a/configs/M52277EVB_stmicro_defconfig
+++ b/configs/M52277EVB_stmicro_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CF_SBF,SYS_STMICRO_BOOT"
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/M54418TWR_defconfig b/configs/M54418TWR_defconfig
index 62cebda..b019b63 100644
--- a/configs/M54418TWR_defconfig
+++ b/configs/M54418TWR_defconfig
@@ -8,5 +8,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/M54418TWR_nand_mii_defconfig b/configs/M54418TWR_nand_mii_defconfig
index de73e30..eedee6c 100644
--- a/configs/M54418TWR_nand_mii_defconfig
+++ b/configs/M54418TWR_nand_mii_defconfig
@@ -8,5 +8,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/M54418TWR_nand_rmii_defconfig b/configs/M54418TWR_nand_rmii_defconfig
index 139811c..c8000a8 100644
--- a/configs/M54418TWR_nand_rmii_defconfig
+++ b/configs/M54418TWR_nand_rmii_defconfig
@@ -8,5 +8,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/M54418TWR_nand_rmii_lowfreq_defconfig b/configs/M54418TWR_nand_rmii_lowfreq_defconfig
index a3cf48b..184936b 100644
--- a/configs/M54418TWR_nand_rmii_lowfreq_defconfig
+++ b/configs/M54418TWR_nand_rmii_lowfreq_defconfig
@@ -8,5 +8,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/M54418TWR_serial_mii_defconfig b/configs/M54418TWR_serial_mii_defconfig
index ad29d52..fd827e3 100644
--- a/configs/M54418TWR_serial_mii_defconfig
+++ b/configs/M54418TWR_serial_mii_defconfig
@@ -8,5 +8,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/M54418TWR_serial_rmii_defconfig b/configs/M54418TWR_serial_rmii_defconfig
index 62cebda..b019b63 100644
--- a/configs/M54418TWR_serial_rmii_defconfig
+++ b/configs/M54418TWR_serial_rmii_defconfig
@@ -8,5 +8,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/M54451EVB_defconfig b/configs/M54451EVB_defconfig
index a9fe02f..62cf895 100644
--- a/configs/M54451EVB_defconfig
+++ b/configs/M54451EVB_defconfig
@@ -6,5 +6,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/M54451EVB_stmicro_defconfig b/configs/M54451EVB_stmicro_defconfig
index f10e86c..447a506 100644
--- a/configs/M54451EVB_stmicro_defconfig
+++ b/configs/M54451EVB_stmicro_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_EXTRA_OPTIONS="CF_SBF,SYS_STMICRO_BOOT,SYS_INPUT_CLKSRC=24000000"
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/M54455EVB_a66_defconfig b/configs/M54455EVB_a66_defconfig
index 3053514..f9d6f73 100644
--- a/configs/M54455EVB_a66_defconfig
+++ b/configs/M54455EVB_a66_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_ATMEL_BOOT,SYS_INPUT_CLKSRC=66666666"
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/M54455EVB_defconfig b/configs/M54455EVB_defconfig
index 9f70f7e..b9275b0 100644
--- a/configs/M54455EVB_defconfig
+++ b/configs/M54455EVB_defconfig
@@ -6,5 +6,6 @@ CONFIG_SYS_PROMPT="-> "
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/M54455EVB_i66_defconfig b/configs/M54455EVB_i66_defconfig
index 8421393..ddba2d5 100644
--- a/configs/M54455EVB_i66_defconfig
+++ b/configs/M54455EVB_i66_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_INTEL_BOOT,SYS_INPUT_CLKSRC=66666666"
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/M54455EVB_intel_defconfig b/configs/M54455EVB_intel_defconfig
index c630108..d3312c5 100644
--- a/configs/M54455EVB_intel_defconfig
+++ b/configs/M54455EVB_intel_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_INTEL_BOOT,SYS_INPUT_CLKSRC=33333333"
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/M54455EVB_stm33_defconfig b/configs/M54455EVB_stm33_defconfig
index 4e8aee4..c3a4bb0 100644
--- a/configs/M54455EVB_stm33_defconfig
+++ b/configs/M54455EVB_stm33_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_STMICRO_BOOT,CF_SBF,SYS_INPUT_CLKSRC=33333333"
 # CONFIG_CMD_LOADB is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/MPC8536DS_36BIT_defconfig b/configs/MPC8536DS_36BIT_defconfig
index af1ea37..77ac30d 100644
--- a/configs/MPC8536DS_36BIT_defconfig
+++ b/configs/MPC8536DS_36BIT_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_MPC8536DS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/MPC8536DS_SDCARD_defconfig b/configs/MPC8536DS_SDCARD_defconfig
index b91b4e4..1413b63 100644
--- a/configs/MPC8536DS_SDCARD_defconfig
+++ b/configs/MPC8536DS_SDCARD_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_MPC8536DS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/MPC8536DS_SPIFLASH_defconfig b/configs/MPC8536DS_SPIFLASH_defconfig
index 9163118..2ab025c 100644
--- a/configs/MPC8536DS_SPIFLASH_defconfig
+++ b/configs/MPC8536DS_SPIFLASH_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_MPC8536DS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/MPC8536DS_defconfig b/configs/MPC8536DS_defconfig
index ff5f90b..08e4785 100644
--- a/configs/MPC8536DS_defconfig
+++ b/configs/MPC8536DS_defconfig
@@ -3,7 +3,8 @@ CONFIG_MPC85xx=y
 CONFIG_TARGET_MPC8536DS=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
index 70140f4..0ed30f8 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,NAND_SECBOOT,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig
index a0a8d06..90077ac 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
index ef2c1ef..2f806e9 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index 7df594d..2d93cf8 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
index 6d6710f..7d33d4b 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
index 775ed29..34b37f8 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,SPIFLASH,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
index 60f736f..be401df 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_NAND_SECBOOT_defconfig b/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
index 406334a..aa42783 100644
--- a/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_NAND_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,NAND_SECBOOT,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_NAND_defconfig b/configs/P1010RDB-PA_NAND_defconfig
index 1dd5cef..6e1fb61 100644
--- a/configs/P1010RDB-PA_NAND_defconfig
+++ b/configs/P1010RDB-PA_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_NOR_SECBOOT_defconfig b/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
index d969d0e..1a0cece 100644
--- a/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_NOR_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_NOR_defconfig b/configs/P1010RDB-PA_NOR_defconfig
index fefbf64..8c0d26a 100644
--- a/configs/P1010RDB-PA_NOR_defconfig
+++ b/configs/P1010RDB-PA_NOR_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_SDCARD_defconfig b/configs/P1010RDB-PA_SDCARD_defconfig
index e5f29c0..0124b1f 100644
--- a/configs/P1010RDB-PA_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
index 5540a61..b9892d7 100644
--- a/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,SPIFLASH,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PA_SPIFLASH_defconfig b/configs/P1010RDB-PA_SPIFLASH_defconfig
index d551d3f..d830316 100644
--- a/configs/P1010RDB-PA_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
index a8fbfaa..0237271 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,NAND_SECBOOT,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_defconfig b/configs/P1010RDB-PB_36BIT_NAND_defconfig
index 627d953..f140058 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
index 2215969..5064415 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index 980cf7c..ce9e65f 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
index f98ccb3..4d30464 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
index 2fd6c47..4d858c8 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,SPIFLASH,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
index 33bff1f..e1e9d44 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_NAND_SECBOOT_defconfig b/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
index 2cfc763..90122ec 100644
--- a/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_NAND_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,NAND_SECBOOT,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_NAND_defconfig b/configs/P1010RDB-PB_NAND_defconfig
index c9c6de9..56a853b 100644
--- a/configs/P1010RDB-PB_NAND_defconfig
+++ b/configs/P1010RDB-PB_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_NOR_SECBOOT_defconfig b/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
index 29ae621..b6d1e0f 100644
--- a/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_NOR_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_NOR_defconfig b/configs/P1010RDB-PB_NOR_defconfig
index 5fa7e72..bb37b28 100644
--- a/configs/P1010RDB-PB_NOR_defconfig
+++ b/configs/P1010RDB-PB_NOR_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_SDCARD_defconfig b/configs/P1010RDB-PB_SDCARD_defconfig
index 4379db5..313e4a0 100644
--- a/configs/P1010RDB-PB_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
index 1b478e4..d966677 100644
--- a/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_SECBOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,SPIFLASH,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1010RDB-PB_SPIFLASH_defconfig b/configs/P1010RDB-PB_SPIFLASH_defconfig
index f92483f..53e112f 100644
--- a/configs/P1010RDB-PB_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PC_36BIT_NAND_defconfig b/configs/P1020RDB-PC_36BIT_NAND_defconfig
index 7817039..a4364f3 100644
--- a/configs/P1020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1020RDB-PC_36BIT_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,36BIT,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index f2aae6e..ae24451 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,36BIT,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
index b54ab14..52a0ec1 100644
--- a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,36BIT,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
index aec845c..34d1615 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PC_NAND_defconfig b/configs/P1020RDB-PC_NAND_defconfig
index 6a2affe..399ca0c 100644
--- a/configs/P1020RDB-PC_NAND_defconfig
+++ b/configs/P1020RDB-PC_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PC_SDCARD_defconfig b/configs/P1020RDB-PC_SDCARD_defconfig
index 4ebb430..44764d6 100644
--- a/configs/P1020RDB-PC_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PC_SPIFLASH_defconfig b/configs/P1020RDB-PC_SPIFLASH_defconfig
index 91aed54..a8e712e 100644
--- a/configs/P1020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PC_defconfig b/configs/P1020RDB-PC_defconfig
index a6fb793..81ed66f 100644
--- a/configs/P1020RDB-PC_defconfig
+++ b/configs/P1020RDB-PC_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PD_NAND_defconfig b/configs/P1020RDB-PD_NAND_defconfig
index 3cfe779..468c6b2 100644
--- a/configs/P1020RDB-PD_NAND_defconfig
+++ b/configs/P1020RDB-PD_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PD,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PD_SDCARD_defconfig b/configs/P1020RDB-PD_SDCARD_defconfig
index 7d8f0db..f4614c9 100644
--- a/configs/P1020RDB-PD_SDCARD_defconfig
+++ b/configs/P1020RDB-PD_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PD,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PD_SPIFLASH_defconfig b/configs/P1020RDB-PD_SPIFLASH_defconfig
index 486ff91..634983a 100644
--- a/configs/P1020RDB-PD_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PD_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PD,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1020RDB-PD_defconfig b/configs/P1020RDB-PD_defconfig
index 69930fe..92714e9 100644
--- a/configs/P1020RDB-PD_defconfig
+++ b/configs/P1020RDB-PD_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1021RDB-PC_36BIT_NAND_defconfig b/configs/P1021RDB-PC_36BIT_NAND_defconfig
index 1a9e1a8..df188f7 100644
--- a/configs/P1021RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1021RDB-PC_36BIT_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,36BIT,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1021RDB-PC_36BIT_SDCARD_defconfig b/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
index 4487d01..da4a512 100644
--- a/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,36BIT,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
index f0cd301..d31f4b4 100644
--- a/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,36BIT,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1021RDB-PC_36BIT_defconfig b/configs/P1021RDB-PC_36BIT_defconfig
index f2dcdeb..fc32688 100644
--- a/configs/P1021RDB-PC_36BIT_defconfig
+++ b/configs/P1021RDB-PC_36BIT_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1021RDB-PC_NAND_defconfig b/configs/P1021RDB-PC_NAND_defconfig
index c14adaf..9725306 100644
--- a/configs/P1021RDB-PC_NAND_defconfig
+++ b/configs/P1021RDB-PC_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1021RDB-PC_SDCARD_defconfig b/configs/P1021RDB-PC_SDCARD_defconfig
index 21b154a..af6125a 100644
--- a/configs/P1021RDB-PC_SDCARD_defconfig
+++ b/configs/P1021RDB-PC_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1021RDB-PC_SPIFLASH_defconfig b/configs/P1021RDB-PC_SPIFLASH_defconfig
index 61f56e1..c658ea9 100644
--- a/configs/P1021RDB-PC_SPIFLASH_defconfig
+++ b/configs/P1021RDB-PC_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1021RDB-PC_defconfig b/configs/P1021RDB-PC_defconfig
index 2b4c7e7..a0b1e91 100644
--- a/configs/P1021RDB-PC_defconfig
+++ b/configs/P1021RDB-PC_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1021RDB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1022DS_36BIT_NAND_defconfig b/configs/P1022DS_36BIT_NAND_defconfig
index 2a83e6a..bc7b3ce 100644
--- a/configs/P1022DS_36BIT_NAND_defconfig
+++ b/configs/P1022DS_36BIT_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="36BIT,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1022DS_36BIT_SDCARD_defconfig b/configs/P1022DS_36BIT_SDCARD_defconfig
index 34b61f4..34cf86b 100644
--- a/configs/P1022DS_36BIT_SDCARD_defconfig
+++ b/configs/P1022DS_36BIT_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="36BIT,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1022DS_36BIT_SPIFLASH_defconfig b/configs/P1022DS_36BIT_SPIFLASH_defconfig
index c9b06fe..0178a96 100644
--- a/configs/P1022DS_36BIT_SPIFLASH_defconfig
+++ b/configs/P1022DS_36BIT_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="36BIT,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1022DS_36BIT_defconfig b/configs/P1022DS_36BIT_defconfig
index fe781aa..611d972 100644
--- a/configs/P1022DS_36BIT_defconfig
+++ b/configs/P1022DS_36BIT_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1022DS_NAND_defconfig b/configs/P1022DS_NAND_defconfig
index 5f8c788..4d3d4c8 100644
--- a/configs/P1022DS_NAND_defconfig
+++ b/configs/P1022DS_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1022DS_SDCARD_defconfig b/configs/P1022DS_SDCARD_defconfig
index 3072c16..9264fe6 100644
--- a/configs/P1022DS_SDCARD_defconfig
+++ b/configs/P1022DS_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1022DS_SPIFLASH_defconfig b/configs/P1022DS_SPIFLASH_defconfig
index e6eac27..1d1873c 100644
--- a/configs/P1022DS_SPIFLASH_defconfig
+++ b/configs/P1022DS_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1022DS_defconfig b/configs/P1022DS_defconfig
index dfe7696..0fdc8c0 100644
--- a/configs/P1022DS_defconfig
+++ b/configs/P1022DS_defconfig
@@ -5,7 +5,8 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1024RDB_36BIT_defconfig b/configs/P1024RDB_36BIT_defconfig
index 6c3e547..0f2cb71 100644
--- a/configs/P1024RDB_36BIT_defconfig
+++ b/configs/P1024RDB_36BIT_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1024RDB,36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1024RDB_NAND_defconfig b/configs/P1024RDB_NAND_defconfig
index ee181de..77b3795 100644
--- a/configs/P1024RDB_NAND_defconfig
+++ b/configs/P1024RDB_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1024RDB,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1024RDB_SDCARD_defconfig b/configs/P1024RDB_SDCARD_defconfig
index b874f55..efc2e3f 100644
--- a/configs/P1024RDB_SDCARD_defconfig
+++ b/configs/P1024RDB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1024RDB,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1024RDB_SPIFLASH_defconfig b/configs/P1024RDB_SPIFLASH_defconfig
index 8e8c1af..4eee960 100644
--- a/configs/P1024RDB_SPIFLASH_defconfig
+++ b/configs/P1024RDB_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1024RDB,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1024RDB_defconfig b/configs/P1024RDB_defconfig
index d0e363c..acdf6c7 100644
--- a/configs/P1024RDB_defconfig
+++ b/configs/P1024RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1024RDB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1025RDB_36BIT_defconfig b/configs/P1025RDB_36BIT_defconfig
index aff4ae0..bb198d8 100644
--- a/configs/P1025RDB_36BIT_defconfig
+++ b/configs/P1025RDB_36BIT_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1025RDB,36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1025RDB_NAND_defconfig b/configs/P1025RDB_NAND_defconfig
index 8b0fdd9..d577617 100644
--- a/configs/P1025RDB_NAND_defconfig
+++ b/configs/P1025RDB_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1025RDB,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1025RDB_SDCARD_defconfig b/configs/P1025RDB_SDCARD_defconfig
index 7d39a34..989d019 100644
--- a/configs/P1025RDB_SDCARD_defconfig
+++ b/configs/P1025RDB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1025RDB,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1025RDB_SPIFLASH_defconfig b/configs/P1025RDB_SPIFLASH_defconfig
index 945d51f..f5af87d 100644
--- a/configs/P1025RDB_SPIFLASH_defconfig
+++ b/configs/P1025RDB_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1025RDB,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P1025RDB_defconfig b/configs/P1025RDB_defconfig
index 176cd74..f38f629 100644
--- a/configs/P1025RDB_defconfig
+++ b/configs/P1025RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P1025RDB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2020RDB-PC_36BIT_NAND_defconfig b/configs/P2020RDB-PC_36BIT_NAND_defconfig
index e6ebb61..dcb3dc2 100644
--- a/configs/P2020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P2020RDB-PC_36BIT_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,36BIT,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index d4f00e6..8e0cae3 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,36BIT,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
index ac345f6..4487440 100644
--- a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,36BIT,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
index e8e56b6..e05802c 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,36BIT"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2020RDB-PC_NAND_defconfig b/configs/P2020RDB-PC_NAND_defconfig
index 641784b..61e09d4 100644
--- a/configs/P2020RDB-PC_NAND_defconfig
+++ b/configs/P2020RDB-PC_NAND_defconfig
@@ -8,7 +8,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2020RDB-PC_SDCARD_defconfig b/configs/P2020RDB-PC_SDCARD_defconfig
index 1484ac2..ad2df4d 100644
--- a/configs/P2020RDB-PC_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2020RDB-PC_SPIFLASH_defconfig b/configs/P2020RDB-PC_SPIFLASH_defconfig
index 2226979..8b9cc6c 100644
--- a/configs/P2020RDB-PC_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2020RDB-PC_defconfig b/configs/P2020RDB-PC_defconfig
index 09416fb..75a6523 100644
--- a/configs/P2020RDB-PC_defconfig
+++ b/configs/P2020RDB-PC_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="P2020RDB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2041RDB_NAND_defconfig b/configs/P2041RDB_NAND_defconfig
index c9eb16a..57d500d 100644
--- a/configs/P2041RDB_NAND_defconfig
+++ b/configs/P2041RDB_NAND_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2041RDB_SDCARD_defconfig b/configs/P2041RDB_SDCARD_defconfig
index 036fd70..aaf29ce 100644
--- a/configs/P2041RDB_SDCARD_defconfig
+++ b/configs/P2041RDB_SDCARD_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2041RDB_SECURE_BOOT_defconfig b/configs/P2041RDB_SECURE_BOOT_defconfig
index 2896693..cb76065 100644
--- a/configs/P2041RDB_SECURE_BOOT_defconfig
+++ b/configs/P2041RDB_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2041RDB_SPIFLASH_defconfig b/configs/P2041RDB_SPIFLASH_defconfig
index f488251..25e2315 100644
--- a/configs/P2041RDB_SPIFLASH_defconfig
+++ b/configs/P2041RDB_SPIFLASH_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig b/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
index 0afbd0c..8aba19b 100644
--- a/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P2041RDB_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P2041RDB_defconfig b/configs/P2041RDB_defconfig
index c234c71..4e4e469 100644
--- a/configs/P2041RDB_defconfig
+++ b/configs/P2041RDB_defconfig
@@ -5,7 +5,8 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P3041DS_NAND_SECURE_BOOT_defconfig b/configs/P3041DS_NAND_SECURE_BOOT_defconfig
index da81767..c6b7cdc 100644
--- a/configs/P3041DS_NAND_SECURE_BOOT_defconfig
+++ b/configs/P3041DS_NAND_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,NAND,SECURE_BOOT,SYS_TEXT_BASE=0xFFF40000"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P3041DS_NAND_defconfig b/configs/P3041DS_NAND_defconfig
index db083a0..b8fc9e9 100644
--- a/configs/P3041DS_NAND_defconfig
+++ b/configs/P3041DS_NAND_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P3041DS_SDCARD_defconfig b/configs/P3041DS_SDCARD_defconfig
index 43a7c59..6a2def9 100644
--- a/configs/P3041DS_SDCARD_defconfig
+++ b/configs/P3041DS_SDCARD_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P3041DS_SECURE_BOOT_defconfig b/configs/P3041DS_SECURE_BOOT_defconfig
index b9bdac0..e6f219b 100644
--- a/configs/P3041DS_SECURE_BOOT_defconfig
+++ b/configs/P3041DS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P3041DS_SPIFLASH_defconfig b/configs/P3041DS_SPIFLASH_defconfig
index 8b861d3..6bef8d8 100644
--- a/configs/P3041DS_SPIFLASH_defconfig
+++ b/configs/P3041DS_SPIFLASH_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P3041DS_SRIO_PCIE_BOOT_defconfig b/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
index c341b51..a81ffb2 100644
--- a/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P3041DS_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P3041DS_defconfig b/configs/P3041DS_defconfig
index 3cc04a9..5ccbf7a 100644
--- a/configs/P3041DS_defconfig
+++ b/configs/P3041DS_defconfig
@@ -5,7 +5,8 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P4080DS_SDCARD_defconfig b/configs/P4080DS_SDCARD_defconfig
index 492910b..b5558a2 100644
--- a/configs/P4080DS_SDCARD_defconfig
+++ b/configs/P4080DS_SDCARD_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P4080DS_SECURE_BOOT_defconfig b/configs/P4080DS_SECURE_BOOT_defconfig
index 760194c..2738947 100644
--- a/configs/P4080DS_SECURE_BOOT_defconfig
+++ b/configs/P4080DS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P4080DS_SPIFLASH_defconfig b/configs/P4080DS_SPIFLASH_defconfig
index ae2e13a..0addc13 100644
--- a/configs/P4080DS_SPIFLASH_defconfig
+++ b/configs/P4080DS_SPIFLASH_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P4080DS_SRIO_PCIE_BOOT_defconfig b/configs/P4080DS_SRIO_PCIE_BOOT_defconfig
index baf548e..25f8894 100644
--- a/configs/P4080DS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P4080DS_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P4080DS_defconfig b/configs/P4080DS_defconfig
index e2b96c3..fa3b249 100644
--- a/configs/P4080DS_defconfig
+++ b/configs/P4080DS_defconfig
@@ -5,7 +5,8 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5020DS_NAND_SECURE_BOOT_defconfig b/configs/P5020DS_NAND_SECURE_BOOT_defconfig
index cb57053..be0a423 100644
--- a/configs/P5020DS_NAND_SECURE_BOOT_defconfig
+++ b/configs/P5020DS_NAND_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,NAND,SECURE_BOOT,SYS_TEXT_BASE=0xFFF40000"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5020DS_NAND_defconfig b/configs/P5020DS_NAND_defconfig
index a9ea36b..dfecf0b 100644
--- a/configs/P5020DS_NAND_defconfig
+++ b/configs/P5020DS_NAND_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5020DS_SDCARD_defconfig b/configs/P5020DS_SDCARD_defconfig
index fb7bda6..6eb7d1d 100644
--- a/configs/P5020DS_SDCARD_defconfig
+++ b/configs/P5020DS_SDCARD_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5020DS_SECURE_BOOT_defconfig b/configs/P5020DS_SECURE_BOOT_defconfig
index 9d9ff67..f278908 100644
--- a/configs/P5020DS_SECURE_BOOT_defconfig
+++ b/configs/P5020DS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5020DS_SPIFLASH_defconfig b/configs/P5020DS_SPIFLASH_defconfig
index bc6c190..0a490aa 100644
--- a/configs/P5020DS_SPIFLASH_defconfig
+++ b/configs/P5020DS_SPIFLASH_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5020DS_SRIO_PCIE_BOOT_defconfig b/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
index a7d32bc..35ef6f7 100644
--- a/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/P5020DS_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5020DS_defconfig b/configs/P5020DS_defconfig
index 00731af..efe03dd 100644
--- a/configs/P5020DS_defconfig
+++ b/configs/P5020DS_defconfig
@@ -5,7 +5,8 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5040DS_NAND_SECURE_BOOT_defconfig b/configs/P5040DS_NAND_SECURE_BOOT_defconfig
index 229cd56..9be0e2f 100644
--- a/configs/P5040DS_NAND_SECURE_BOOT_defconfig
+++ b/configs/P5040DS_NAND_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,NAND,SECURE_BOOT,SYS_TEXT_BASE=0xFFF40000"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5040DS_NAND_defconfig b/configs/P5040DS_NAND_defconfig
index eeff54d..a47d4fa 100644
--- a/configs/P5040DS_NAND_defconfig
+++ b/configs/P5040DS_NAND_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,NAND,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5040DS_SDCARD_defconfig b/configs/P5040DS_SDCARD_defconfig
index 6fafb44..a9e3468 100644
--- a/configs/P5040DS_SDCARD_defconfig
+++ b/configs/P5040DS_SDCARD_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SDCARD,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5040DS_SECURE_BOOT_defconfig b/configs/P5040DS_SECURE_BOOT_defconfig
index 9e35593..5e9523d 100644
--- a/configs/P5040DS_SECURE_BOOT_defconfig
+++ b/configs/P5040DS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5040DS_SPIFLASH_defconfig b/configs/P5040DS_SPIFLASH_defconfig
index 28230ad..8473e7c 100644
--- a/configs/P5040DS_SPIFLASH_defconfig
+++ b/configs/P5040DS_SPIFLASH_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPIFLASH,SYS_TEXT_BASE=0xFFF40000"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/P5040DS_defconfig b/configs/P5040DS_defconfig
index 388c1c0..2f55952 100644
--- a/configs/P5040DS_defconfig
+++ b/configs/P5040DS_defconfig
@@ -5,7 +5,8 @@ CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1023RDB_NAND_defconfig b/configs/T1023RDB_NAND_defconfig
index 28d7e1f..f5a1f1f 100644
--- a/configs/T1023RDB_NAND_defconfig
+++ b/configs/T1023RDB_NAND_defconfig
@@ -9,7 +9,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1023,T1023RDB,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1023RDB_SDCARD_defconfig b/configs/T1023RDB_SDCARD_defconfig
index ce3bc30..1969c33 100644
--- a/configs/T1023RDB_SDCARD_defconfig
+++ b/configs/T1023RDB_SDCARD_defconfig
@@ -9,7 +9,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1023,T1023RDB,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1023RDB_SECURE_BOOT_defconfig b/configs/T1023RDB_SECURE_BOOT_defconfig
index 0030f8d..b4665f2 100644
--- a/configs/T1023RDB_SECURE_BOOT_defconfig
+++ b/configs/T1023RDB_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1023,T1023RDB,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1023RDB_SPIFLASH_defconfig b/configs/T1023RDB_SPIFLASH_defconfig
index 7b9c518..a5f0afb 100644
--- a/configs/T1023RDB_SPIFLASH_defconfig
+++ b/configs/T1023RDB_SPIFLASH_defconfig
@@ -9,7 +9,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1023,T1023RDB,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1023RDB_defconfig b/configs/T1023RDB_defconfig
index d3131cb..d9db1b1 100644
--- a/configs/T1023RDB_defconfig
+++ b/configs/T1023RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1023,T1023RDB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig b/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
index c4b2f1a..00672f7 100644
--- a/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
+++ b/configs/T1024QDS_DDR4_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,SYS_FSL_DDR4,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1024QDS_DDR4_defconfig b/configs/T1024QDS_DDR4_defconfig
index 7a7cf65..489f817 100644
--- a/configs/T1024QDS_DDR4_defconfig
+++ b/configs/T1024QDS_DDR4_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1024QDS_NAND_defconfig b/configs/T1024QDS_NAND_defconfig
index 308e009..cb842e8 100644
--- a/configs/T1024QDS_NAND_defconfig
+++ b/configs/T1024QDS_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1024QDS_SDCARD_defconfig b/configs/T1024QDS_SDCARD_defconfig
index c12abf4..37eca91 100644
--- a/configs/T1024QDS_SDCARD_defconfig
+++ b/configs/T1024QDS_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1024QDS_SECURE_BOOT_defconfig b/configs/T1024QDS_SECURE_BOOT_defconfig
index bd96807..20b3807 100644
--- a/configs/T1024QDS_SECURE_BOOT_defconfig
+++ b/configs/T1024QDS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1024QDS_SPIFLASH_defconfig b/configs/T1024QDS_SPIFLASH_defconfig
index 8874033..c1013f4 100644
--- a/configs/T1024QDS_SPIFLASH_defconfig
+++ b/configs/T1024QDS_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1024QDS_defconfig b/configs/T1024QDS_defconfig
index 42b9552..abc12dc 100644
--- a/configs/T1024QDS_defconfig
+++ b/configs/T1024QDS_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1024RDB_NAND_defconfig b/configs/T1024RDB_NAND_defconfig
index e2e9373..b6065fd 100644
--- a/configs/T1024RDB_NAND_defconfig
+++ b/configs/T1024RDB_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,T1024RDB,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1024RDB_SDCARD_defconfig b/configs/T1024RDB_SDCARD_defconfig
index c68982c..3b3ef9b 100644
--- a/configs/T1024RDB_SDCARD_defconfig
+++ b/configs/T1024RDB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,T1024RDB,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1024RDB_SECURE_BOOT_defconfig b/configs/T1024RDB_SECURE_BOOT_defconfig
index 9f29bbf..d5290dc 100644
--- a/configs/T1024RDB_SECURE_BOOT_defconfig
+++ b/configs/T1024RDB_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,T1024RDB,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1024RDB_SPIFLASH_defconfig b/configs/T1024RDB_SPIFLASH_defconfig
index 712eec4..5b2ee8e 100644
--- a/configs/T1024RDB_SPIFLASH_defconfig
+++ b/configs/T1024RDB_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,T1024RDB,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1024RDB_defconfig b/configs/T1024RDB_defconfig
index b1f5549..8ec8535 100644
--- a/configs/T1024RDB_defconfig
+++ b/configs/T1024RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1024,T1024RDB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040D4RDB_NAND_defconfig b/configs/T1040D4RDB_NAND_defconfig
index b2fe48a..abf98ae 100644
--- a/configs/T1040D4RDB_NAND_defconfig
+++ b/configs/T1040D4RDB_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040D4RDB,RAMBOOT_PBL,SPL_FSL_PBL,NAND,T104XD4RDB,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040D4RDB_SDCARD_defconfig b/configs/T1040D4RDB_SDCARD_defconfig
index f93b541..dd47735 100644
--- a/configs/T1040D4RDB_SDCARD_defconfig
+++ b/configs/T1040D4RDB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040D4RDB,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD,T104XD4RDB,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040D4RDB_SECURE_BOOT_defconfig b/configs/T1040D4RDB_SECURE_BOOT_defconfig
index 1e1c5cc..8604192 100644
--- a/configs/T1040D4RDB_SECURE_BOOT_defconfig
+++ b/configs/T1040D4RDB_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040D4RDB,T104XD4RDB,SYS_FSL_DDR4,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040D4RDB_SPIFLASH_defconfig b/configs/T1040D4RDB_SPIFLASH_defconfig
index ee68bf7..a1e682f 100644
--- a/configs/T1040D4RDB_SPIFLASH_defconfig
+++ b/configs/T1040D4RDB_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040D4RDB,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH,T104XD4RDB,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040D4RDB_defconfig b/configs/T1040D4RDB_defconfig
index 744e37d..afe7a0c 100644
--- a/configs/T1040D4RDB_defconfig
+++ b/configs/T1040D4RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040D4RDB,T104XD4RDB,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040QDS_DDR4_defconfig b/configs/T1040QDS_DDR4_defconfig
index 6a4332a..c93a65f 100644
--- a/configs/T1040QDS_DDR4_defconfig
+++ b/configs/T1040QDS_DDR4_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1040QDS_SECURE_BOOT_defconfig b/configs/T1040QDS_SECURE_BOOT_defconfig
index 46fed6d..423a141 100644
--- a/configs/T1040QDS_SECURE_BOOT_defconfig
+++ b/configs/T1040QDS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1040QDS_defconfig b/configs/T1040QDS_defconfig
index 5b1ddb6..bca4631 100644
--- a/configs/T1040QDS_defconfig
+++ b/configs/T1040QDS_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T1040RDB_NAND_defconfig b/configs/T1040RDB_NAND_defconfig
index 7198bb2..92ec845 100644
--- a/configs/T1040RDB_NAND_defconfig
+++ b/configs/T1040RDB_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040RDB,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040RDB_SDCARD_defconfig b/configs/T1040RDB_SDCARD_defconfig
index a60420b..b8359f1 100644
--- a/configs/T1040RDB_SDCARD_defconfig
+++ b/configs/T1040RDB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040RDB,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040RDB_SECURE_BOOT_defconfig b/configs/T1040RDB_SECURE_BOOT_defconfig
index 7bc8872..c2f06ae 100644
--- a/configs/T1040RDB_SECURE_BOOT_defconfig
+++ b/configs/T1040RDB_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,SECURE_BOOT,T1040RDB"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040RDB_SPIFLASH_defconfig b/configs/T1040RDB_SPIFLASH_defconfig
index 3492c83..99d9f53 100644
--- a/configs/T1040RDB_SPIFLASH_defconfig
+++ b/configs/T1040RDB_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040RDB,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1040RDB_defconfig b/configs/T1040RDB_defconfig
index 17cdce3..ef09e28 100644
--- a/configs/T1040RDB_defconfig
+++ b/configs/T1040RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1040,T1040RDB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042D4RDB_NAND_defconfig b/configs/T1042D4RDB_NAND_defconfig
index 99e6723..91edfaa 100644
--- a/configs/T1042D4RDB_NAND_defconfig
+++ b/configs/T1042D4RDB_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042D4RDB,RAMBOOT_PBL,SPL_FSL_PBL,NAND,T104XD4RDB,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042D4RDB_SDCARD_defconfig b/configs/T1042D4RDB_SDCARD_defconfig
index 9101b9b..f4e9957 100644
--- a/configs/T1042D4RDB_SDCARD_defconfig
+++ b/configs/T1042D4RDB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042D4RDB,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD,T104XD4RDB,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042D4RDB_SECURE_BOOT_defconfig b/configs/T1042D4RDB_SECURE_BOOT_defconfig
index 9764c1d..d12e35c 100644
--- a/configs/T1042D4RDB_SECURE_BOOT_defconfig
+++ b/configs/T1042D4RDB_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042D4RDB,T104XD4RDB,SYS_FSL_DDR4,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042D4RDB_SPIFLASH_defconfig b/configs/T1042D4RDB_SPIFLASH_defconfig
index 1d1799b..5644b7e 100644
--- a/configs/T1042D4RDB_SPIFLASH_defconfig
+++ b/configs/T1042D4RDB_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042D4RDB,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH,T104XD4RDB,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042D4RDB_defconfig b/configs/T1042D4RDB_defconfig
index 56f9f4e..5e0c620 100644
--- a/configs/T1042D4RDB_defconfig
+++ b/configs/T1042D4RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042D4RDB,T104XD4RDB,SYS_FSL_DDR4"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042RDB_PI_NAND_defconfig b/configs/T1042RDB_PI_NAND_defconfig
index f079ccb..195842e 100644
--- a/configs/T1042RDB_PI_NAND_defconfig
+++ b/configs/T1042RDB_PI_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042RDB_PI,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042RDB_PI_SDCARD_defconfig b/configs/T1042RDB_PI_SDCARD_defconfig
index b78eb28..65c21c4 100644
--- a/configs/T1042RDB_PI_SDCARD_defconfig
+++ b/configs/T1042RDB_PI_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042RDB_PI,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042RDB_PI_SPIFLASH_defconfig b/configs/T1042RDB_PI_SPIFLASH_defconfig
index 11df100..946cab2 100644
--- a/configs/T1042RDB_PI_SPIFLASH_defconfig
+++ b/configs/T1042RDB_PI_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042RDB_PI,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042RDB_PI_defconfig b/configs/T1042RDB_PI_defconfig
index dd4a2cc..4df3280 100644
--- a/configs/T1042RDB_PI_defconfig
+++ b/configs/T1042RDB_PI_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042RDB_PI"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042RDB_SECURE_BOOT_defconfig b/configs/T1042RDB_SECURE_BOOT_defconfig
index 65d51c7..ccfe987 100644
--- a/configs/T1042RDB_SECURE_BOOT_defconfig
+++ b/configs/T1042RDB_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,SECURE_BOOT,T1042RDB"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T1042RDB_defconfig b/configs/T1042RDB_defconfig
index 421ebd6..0b3fea6 100644
--- a/configs/T1042RDB_defconfig
+++ b/configs/T1042RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T1042,T1042RDB"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T2080QDS_NAND_defconfig b/configs/T2080QDS_NAND_defconfig
index 55463a6..6217718 100644
--- a/configs/T2080QDS_NAND_defconfig
+++ b/configs/T2080QDS_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2080QDS_SDCARD_defconfig b/configs/T2080QDS_SDCARD_defconfig
index 4074a65..2bc2127 100644
--- a/configs/T2080QDS_SDCARD_defconfig
+++ b/configs/T2080QDS_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2080QDS_SECURE_BOOT_defconfig b/configs/T2080QDS_SECURE_BOOT_defconfig
index 7beaad7..ac8077d 100644
--- a/configs/T2080QDS_SECURE_BOOT_defconfig
+++ b/configs/T2080QDS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2080QDS_SPIFLASH_defconfig b/configs/T2080QDS_SPIFLASH_defconfig
index 7c7b131..8510f37 100644
--- a/configs/T2080QDS_SPIFLASH_defconfig
+++ b/configs/T2080QDS_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
index e30048a..e37bc35 100644
--- a/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080QDS_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2080QDS_defconfig b/configs/T2080QDS_defconfig
index a2236e1..e0c8029 100644
--- a/configs/T2080QDS_defconfig
+++ b/configs/T2080QDS_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2080RDB_NAND_defconfig b/configs/T2080RDB_NAND_defconfig
index 9753814..d735a05 100644
--- a/configs/T2080RDB_NAND_defconfig
+++ b/configs/T2080RDB_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T2080RDB_SDCARD_defconfig b/configs/T2080RDB_SDCARD_defconfig
index 75d33c5..b1c1f04 100644
--- a/configs/T2080RDB_SDCARD_defconfig
+++ b/configs/T2080RDB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T2080RDB_SECURE_BOOT_defconfig b/configs/T2080RDB_SECURE_BOOT_defconfig
index 33f7d5f..c53d889 100644
--- a/configs/T2080RDB_SECURE_BOOT_defconfig
+++ b/configs/T2080RDB_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T2080RDB_SPIFLASH_defconfig b/configs/T2080RDB_SPIFLASH_defconfig
index 07a5b06..1a71146 100644
--- a/configs/T2080RDB_SPIFLASH_defconfig
+++ b/configs/T2080RDB_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
index c1549c1..558f6d3 100644
--- a/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2080RDB_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T2080RDB_defconfig b/configs/T2080RDB_defconfig
index ab5453c..1179909 100644
--- a/configs/T2080RDB_defconfig
+++ b/configs/T2080RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2080"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T2081QDS_NAND_defconfig b/configs/T2081QDS_NAND_defconfig
index 6275d27..244a295 100644
--- a/configs/T2081QDS_NAND_defconfig
+++ b/configs/T2081QDS_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2081,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2081QDS_SDCARD_defconfig b/configs/T2081QDS_SDCARD_defconfig
index 9c805d0..9b784f6 100644
--- a/configs/T2081QDS_SDCARD_defconfig
+++ b/configs/T2081QDS_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2081,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2081QDS_SPIFLASH_defconfig b/configs/T2081QDS_SPIFLASH_defconfig
index 2cef3ec..3092131 100644
--- a/configs/T2081QDS_SPIFLASH_defconfig
+++ b/configs/T2081QDS_SPIFLASH_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2081,RAMBOOT_PBL,SPL_FSL_PBL,SPIFLASH"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig b/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
index b8bb371..ad86efd 100644
--- a/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T2081QDS_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2081,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T2081QDS_defconfig b/configs/T2081QDS_defconfig
index f8488b6..a67be2d 100644
--- a/configs/T2081QDS_defconfig
+++ b/configs/T2081QDS_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T2081"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/T4160QDS_NAND_defconfig b/configs/T4160QDS_NAND_defconfig
index 255ae58..3c318f9 100644
--- a/configs/T4160QDS_NAND_defconfig
+++ b/configs/T4160QDS_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4160,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4160QDS_SDCARD_defconfig b/configs/T4160QDS_SDCARD_defconfig
index c74aecf..cac5965 100644
--- a/configs/T4160QDS_SDCARD_defconfig
+++ b/configs/T4160QDS_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4160,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4160QDS_SECURE_BOOT_defconfig b/configs/T4160QDS_SECURE_BOOT_defconfig
index f430c34..333fd51 100644
--- a/configs/T4160QDS_SECURE_BOOT_defconfig
+++ b/configs/T4160QDS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4160,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4160QDS_defconfig b/configs/T4160QDS_defconfig
index 191370f..2fa2fe8 100644
--- a/configs/T4160QDS_defconfig
+++ b/configs/T4160QDS_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4160"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4160RDB_defconfig b/configs/T4160RDB_defconfig
index 1ffecc3..63b1c6d 100644
--- a/configs/T4160RDB_defconfig
+++ b/configs/T4160RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4160"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4240QDS_NAND_defconfig b/configs/T4240QDS_NAND_defconfig
index 8bd2174..4d138ec 100644
--- a/configs/T4240QDS_NAND_defconfig
+++ b/configs/T4240QDS_NAND_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4240,RAMBOOT_PBL,SPL_FSL_PBL,NAND"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4240QDS_SDCARD_defconfig b/configs/T4240QDS_SDCARD_defconfig
index fa4f1dd..be19d3b 100644
--- a/configs/T4240QDS_SDCARD_defconfig
+++ b/configs/T4240QDS_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4240,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4240QDS_SECURE_BOOT_defconfig b/configs/T4240QDS_SECURE_BOOT_defconfig
index 2737244..21efc1e 100644
--- a/configs/T4240QDS_SECURE_BOOT_defconfig
+++ b/configs/T4240QDS_SECURE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4240,SECURE_BOOT"
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig b/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
index 10513aa..13b2b36 100644
--- a/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
+++ b/configs/T4240QDS_SRIO_PCIE_BOOT_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4240,SRIO_PCIE_BOOT_SLAVE,SYS_TEXT_BASE=0xFFF40000"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4240QDS_defconfig b/configs/T4240QDS_defconfig
index a6525aa..c02e534 100644
--- a/configs/T4240QDS_defconfig
+++ b/configs/T4240QDS_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4240"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4240RDB_SDCARD_defconfig b/configs/T4240RDB_SDCARD_defconfig
index a124477..073f049 100644
--- a/configs/T4240RDB_SDCARD_defconfig
+++ b/configs/T4240RDB_SDCARD_defconfig
@@ -7,7 +7,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4240,RAMBOOT_PBL,SPL_FSL_PBL,SDCARD"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/T4240RDB_defconfig b/configs/T4240RDB_defconfig
index fc622c9..3dcdf6b 100644
--- a/configs/T4240RDB_defconfig
+++ b/configs/T4240RDB_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT_VERBOSE=y
 CONFIG_OF_BOARD_SETUP=y
 CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="PPC_T4240"
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/UCP1020_SPIFLASH_defconfig b/configs/UCP1020_SPIFLASH_defconfig
index 52750f4..6ce3d41 100644
--- a/configs/UCP1020_SPIFLASH_defconfig
+++ b/configs/UCP1020_SPIFLASH_defconfig
@@ -10,7 +10,8 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc>\" to stop\n"
 CONFIG_AUTOBOOT_STOP_STR="\x1b"
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/UCP1020_defconfig b/configs/UCP1020_defconfig
index 0633752..69a3391 100644
--- a/configs/UCP1020_defconfig
+++ b/configs/UCP1020_defconfig
@@ -10,7 +10,8 @@ CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Autobooting in %d seconds, press \"<Esc>\" to stop\n"
 CONFIG_AUTOBOOT_STOP_STR="\x1b"
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/alt_defconfig b/configs/alt_defconfig
index 4ea33ef..72ba038 100644
--- a/configs/alt_defconfig
+++ b/configs/alt_defconfig
@@ -17,7 +17,8 @@ CONFIG_TARGET_ALT=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
 CONFIG_SH_SDHI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_boneblack_defconfig b/configs/am335x_boneblack_defconfig
index 4ba2579..269c06c 100644
--- a/configs/am335x_boneblack_defconfig
+++ b/configs/am335x_boneblack_defconfig
@@ -14,7 +14,8 @@ CONFIG_AUTOBOOT_STOP_STR=" "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_DFU_TFTP=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_boneblack_vboot_defconfig b/configs/am335x_boneblack_vboot_defconfig
index 060aa1c..7d0ab0b 100644
--- a/configs/am335x_boneblack_vboot_defconfig
+++ b/configs/am335x_boneblack_vboot_defconfig
@@ -18,7 +18,8 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_ETH=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig
index 836950c..5b1ac34 100644
--- a/configs/am335x_evm_defconfig
+++ b/configs/am335x_evm_defconfig
@@ -13,7 +13,8 @@ CONFIG_AUTOBOOT_STOP_STR=" "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_evm_nor_defconfig b/configs/am335x_evm_nor_defconfig
index f336dfd..fcf5bca 100644
--- a/configs/am335x_evm_nor_defconfig
+++ b/configs/am335x_evm_nor_defconfig
@@ -9,7 +9,8 @@ CONFIG_SYS_EXTRA_OPTIONS="NAND"
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_evm_norboot_defconfig b/configs/am335x_evm_norboot_defconfig
index 707014b..e69754f 100644
--- a/configs/am335x_evm_norboot_defconfig
+++ b/configs/am335x_evm_norboot_defconfig
@@ -6,7 +6,8 @@ CONFIG_FIT=y
 # CONFIG_CMD_IMLS is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_evm_spiboot_defconfig b/configs/am335x_evm_spiboot_defconfig
index 665dad3..48c7724 100644
--- a/configs/am335x_evm_spiboot_defconfig
+++ b/configs/am335x_evm_spiboot_defconfig
@@ -9,7 +9,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SPI_BOOT"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_evm_usbspl_defconfig b/configs/am335x_evm_usbspl_defconfig
index 17370bb..6b64ea8 100644
--- a/configs/am335x_evm_usbspl_defconfig
+++ b/configs/am335x_evm_usbspl_defconfig
@@ -9,7 +9,8 @@ CONFIG_SYS_EXTRA_OPTIONS="NAND,SPL_USBETH_SUPPORT"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/am335x_gp_evm_defconfig b/configs/am335x_gp_evm_defconfig
index 7f12972..e2269d4 100644
--- a/configs/am335x_gp_evm_defconfig
+++ b/configs/am335x_gp_evm_defconfig
@@ -12,7 +12,8 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_ETH=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/am437x_gp_evm_defconfig b/configs/am437x_gp_evm_defconfig
index 1d79ba19..e68c752 100644
--- a/configs/am437x_gp_evm_defconfig
+++ b/configs/am437x_gp_evm_defconfig
@@ -14,7 +14,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
diff --git a/configs/am437x_sk_evm_defconfig b/configs/am437x_sk_evm_defconfig
index 149a028..08d006b 100644
--- a/configs/am437x_sk_evm_defconfig
+++ b/configs/am437x_sk_evm_defconfig
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_TARGET_AM43XX_EVM=y
 CONFIG_DM_SERIAL=y
 CONFIG_DM_SPI=y
-CONFIG_DM_SPI_FLASH=y
+CONFIG_MTD=y
 CONFIG_DM_GPIO=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="am437x-sk-evm"
@@ -16,7 +16,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/am43xx_evm_defconfig b/configs/am43xx_evm_defconfig
index 8ef28f3..a8b84e4 100644
--- a/configs/am43xx_evm_defconfig
+++ b/configs/am43xx_evm_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/am43xx_evm_ethboot_defconfig b/configs/am43xx_evm_ethboot_defconfig
index 7143597..cd07549 100644
--- a/configs/am43xx_evm_ethboot_defconfig
+++ b/configs/am43xx_evm_ethboot_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,SPL_ETH_SUPPORT"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
diff --git a/configs/am43xx_evm_qspiboot_defconfig b/configs/am43xx_evm_qspiboot_defconfig
index a9a862b..27a9f9f 100644
--- a/configs/am43xx_evm_qspiboot_defconfig
+++ b/configs/am43xx_evm_qspiboot_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,QSPI,QSPI_BOOT"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
diff --git a/configs/am43xx_evm_usbhost_boot_defconfig b/configs/am43xx_evm_usbhost_boot_defconfig
index 2c73dbe..ed2afe0 100644
--- a/configs/am43xx_evm_usbhost_boot_defconfig
+++ b/configs/am43xx_evm_usbhost_boot_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1,NAND,SPL_USB_HOST_SUPPORT"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig
index 1090287..824107c 100644
--- a/configs/am57xx_evm_defconfig
+++ b/configs/am57xx_evm_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_GPIO=y
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/aristainetos2_defconfig b/configs/aristainetos2_defconfig
index 7e2c026..1fbadd7 100644
--- a/configs/aristainetos2_defconfig
+++ b/configs/aristainetos2_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg,MX6DL"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/aristainetos2b_defconfig b/configs/aristainetos2b_defconfig
index 88670df..11bd14f 100644
--- a/configs/aristainetos2b_defconfig
+++ b/configs/aristainetos2b_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos2.cfg,MX6DL"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/aristainetos_defconfig b/configs/aristainetos_defconfig
index e808c21..3248a62 100644
--- a/configs/aristainetos_defconfig
+++ b/configs/aristainetos_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/aristainetos/aristainetos.cfg,MX6DL"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9n12ek_mmc_defconfig b/configs/at91sam9n12ek_mmc_defconfig
index 6f45120..9322456 100644
--- a/configs/at91sam9n12ek_mmc_defconfig
+++ b/configs/at91sam9n12ek_mmc_defconfig
@@ -7,6 +7,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9n12ek_nandflash_defconfig b/configs/at91sam9n12ek_nandflash_defconfig
index df099b2..17ebed6 100644
--- a/configs/at91sam9n12ek_nandflash_defconfig
+++ b/configs/at91sam9n12ek_nandflash_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9n12ek_spiflash_defconfig b/configs/at91sam9n12ek_spiflash_defconfig
index 20cf592..323d7b7 100644
--- a/configs/at91sam9n12ek_spiflash_defconfig
+++ b/configs/at91sam9n12ek_spiflash_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9x5ek_dataflash_defconfig b/configs/at91sam9x5ek_dataflash_defconfig
index b6154da..14a2a20 100644
--- a/configs/at91sam9x5ek_dataflash_defconfig
+++ b/configs/at91sam9x5ek_dataflash_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9x5ek_mmc_defconfig b/configs/at91sam9x5ek_mmc_defconfig
index b782e25..5cc56ea 100644
--- a/configs/at91sam9x5ek_mmc_defconfig
+++ b/configs/at91sam9x5ek_mmc_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9x5ek_nandflash_defconfig b/configs/at91sam9x5ek_nandflash_defconfig
index 66be263..0ce027b 100644
--- a/configs/at91sam9x5ek_nandflash_defconfig
+++ b/configs/at91sam9x5ek_nandflash_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/at91sam9x5ek_spiflash_defconfig b/configs/at91sam9x5ek_spiflash_defconfig
index 0eba857..4c7fa59 100644
--- a/configs/at91sam9x5ek_spiflash_defconfig
+++ b/configs/at91sam9x5ek_spiflash_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/atngw100_defconfig b/configs/atngw100_defconfig
index 7ef4677..56ab790 100644
--- a/configs/atngw100_defconfig
+++ b/configs/atngw100_defconfig
@@ -10,5 +10,6 @@ CONFIG_AUTOBOOT_STOP_STR=" "
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/atngw100mkii_defconfig b/configs/atngw100mkii_defconfig
index b552421..fa6e3f8 100644
--- a/configs/atngw100mkii_defconfig
+++ b/configs/atngw100mkii_defconfig
@@ -9,5 +9,6 @@ CONFIG_AUTOBOOT_STOP_STR=" "
 # CONFIG_CMD_XIMG is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/axm_defconfig b/configs/axm_defconfig
index 65c13eb..bf68562 100644
--- a/configs/axm_defconfig
+++ b/configs/axm_defconfig
@@ -10,7 +10,8 @@ CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9G20,MACH_TYPE=2068,BOARD_AXM"
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/bayleybay_defconfig b/configs/bayleybay_defconfig
index dfafb0b..27dce42 100644
--- a/configs/bayleybay_defconfig
+++ b/configs/bayleybay_defconfig
@@ -23,7 +23,8 @@ CONFIG_OF_CONTROL=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CPU=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/beaver_defconfig b/configs/beaver_defconfig
index fcfbf65..3d5bf5d 100644
--- a/configs/beaver_defconfig
+++ b/configs/beaver_defconfig
@@ -13,7 +13,8 @@ CONFIG_SYS_PROMPT="Tegra30 (Beaver) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/bf518f-ezbrd_defconfig b/configs/bf518f-ezbrd_defconfig
index a8eab8c..a211b44 100644
--- a/configs/bf518f-ezbrd_defconfig
+++ b/configs/bf518f-ezbrd_defconfig
@@ -3,7 +3,8 @@ CONFIG_TARGET_BF518F_EZBRD=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/bf525-ucr2_defconfig b/configs/bf525-ucr2_defconfig
index 15a8f1f..416ffc0 100644
--- a/configs/bf525-ucr2_defconfig
+++ b/configs/bf525-ucr2_defconfig
@@ -5,5 +5,6 @@ CONFIG_TARGET_BF525_UCR2=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_EON=y
diff --git a/configs/bf526-ezbrd_defconfig b/configs/bf526-ezbrd_defconfig
index a5f4b73..cf608cd 100644
--- a/configs/bf526-ezbrd_defconfig
+++ b/configs/bf526-ezbrd_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_BF526_EZBRD=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/bf527-ad7160-eval_defconfig b/configs/bf527-ad7160-eval_defconfig
index 4751df4..7aaf740 100644
--- a/configs/bf527-ad7160-eval_defconfig
+++ b/configs/bf527-ad7160-eval_defconfig
@@ -5,6 +5,7 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/bf527-ezkit-v2_defconfig b/configs/bf527-ezkit-v2_defconfig
index 356ab64..ef8ae9e 100644
--- a/configs/bf527-ezkit-v2_defconfig
+++ b/configs/bf527-ezkit-v2_defconfig
@@ -3,6 +3,7 @@ CONFIG_TARGET_BF527_EZKIT=y
 CONFIG_SYS_EXTRA_OPTIONS="BF527_EZKIT_REV_2_1"
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_LIB_RAND=y
diff --git a/configs/bf527-ezkit_defconfig b/configs/bf527-ezkit_defconfig
index c1b139c..478e21a 100644
--- a/configs/bf527-ezkit_defconfig
+++ b/configs/bf527-ezkit_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_BF527_EZKIT=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 # CONFIG_NET_TFTP_VARS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/bf527-sdp_defconfig b/configs/bf527-sdp_defconfig
index 383f62e..34ee175 100644
--- a/configs/bf527-sdp_defconfig
+++ b/configs/bf527-sdp_defconfig
@@ -5,7 +5,8 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/bf537-minotaur_defconfig b/configs/bf537-minotaur_defconfig
index bf3d79f..4ce5aed 100644
--- a/configs/bf537-minotaur_defconfig
+++ b/configs/bf537-minotaur_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_PROMPT="minotaur> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/bf537-pnav_defconfig b/configs/bf537-pnav_defconfig
index e737561..3df58d7 100644
--- a/configs/bf537-pnav_defconfig
+++ b/configs/bf537-pnav_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_BF537_PNAV=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/bf537-srv1_defconfig b/configs/bf537-srv1_defconfig
index ba80e63..580bc83 100644
--- a/configs/bf537-srv1_defconfig
+++ b/configs/bf537-srv1_defconfig
@@ -5,5 +5,6 @@ CONFIG_SYS_PROMPT="srv1> "
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/bf537-stamp_defconfig b/configs/bf537-stamp_defconfig
index 34c774c..2e21cc5 100644
--- a/configs/bf537-stamp_defconfig
+++ b/configs/bf537-stamp_defconfig
@@ -3,7 +3,8 @@ CONFIG_TARGET_BF537_STAMP=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/bf548-ezkit_defconfig b/configs/bf548-ezkit_defconfig
index eca4c85..d0b96ff 100644
--- a/configs/bf548-ezkit_defconfig
+++ b/configs/bf548-ezkit_defconfig
@@ -2,7 +2,8 @@ CONFIG_BLACKFIN=y
 CONFIG_TARGET_BF548_EZKIT=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
 CONFIG_LIB_RAND=y
diff --git a/configs/bf561-acvilon_defconfig b/configs/bf561-acvilon_defconfig
index 4a25d2e..171de78 100644
--- a/configs/bf561-acvilon_defconfig
+++ b/configs/bf561-acvilon_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_PROMPT="Acvilon> "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
 CONFIG_LIB_RAND=y
diff --git a/configs/bf609-ezkit_defconfig b/configs/bf609-ezkit_defconfig
index 642ca87..f050eff 100644
--- a/configs/bf609-ezkit_defconfig
+++ b/configs/bf609-ezkit_defconfig
@@ -2,7 +2,8 @@ CONFIG_BLACKFIN=y
 CONFIG_TARGET_BF609_EZKIT=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_MACRONIX=y
diff --git a/configs/bg0900_defconfig b/configs/bg0900_defconfig
index c11617a..60d2a53 100644
--- a/configs/bg0900_defconfig
+++ b/configs/bg0900_defconfig
@@ -4,7 +4,8 @@ CONFIG_SPL=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/birdland_bav335a_defconfig b/configs/birdland_bav335a_defconfig
index 6d7c20d..db8a573 100644
--- a/configs/birdland_bav335a_defconfig
+++ b/configs/birdland_bav335a_defconfig
@@ -8,7 +8,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/birdland_bav335b_defconfig b/configs/birdland_bav335b_defconfig
index 910ddc7..9ea3a87 100644
--- a/configs/birdland_bav335b_defconfig
+++ b/configs/birdland_bav335b_defconfig
@@ -8,7 +8,8 @@ CONFIG_SYS_EXTRA_OPTIONS="SERIAL1,CONS_INDEX=1"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/blackstamp_defconfig b/configs/blackstamp_defconfig
index 944145a..0a2bd94 100644
--- a/configs/blackstamp_defconfig
+++ b/configs/blackstamp_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_BLACKSTAMP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/blackvme_defconfig b/configs/blackvme_defconfig
index 41b5a23..e941e42 100644
--- a/configs/blackvme_defconfig
+++ b/configs/blackvme_defconfig
@@ -3,5 +3,6 @@ CONFIG_TARGET_BLACKVME=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/br4_defconfig b/configs/br4_defconfig
index effba78..ae39cbb 100644
--- a/configs/br4_defconfig
+++ b/configs/br4_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_PROMPT="br4>"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
 CONFIG_LIB_RAND=y
diff --git a/configs/cardhu_defconfig b/configs/cardhu_defconfig
index 808e0e2..229dcbe 100644
--- a/configs/cardhu_defconfig
+++ b/configs/cardhu_defconfig
@@ -13,7 +13,8 @@ CONFIG_SYS_PROMPT="Tegra30 (Cardhu) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/cgtqmx6eval_defconfig b/configs/cgtqmx6eval_defconfig
index 8fc8e64..a59ab7f 100644
--- a/configs/cgtqmx6eval_defconfig
+++ b/configs/cgtqmx6eval_defconfig
@@ -9,3 +9,5 @@ CONFIG_SYS_PROMPT="CGT-QMX6-Quad U-Boot > "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_LIBFDT=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index 4c72035..7930899 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -63,3 +63,5 @@ CONFIG_USE_PRIVATE_LIBGCC=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/chromebook_link_defconfig b/configs/chromebook_link_defconfig
index 8a39740..6ddfb47 100644
--- a/configs/chromebook_link_defconfig
+++ b/configs/chromebook_link_defconfig
@@ -28,7 +28,8 @@ CONFIG_SYS_I2C_INTEL=y
 CONFIG_CMD_CROS_EC=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_LPC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/chromebook_samus_defconfig b/configs/chromebook_samus_defconfig
index 448446d..f74d76a 100644
--- a/configs/chromebook_samus_defconfig
+++ b/configs/chromebook_samus_defconfig
@@ -27,7 +27,8 @@ CONFIG_INTEL_BROADWELL_GPIO=y
 CONFIG_CMD_CROS_EC=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_LPC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/chromebox_panther_defconfig b/configs/chromebox_panther_defconfig
index 3b32e51..ccbf42d 100644
--- a/configs/chromebox_panther_defconfig
+++ b/configs/chromebox_panther_defconfig
@@ -22,7 +22,8 @@ CONFIG_SYSCON=y
 CONFIG_CMD_CROS_EC=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_LPC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/clearfog_defconfig b/configs/clearfog_defconfig
index 57d6a64..5d7b7fd 100644
--- a/configs/clearfog_defconfig
+++ b/configs/clearfog_defconfig
@@ -9,7 +9,8 @@ CONFIG_SPL=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_DEBUG_UART=y
 CONFIG_DEBUG_UART_BASE=0xd0012000
 CONFIG_DEBUG_UART_CLOCK=250000000
diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig
index c37442d..65c926e 100644
--- a/configs/cm_fx6_defconfig
+++ b/configs/cm_fx6_defconfig
@@ -18,7 +18,8 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_SPI_FLASH_EON=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
diff --git a/configs/cm_t43_defconfig b/configs/cm_t43_defconfig
index 28a96fb..7f4b247 100644
--- a/configs/cm_t43_defconfig
+++ b/configs/cm_t43_defconfig
@@ -13,7 +13,8 @@ CONFIG_DM=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
 CONFIG_DM_SERIAL=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/conga-qeval20-qa3-e3845_defconfig b/configs/conga-qeval20-qa3-e3845_defconfig
index 24a927d..65c11f3 100644
--- a/configs/conga-qeval20-qa3-e3845_defconfig
+++ b/configs/conga-qeval20-qa3-e3845_defconfig
@@ -24,7 +24,8 @@ CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CPU=y
 CONFIG_WINBOND_W83627=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig b/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
index b46f4cc..eed6771 100644
--- a/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
+++ b/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
@@ -10,7 +10,8 @@ CONFIG_SYS_EXTRA_OPTIONS="36BIT,SDCARD,DEVELOP"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_TPM=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
diff --git a/configs/controlcenterd_36BIT_SDCARD_defconfig b/configs/controlcenterd_36BIT_SDCARD_defconfig
index 25eb520..0af8739 100644
--- a/configs/controlcenterd_36BIT_SDCARD_defconfig
+++ b/configs/controlcenterd_36BIT_SDCARD_defconfig
@@ -10,7 +10,8 @@ CONFIG_SYS_EXTRA_OPTIONS="36BIT,SDCARD"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_TPM=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_FSL_ESPI=y
diff --git a/configs/coreboot-x86_defconfig b/configs/coreboot-x86_defconfig
index a1c7df7..1d39b9e 100644
--- a/configs/coreboot-x86_defconfig
+++ b/configs/coreboot-x86_defconfig
@@ -12,7 +12,8 @@ CONFIG_CMD_BOOTSTAGE=y
 CONFIG_CMD_TPM=y
 CONFIG_CMD_TPM_TEST=y
 CONFIG_OF_CONTROL=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/cougarcanyon2_defconfig b/configs/cougarcanyon2_defconfig
index 71028cf..d9992c2 100644
--- a/configs/cougarcanyon2_defconfig
+++ b/configs/cougarcanyon2_defconfig
@@ -10,7 +10,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_OF_CONTROL=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_PCI=y
 CONFIG_DM_RTC=y
diff --git a/configs/crownbay_defconfig b/configs/crownbay_defconfig
index b4e1876..3209d44 100644
--- a/configs/crownbay_defconfig
+++ b/configs/crownbay_defconfig
@@ -21,7 +21,8 @@ CONFIG_OF_CONTROL=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CPU=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/d2net_v2_defconfig b/configs/d2net_v2_defconfig
index b2d2aeb..42976f4 100644
--- a/configs/d2net_v2_defconfig
+++ b/configs/d2net_v2_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="D2NET_V2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/da850_am18xxevm_defconfig b/configs/da850_am18xxevm_defconfig
index 870186c..84e5571 100644
--- a/configs/da850_am18xxevm_defconfig
+++ b/configs/da850_am18xxevm_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="DA850_AM18X_EVM,MAC_ADDR_IN_EEPROM,SYS_I2C_EEPROM_ADDR
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/da850evm_defconfig b/configs/da850evm_defconfig
index 6d7f984..feafcf3 100644
--- a/configs/da850evm_defconfig
+++ b/configs/da850evm_defconfig
@@ -7,7 +7,8 @@ CONFIG_SYS_PROMPT="U-Boot > "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/da850evm_direct_nor_defconfig b/configs/da850evm_direct_nor_defconfig
index 7aba5c4..7d68722 100644
--- a/configs/da850evm_direct_nor_defconfig
+++ b/configs/da850evm_direct_nor_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_DA850EVM=y
 CONFIG_SYS_EXTRA_OPTIONS="MAC_ADDR_IN_SPIFLASH,USE_NOR,DIRECT_NOR_BOOT"
 CONFIG_SYS_PROMPT="U-Boot > "
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/dalmore_defconfig b/configs/dalmore_defconfig
index 15bd9f1..727eb96 100644
--- a/configs/dalmore_defconfig
+++ b/configs/dalmore_defconfig
@@ -13,7 +13,8 @@ CONFIG_SYS_PROMPT="Tegra114 (Dalmore) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
diff --git a/configs/db-88f6820-gp_defconfig b/configs/db-88f6820-gp_defconfig
index 111f3a1..2c474c9 100644
--- a/configs/db-88f6820-gp_defconfig
+++ b/configs/db-88f6820-gp_defconfig
@@ -9,7 +9,8 @@ CONFIG_SPL=y
 CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DEBUG_UART=y
diff --git a/configs/db-mv784mp-gp_defconfig b/configs/db-mv784mp-gp_defconfig
index 6dda2ae..5f9bc78 100644
--- a/configs/db-mv784mp-gp_defconfig
+++ b/configs/db-mv784mp-gp_defconfig
@@ -11,7 +11,8 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SPL_OF_TRANSLATE=y
 CONFIG_NAND_PXA3XX=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DEBUG_UART=y
diff --git a/configs/dra72_evm_defconfig b/configs/dra72_evm_defconfig
index 0a5f70b..4b9ced4 100644
--- a/configs/dra72_evm_defconfig
+++ b/configs/dra72_evm_defconfig
@@ -4,7 +4,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_TARGET_DRA7XX_EVM=y
 CONFIG_DM_SERIAL=y
 CONFIG_DM_SPI=y
-CONFIG_DM_SPI_FLASH=y
+CONFIG_MTD=y
 CONFIG_DM_GPIO=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="dra72-evm"
@@ -16,7 +16,8 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/dra74_evm_defconfig b/configs/dra74_evm_defconfig
index 916016d..9c7773a 100644
--- a/configs/dra74_evm_defconfig
+++ b/configs/dra74_evm_defconfig
@@ -3,7 +3,7 @@ CONFIG_OMAP54XX=y
 CONFIG_TARGET_DRA7XX_EVM=y
 CONFIG_DM_SERIAL=y
 CONFIG_DM_SPI=y
-CONFIG_DM_SPI_FLASH=y
+CONFIG_MTD=y
 CONFIG_DM_GPIO=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
@@ -15,7 +15,8 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index 7aaef1b..0c22f7f 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -8,7 +8,9 @@ CONFIG_SPL_STACK_R=y
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+# CONFIG_CMD_NFS is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/dra7xx_evm_qspiboot_defconfig b/configs/dra7xx_evm_qspiboot_defconfig
index 0789cff..76d1de3 100644
--- a/configs/dra7xx_evm_qspiboot_defconfig
+++ b/configs/dra7xx_evm_qspiboot_defconfig
@@ -9,7 +9,9 @@ CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+# CONFIG_CMD_NFS is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
diff --git a/configs/dra7xx_evm_uart3_defconfig b/configs/dra7xx_evm_uart3_defconfig
index 768920b..2369095 100644
--- a/configs/dra7xx_evm_uart3_defconfig
+++ b/configs/dra7xx_evm_uart3_defconfig
@@ -10,7 +10,9 @@ CONFIG_SYS_EXTRA_OPTIONS="SPL_YMODEM_SUPPORT"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+# CONFIG_CMD_NFS is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SYS_NS16550=y
 CONFIG_TI_QSPI=y
diff --git a/configs/draco_defconfig b/configs/draco_defconfig
index 967f2ff..902f645 100644
--- a/configs/draco_defconfig
+++ b/configs/draco_defconfig
@@ -9,7 +9,8 @@ CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/dreamplug_defconfig b/configs/dreamplug_defconfig
index c6b3b53..8cea602 100644
--- a/configs/dreamplug_defconfig
+++ b/configs/dreamplug_defconfig
@@ -9,7 +9,8 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig
index 4c3c1df..f43d358 100644
--- a/configs/ds414_defconfig
+++ b/configs/ds414_defconfig
@@ -8,7 +8,8 @@ CONFIG_SPL=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DEBUG_UART=y
diff --git a/configs/e2220-1170_defconfig b/configs/e2220-1170_defconfig
index 1a7b07d..d490116 100644
--- a/configs/e2220-1170_defconfig
+++ b/configs/e2220-1170_defconfig
@@ -11,7 +11,8 @@ CONFIG_SYS_PROMPT="Tegra210 (E2220-1170) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
diff --git a/configs/ea20_defconfig b/configs/ea20_defconfig
index 6fe19c7..27ef793 100644
--- a/configs/ea20_defconfig
+++ b/configs/ea20_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_PROMPT="ea20 > "
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/ethernut5_defconfig b/configs/ethernut5_defconfig
index 04d8611..b3d4f82 100644
--- a/configs/ethernut5_defconfig
+++ b/configs/ethernut5_defconfig
@@ -6,5 +6,6 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_BDI is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index d27e4a5..1680149 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -55,3 +55,5 @@ CONFIG_USE_PRIVATE_LIBGCC=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/galileo_defconfig b/configs/galileo_defconfig
index 832ac4d..98a6a72 100644
--- a/configs/galileo_defconfig
+++ b/configs/galileo_defconfig
@@ -17,7 +17,8 @@ CONFIG_OF_CONTROL=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/gose_defconfig b/configs/gose_defconfig
index 475bdd1..6158df2 100644
--- a/configs/gose_defconfig
+++ b/configs/gose_defconfig
@@ -17,7 +17,8 @@ CONFIG_TARGET_GOSE=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
 CONFIG_SH_SDHI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/gplugd_defconfig b/configs/gplugd_defconfig
index b7ef262..6406004 100644
--- a/configs/gplugd_defconfig
+++ b/configs/gplugd_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_GPLUGD=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/inetspace_v2_defconfig b/configs/inetspace_v2_defconfig
index 6e49081..a3d98e2 100644
--- a/configs/inetspace_v2_defconfig
+++ b/configs/inetspace_v2_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="INETSPACE_V2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/ip04_defconfig b/configs/ip04_defconfig
index e2aa906..00160eb 100644
--- a/configs/ip04_defconfig
+++ b/configs/ip04_defconfig
@@ -5,7 +5,8 @@ CONFIG_TARGET_IP04=y
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
diff --git a/configs/jetson-tk1_defconfig b/configs/jetson-tk1_defconfig
index c07b278..f6ede45 100644
--- a/configs/jetson-tk1_defconfig
+++ b/configs/jetson-tk1_defconfig
@@ -13,7 +13,8 @@ CONFIG_SYS_PROMPT="Tegra124 (Jetson TK1) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/k2e_evm_defconfig b/configs/k2e_evm_defconfig
index 0949468..1df0600 100644
--- a/configs/k2e_evm_defconfig
+++ b/configs/k2e_evm_defconfig
@@ -11,7 +11,8 @@ CONFIG_SYS_PROMPT="K2E EVM # "
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_ETH=y
diff --git a/configs/k2g_evm_defconfig b/configs/k2g_evm_defconfig
index b721a1c..026f38b 100644
--- a/configs/k2g_evm_defconfig
+++ b/configs/k2g_evm_defconfig
@@ -12,7 +12,8 @@ CONFIG_REMOTEPROC_TI_POWER=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_ETH=y
diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index 579c6b8..1e8767e 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -11,7 +11,8 @@ CONFIG_SYS_PROMPT="K2HK EVM # "
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_ETH=y
diff --git a/configs/k2l_evm_defconfig b/configs/k2l_evm_defconfig
index af1dc2c..cca7df2 100644
--- a/configs/k2l_evm_defconfig
+++ b/configs/k2l_evm_defconfig
@@ -11,7 +11,8 @@ CONFIG_SYS_PROMPT="K2L EVM # "
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_DM_ETH=y
diff --git a/configs/km_kirkwood_128m16_defconfig b/configs/km_kirkwood_128m16_defconfig
index 349651d..1eab5fc 100644
--- a/configs/km_kirkwood_128m16_defconfig
+++ b/configs/km_kirkwood_128m16_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_KIRKWOOD_128M16"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/km_kirkwood_defconfig b/configs/km_kirkwood_defconfig
index 9a0d85c..befd17f 100644
--- a/configs/km_kirkwood_defconfig
+++ b/configs/km_kirkwood_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_KIRKWOOD"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/km_kirkwood_pci_defconfig b/configs/km_kirkwood_pci_defconfig
index d2c488e..3405c24 100644
--- a/configs/km_kirkwood_pci_defconfig
+++ b/configs/km_kirkwood_pci_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_KIRKWOOD_PCI"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmcoge4_defconfig b/configs/kmcoge4_defconfig
index 49e1c9b..60a28c0 100644
--- a/configs/kmcoge4_defconfig
+++ b/configs/kmcoge4_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="KMCOGE4"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
diff --git a/configs/kmcoge5un_defconfig b/configs/kmcoge5un_defconfig
index b390e3e..fec962a 100644
--- a/configs/kmcoge5un_defconfig
+++ b/configs/kmcoge5un_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_COGE5UN"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmlion1_defconfig b/configs/kmlion1_defconfig
index 12d0131..55c4f1c 100644
--- a/configs/kmlion1_defconfig
+++ b/configs/kmlion1_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="KMLION1"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
diff --git a/configs/kmnusa_defconfig b/configs/kmnusa_defconfig
index 3a1aa69..295b2bb 100644
--- a/configs/kmnusa_defconfig
+++ b/configs/kmnusa_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_NUSA"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsugp1_defconfig b/configs/kmsugp1_defconfig
index bc9aaec..e6e3cd0 100644
--- a/configs/kmsugp1_defconfig
+++ b/configs/kmsugp1_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_SUGP1"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kmsuv31_defconfig b/configs/kmsuv31_defconfig
index 0a16c04..33e74ca 100644
--- a/configs/kmsuv31_defconfig
+++ b/configs/kmsuv31_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_SUV31"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/koelsch_defconfig b/configs/koelsch_defconfig
index 24ea181..eb9432c 100644
--- a/configs/koelsch_defconfig
+++ b/configs/koelsch_defconfig
@@ -17,7 +17,8 @@ CONFIG_TARGET_KOELSCH=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
 CONFIG_SH_SDHI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/kylin-rk3036_defconfig b/configs/kylin-rk3036_defconfig
index 2cc9de4..2e18a40 100644
--- a/configs/kylin-rk3036_defconfig
+++ b/configs/kylin-rk3036_defconfig
@@ -22,3 +22,5 @@ CONFIG_RAM=y
 CONFIG_USE_PRIVATE_LIBGCC=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/lager_defconfig b/configs/lager_defconfig
index f042ff7..cf9511f 100644
--- a/configs/lager_defconfig
+++ b/configs/lager_defconfig
@@ -17,7 +17,8 @@ CONFIG_TARGET_LAGER=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
 CONFIG_SH_SDHI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/legoev3_defconfig b/configs/legoev3_defconfig
index d838baa..2a494a5 100644
--- a/configs/legoev3_defconfig
+++ b/configs/legoev3_defconfig
@@ -7,6 +7,7 @@ CONFIG_AUTOBOOT_STOP_STR="l"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/ls1021aqds_sdcard_qspi_defconfig b/configs/ls1021aqds_sdcard_qspi_defconfig
index cd75af6..809178a 100644
--- a/configs/ls1021aqds_sdcard_qspi_defconfig
+++ b/configs/ls1021aqds_sdcard_qspi_defconfig
@@ -7,7 +7,8 @@ CONFIG_DEFAULT_DEVICE_TREE="ls1021a-qds-duart"
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_NETDEVICES=y
 CONFIG_E1000=y
diff --git a/configs/ls1021atwr_qspi_defconfig b/configs/ls1021atwr_qspi_defconfig
index c94581e..1a03726 100644
--- a/configs/ls1021atwr_qspi_defconfig
+++ b/configs/ls1021atwr_qspi_defconfig
@@ -9,7 +9,9 @@ CONFIG_SYS_EXTRA_OPTIONS="QSPI_BOOT"
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
diff --git a/configs/ls1021atwr_sdcard_qspi_defconfig b/configs/ls1021atwr_sdcard_qspi_defconfig
index a44988a..9adc55b 100644
--- a/configs/ls1021atwr_sdcard_qspi_defconfig
+++ b/configs/ls1021atwr_sdcard_qspi_defconfig
@@ -8,7 +8,8 @@ CONFIG_OF_STDOUT_VIA_ALIAS=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SD_BOOT_QSPI"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_NETDEVICES=y
diff --git a/configs/ls1043aqds_defconfig b/configs/ls1043aqds_defconfig
index c1a6736..cde7708 100644
--- a/configs/ls1043aqds_defconfig
+++ b/configs/ls1043aqds_defconfig
@@ -8,5 +8,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
 CONFIG_SYS_NS16550=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/ls1043aqds_lpuart_defconfig b/configs/ls1043aqds_lpuart_defconfig
index 7468c1b..5e000bd 100644
--- a/configs/ls1043aqds_lpuart_defconfig
+++ b/configs/ls1043aqds_lpuart_defconfig
@@ -9,5 +9,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,LPUART"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_FSL_LPUART=y
diff --git a/configs/ls1043aqds_nand_defconfig b/configs/ls1043aqds_nand_defconfig
index 4ba0cef..46990c6 100644
--- a/configs/ls1043aqds_nand_defconfig
+++ b/configs/ls1043aqds_nand_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_DM_SPI=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/ls1043aqds_nor_ddr3_defconfig b/configs/ls1043aqds_nor_ddr3_defconfig
index 0a79e98..b1eeee8 100644
--- a/configs/ls1043aqds_nor_ddr3_defconfig
+++ b/configs/ls1043aqds_nor_ddr3_defconfig
@@ -7,6 +7,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_DM_SPI=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/ls1043aqds_qspi_defconfig b/configs/ls1043aqds_qspi_defconfig
index 3864dd6..01c8045 100644
--- a/configs/ls1043aqds_qspi_defconfig
+++ b/configs/ls1043aqds_qspi_defconfig
@@ -8,5 +8,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_DM_SPI=y
diff --git a/configs/ls1043aqds_sdcard_ifc_defconfig b/configs/ls1043aqds_sdcard_ifc_defconfig
index 622d26e..9e8cac1 100644
--- a/configs/ls1043aqds_sdcard_ifc_defconfig
+++ b/configs/ls1043aqds_sdcard_ifc_defconfig
@@ -9,6 +9,7 @@ CONFIG_SYS_NS16550=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1043a-qds-duart"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_DM_SPI=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/ls1043aqds_sdcard_qspi_defconfig b/configs/ls1043aqds_sdcard_qspi_defconfig
index 02597f2..b43e5d4 100644
--- a/configs/ls1043aqds_sdcard_qspi_defconfig
+++ b/configs/ls1043aqds_sdcard_qspi_defconfig
@@ -9,5 +9,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_DM_SPI=y
diff --git a/configs/ls1043ardb_SECURE_BOOT_defconfig b/configs/ls1043ardb_SECURE_BOOT_defconfig
index c25c3c1..094e6b1 100644
--- a/configs/ls1043ardb_SECURE_BOOT_defconfig
+++ b/configs/ls1043ardb_SECURE_BOOT_defconfig
@@ -8,6 +8,7 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4, SECURE_BOOT"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
 CONFIG_SYS_NS16550=y
 CONFIG_RSA=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/ls1043ardb_defconfig b/configs/ls1043ardb_defconfig
index 97f224d..3945432 100644
--- a/configs/ls1043ardb_defconfig
+++ b/configs/ls1043ardb_defconfig
@@ -8,5 +8,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
 CONFIG_SYS_NS16550=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/ls1043ardb_nand_defconfig b/configs/ls1043ardb_nand_defconfig
index a273331..180f464 100644
--- a/configs/ls1043ardb_nand_defconfig
+++ b/configs/ls1043ardb_nand_defconfig
@@ -9,5 +9,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,NAND_BOOT,SYS_FSL_DDR4"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
 CONFIG_SYS_NS16550=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/ls1043ardb_sdcard_defconfig b/configs/ls1043ardb_sdcard_defconfig
index 50f4955..b8731df 100644
--- a/configs/ls1043ardb_sdcard_defconfig
+++ b/configs/ls1043ardb_sdcard_defconfig
@@ -9,5 +9,6 @@ CONFIG_OF_BOARD_SETUP=y
 CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL,SD_BOOT,SYS_FSL_DDR4"
 CONFIG_OF_CONTROL=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
 CONFIG_SYS_NS16550=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/ls2080aqds_defconfig b/configs/ls2080aqds_defconfig
index a16a6d5..7ced493 100644
--- a/configs/ls2080aqds_defconfig
+++ b/configs/ls2080aqds_defconfig
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_TARGET_LS2080AQDS=y
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_DM_SPI=y
-CONFIG_DM_SPI_FLASH=y
+CONFIG_MTD=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
diff --git a/configs/ls2080ardb_defconfig b/configs/ls2080ardb_defconfig
index f8f54e7..8b3e082 100644
--- a/configs/ls2080ardb_defconfig
+++ b/configs/ls2080ardb_defconfig
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_TARGET_LS2080ARDB=y
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_DM_SPI=y
-CONFIG_DM_SPI_FLASH=y
+CONFIG_MTD=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
diff --git a/configs/ls2085aqds_defconfig b/configs/ls2085aqds_defconfig
index a5c8388..04ac068 100644
--- a/configs/ls2085aqds_defconfig
+++ b/configs/ls2085aqds_defconfig
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_TARGET_LS2080AQDS=y
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_DM_SPI=y
-CONFIG_DM_SPI_FLASH=y
+CONFIG_MTD=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-qds"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
diff --git a/configs/ls2085ardb_defconfig b/configs/ls2085ardb_defconfig
index fe46dbc..058ceb5 100644
--- a/configs/ls2085ardb_defconfig
+++ b/configs/ls2085ardb_defconfig
@@ -2,7 +2,7 @@ CONFIG_ARM=y
 CONFIG_TARGET_LS2080ARDB=y
 # CONFIG_SYS_MALLOC_F is not set
 CONFIG_DM_SPI=y
-CONFIG_DM_SPI_FLASH=y
+CONFIG_MTD=y
 CONFIG_DEFAULT_DEVICE_TREE="fsl-ls2080a-rdb"
 CONFIG_FIT=y
 CONFIG_FIT_VERBOSE=y
diff --git a/configs/lschlv2_defconfig b/configs/lschlv2_defconfig
index f33cda6..847cae2 100644
--- a/configs/lschlv2_defconfig
+++ b/configs/lschlv2_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="LSCHLV2"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/lsxhl_defconfig b/configs/lsxhl_defconfig
index 9f3fde5..175ec1a 100644
--- a/configs/lsxhl_defconfig
+++ b/configs/lsxhl_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="LSXHL"
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/m28evk_defconfig b/configs/m28evk_defconfig
index b587617..59d4164 100644
--- a/configs/m28evk_defconfig
+++ b/configs/m28evk_defconfig
@@ -5,6 +5,7 @@ CONFIG_FIT=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/ma5d4evk_defconfig b/configs/ma5d4evk_defconfig
index 378dc30..847383b 100644
--- a/configs/ma5d4evk_defconfig
+++ b/configs/ma5d4evk_defconfig
@@ -9,4 +9,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4"
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/marsboard_defconfig b/configs/marsboard_defconfig
index 4bdbb6d..10199ba 100644
--- a/configs/marsboard_defconfig
+++ b/configs/marsboard_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_DM_THERMAL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/maxbcm_defconfig b/configs/maxbcm_defconfig
index 200c7a0..5fb993d 100644
--- a/configs/maxbcm_defconfig
+++ b/configs/maxbcm_defconfig
@@ -8,7 +8,8 @@ CONFIG_SPL=y
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_SPANSION=y
diff --git a/configs/mgcoge3un_defconfig b/configs/mgcoge3un_defconfig
index f1e8fd7..a36c922 100644
--- a/configs/mgcoge3un_defconfig
+++ b/configs/mgcoge3un_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_MGCOGE3UN"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/minnowmax_defconfig b/configs/minnowmax_defconfig
index ea39e6a..ab83076 100644
--- a/configs/minnowmax_defconfig
+++ b/configs/minnowmax_defconfig
@@ -23,7 +23,8 @@ CONFIG_OF_CONTROL=y
 CONFIG_REGMAP=y
 CONFIG_SYSCON=y
 CONFIG_CPU=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/mx28evk_auart_console_defconfig b/configs/mx28evk_auart_console_defconfig
index f4c934f..f56ec28 100644
--- a/configs/mx28evk_auart_console_defconfig
+++ b/configs/mx28evk_auart_console_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="MXS_AUART,MXS_AUART_BASE=MXS_UARTAPP3_BASE,ENV_IS_IN_M
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx28evk_defconfig b/configs/mx28evk_defconfig
index d0e413d..eee2651 100644
--- a/configs/mx28evk_defconfig
+++ b/configs/mx28evk_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_MMC"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig
index 0f76bde..8fa0702 100644
--- a/configs/mx28evk_nand_defconfig
+++ b/configs/mx28evk_nand_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_NAND"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx28evk_spi_defconfig b/configs/mx28evk_spi_defconfig
index ad939ca..1768d90 100644
--- a/configs/mx28evk_spi_defconfig
+++ b/configs/mx28evk_spi_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="ENV_IS_IN_SPI_FLASH"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6dlsabreauto_defconfig b/configs/mx6dlsabreauto_defconfig
index 46b8a9f..b4a84bc 100644
--- a/configs/mx6dlsabreauto_defconfig
+++ b/configs/mx6dlsabreauto_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6dlsabresd_defconfig b/configs/mx6dlsabresd_defconfig
index 45a7ec3..e2181b0 100644
--- a/configs/mx6dlsabresd_defconfig
+++ b/configs/mx6dlsabresd_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6dlsabresd.cfg
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6qpsabreauto_defconfig b/configs/mx6qpsabreauto_defconfig
index 0877c41..49427ed 100644
--- a/configs/mx6qpsabreauto_defconfig
+++ b/configs/mx6qpsabreauto_defconfig
@@ -3,6 +3,7 @@ CONFIG_ARCH_MX6=y
 CONFIG_TARGET_MX6QSABREAUTO=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6qp.cfg,MX6Q"
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6qsabreauto_defconfig b/configs/mx6qsabreauto_defconfig
index 36ebc89..16eda5d 100644
--- a/configs/mx6qsabreauto_defconfig
+++ b/configs/mx6qsabreauto_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6qsabrelite_defconfig b/configs/mx6qsabrelite_defconfig
index fc8323c..6681a32 100644
--- a/configs/mx6qsabrelite_defconfig
+++ b/configs/mx6qsabrelite_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_DM_THERMAL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig
index 224e6ed..ff022d7 100644
--- a/configs/mx6qsabresd_defconfig
+++ b/configs/mx6qsabresd_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6sabresd_spl_defconfig b/configs/mx6sabresd_spl_defconfig
index 406777c..816ab97 100644
--- a/configs/mx6sabresd_spl_defconfig
+++ b/configs/mx6sabresd_spl_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6Q"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6slevk_defconfig b/configs/mx6slevk_defconfig
index 2d24622..6a1045d 100644
--- a/configs/mx6slevk_defconfig
+++ b/configs/mx6slevk_defconfig
@@ -7,7 +7,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DM_THERMAL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6slevk_spinor_defconfig b/configs/mx6slevk_spinor_defconfig
index 65b5e9d..4aa4b14 100644
--- a/configs/mx6slevk_spinor_defconfig
+++ b/configs/mx6slevk_spinor_defconfig
@@ -7,7 +7,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6slevk/imximage.cfg,MX6SL
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DM_THERMAL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6slevk_spl_defconfig b/configs/mx6slevk_spl_defconfig
index fee352c..6a903ae 100644
--- a/configs/mx6slevk_spl_defconfig
+++ b/configs/mx6slevk_spl_defconfig
@@ -5,7 +5,8 @@ CONFIG_SPL=y
 CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,SPL,MX6SL"
 CONFIG_CMD_GPIO=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DM_THERMAL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6sxsabreauto_defconfig b/configs/mx6sxsabreauto_defconfig
index d9e35df..4dd2f8f 100644
--- a/configs/mx6sxsabreauto_defconfig
+++ b/configs/mx6sxsabreauto_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabreauto/imximage.cfg
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig
index f4e88f2..8c6085e 100644
--- a/configs/mx6sxsabresd_defconfig
+++ b/configs/mx6sxsabresd_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,M
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/mx6sxsabresd_spl_defconfig b/configs/mx6sxsabresd_spl_defconfig
index 2713a4b..92d9a06 100644
--- a/configs/mx6sxsabresd_spl_defconfig
+++ b/configs/mx6sxsabresd_spl_defconfig
@@ -7,5 +7,6 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6SX"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/net2big_v2_defconfig b/configs/net2big_v2_defconfig
index c0aee31..ed4860d 100644
--- a/configs/net2big_v2_defconfig
+++ b/configs/net2big_v2_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="NET2BIG_V2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/netspace_lite_v2_defconfig b/configs/netspace_lite_v2_defconfig
index eb26f88..351da4a 100644
--- a/configs/netspace_lite_v2_defconfig
+++ b/configs/netspace_lite_v2_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="NETSPACE_LITE_V2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/netspace_max_v2_defconfig b/configs/netspace_max_v2_defconfig
index e37523e..34abc94 100644
--- a/configs/netspace_max_v2_defconfig
+++ b/configs/netspace_max_v2_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="NETSPACE_MAX_V2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/netspace_mini_v2_defconfig b/configs/netspace_mini_v2_defconfig
index e847123..0a16c0c 100644
--- a/configs/netspace_mini_v2_defconfig
+++ b/configs/netspace_mini_v2_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="NETSPACE_MINI_V2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/netspace_v2_defconfig b/configs/netspace_v2_defconfig
index 01a6f7e..cc22465 100644
--- a/configs/netspace_v2_defconfig
+++ b/configs/netspace_v2_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="NETSPACE_V2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/nitrogen6dl2g_defconfig b/configs/nitrogen6dl2g_defconfig
index 40da15c..c2dccda 100644
--- a/configs/nitrogen6dl2g_defconfig
+++ b/configs/nitrogen6dl2g_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl2g.cfg
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/nitrogen6dl_defconfig b/configs/nitrogen6dl_defconfig
index 5f7c17a..2d76de1 100644
--- a/configs/nitrogen6dl_defconfig
+++ b/configs/nitrogen6dl_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6dl.cfg,M
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/nitrogen6q2g_defconfig b/configs/nitrogen6q2g_defconfig
index 8707d7e..f4503e2 100644
--- a/configs/nitrogen6q2g_defconfig
+++ b/configs/nitrogen6q2g_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q2g.cfg,
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/nitrogen6q_defconfig b/configs/nitrogen6q_defconfig
index fbe9b6f..aca3318 100644
--- a/configs/nitrogen6q_defconfig
+++ b/configs/nitrogen6q_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6q.cfg,MX
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/nitrogen6s1g_defconfig b/configs/nitrogen6s1g_defconfig
index 078fc20..7c65fe1 100644
--- a/configs/nitrogen6s1g_defconfig
+++ b/configs/nitrogen6s1g_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/nitrogen6s_defconfig b/configs/nitrogen6s_defconfig
index 707fb58..e7fbe42 100644
--- a/configs/nitrogen6s_defconfig
+++ b/configs/nitrogen6s_defconfig
@@ -5,6 +5,7 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s.cfg,MX
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/nyan-big_defconfig b/configs/nyan-big_defconfig
index 604aacf..275e998 100644
--- a/configs/nyan-big_defconfig
+++ b/configs/nyan-big_defconfig
@@ -23,7 +23,8 @@ CONFIG_CROS_EC_KEYB=y
 CONFIG_CMD_CROS_EC=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_PMIC=y
 CONFIG_DM_REGULATOR=y
diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
index 8b97508..41f9039 100644
--- a/configs/omapl138_lcdk_defconfig
+++ b/configs/omapl138_lcdk_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_PROMPT="U-Boot > "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/ot1200_defconfig b/configs/ot1200_defconfig
index 5e8671f..1b77d05 100644
--- a/configs/ot1200_defconfig
+++ b/configs/ot1200_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/bachmann/ot1200/mx6q_4x_mt41j128.cfg,
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/ot1200_spl_defconfig b/configs/ot1200_spl_defconfig
index 2d37d8b..3cb0ae5 100644
--- a/configs/ot1200_spl_defconfig
+++ b/configs/ot1200_spl_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6Q"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_SST=y
diff --git a/configs/p2371-0000_defconfig b/configs/p2371-0000_defconfig
index 6282acf..eacb3f7 100644
--- a/configs/p2371-0000_defconfig
+++ b/configs/p2371-0000_defconfig
@@ -12,7 +12,8 @@ CONFIG_SYS_PROMPT="Tegra210 (P2371-0000) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
diff --git a/configs/p2371-2180_defconfig b/configs/p2371-2180_defconfig
index 392c539..857fef2 100644
--- a/configs/p2371-2180_defconfig
+++ b/configs/p2371-2180_defconfig
@@ -12,7 +12,8 @@ CONFIG_SYS_PROMPT="Tegra210 (P2371-2180) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/p2571_defconfig b/configs/p2571_defconfig
index 04df7e9..67e186e 100644
--- a/configs/p2571_defconfig
+++ b/configs/p2571_defconfig
@@ -12,7 +12,8 @@ CONFIG_SYS_PROMPT="Tegra210 (P2571) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig
index b74b372..809cce1 100644
--- a/configs/pcm051_rev1_defconfig
+++ b/configs/pcm051_rev1_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="REV1"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig
index 18be2a0..654d657 100644
--- a/configs/pcm051_rev3_defconfig
+++ b/configs/pcm051_rev3_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="REV3"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/peach-pi_defconfig b/configs/peach-pi_defconfig
index 23b9762..aa6b29a 100644
--- a/configs/peach-pi_defconfig
+++ b/configs/peach-pi_defconfig
@@ -22,7 +22,8 @@ CONFIG_CROS_EC_KEYB=y
 CONFIG_CMD_CROS_EC=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_PMIC=y
diff --git a/configs/peach-pit_defconfig b/configs/peach-pit_defconfig
index adde56f..285e4ae 100644
--- a/configs/peach-pit_defconfig
+++ b/configs/peach-pit_defconfig
@@ -22,7 +22,8 @@ CONFIG_CROS_EC_KEYB=y
 CONFIG_CMD_CROS_EC=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_SPI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_PMIC=y
diff --git a/configs/porter_defconfig b/configs/porter_defconfig
index 5899f73..4b9a153 100644
--- a/configs/porter_defconfig
+++ b/configs/porter_defconfig
@@ -17,7 +17,8 @@ CONFIG_TARGET_PORTER=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
 CONFIG_SH_SDHI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/portl2_defconfig b/configs/portl2_defconfig
index 37c9ddb..e463766 100644
--- a/configs/portl2_defconfig
+++ b/configs/portl2_defconfig
@@ -4,7 +4,8 @@ CONFIG_TARGET_KM_KIRKWOOD=y
 CONFIG_SYS_EXTRA_OPTIONS="KM_PORTL2"
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/pr1_defconfig b/configs/pr1_defconfig
index c813502..2f92389 100644
--- a/configs/pr1_defconfig
+++ b/configs/pr1_defconfig
@@ -5,7 +5,8 @@ CONFIG_SYS_PROMPT="pr1>"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
 CONFIG_LIB_RAND=y
diff --git a/configs/pxm2_defconfig b/configs/pxm2_defconfig
index 5b32bb1..85cb63a 100644
--- a/configs/pxm2_defconfig
+++ b/configs/pxm2_defconfig
@@ -10,7 +10,8 @@ CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/qemu-x86_defconfig b/configs/qemu-x86_defconfig
index bb9c6cd..d22c859 100644
--- a/configs/qemu-x86_defconfig
+++ b/configs/qemu-x86_defconfig
@@ -16,7 +16,8 @@ CONFIG_CMD_CPU=y
 CONFIG_CMD_BOOTSTAGE=y
 CONFIG_OF_CONTROL=y
 CONFIG_CPU=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_WINBOND=y
diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig
index 6e7d0d2..6bba132 100644
--- a/configs/rastaban_defconfig
+++ b/configs/rastaban_defconfig
@@ -9,7 +9,8 @@ CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/riotboard_defconfig b/configs/riotboard_defconfig
index 35b96a3..aa711f2 100644
--- a/configs/riotboard_defconfig
+++ b/configs/riotboard_defconfig
@@ -6,7 +6,8 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/boundary/nitrogen6x/nitrogen6s1g.cfg,
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 CONFIG_DM=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SST=y
 CONFIG_DM_THERMAL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/rock2_defconfig b/configs/rock2_defconfig
index 68e674d..73cadef 100644
--- a/configs/rock2_defconfig
+++ b/configs/rock2_defconfig
@@ -53,3 +53,5 @@ CONFIG_USE_PRIVATE_LIBGCC=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_CMD_DHRYSTONE=y
 CONFIG_ERRNO_STR=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
diff --git a/configs/rut_defconfig b/configs/rut_defconfig
index 7a4011e..d6e4423 100644
--- a/configs/rut_defconfig
+++ b/configs/rut_defconfig
@@ -10,7 +10,8 @@ CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d2_xplained_mmc_defconfig b/configs/sama5d2_xplained_mmc_defconfig
index d6bc70e..e716f0e 100644
--- a/configs/sama5d2_xplained_mmc_defconfig
+++ b/configs/sama5d2_xplained_mmc_defconfig
@@ -9,5 +9,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_MMC"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SF=y
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d2_xplained_spiflash_defconfig b/configs/sama5d2_xplained_spiflash_defconfig
index eb2f1f0..7f339f2 100644
--- a/configs/sama5d2_xplained_spiflash_defconfig
+++ b/configs/sama5d2_xplained_spiflash_defconfig
@@ -9,5 +9,6 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D2,SYS_USE_SERIALFLASH"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_SF=y
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d3xek_mmc_defconfig b/configs/sama5d3xek_mmc_defconfig
index 4a97da1..82aa782 100644
--- a/configs/sama5d3xek_mmc_defconfig
+++ b/configs/sama5d3xek_mmc_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_MMC"
 # CONFIG_CMD_IMI is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d3xek_nandflash_defconfig b/configs/sama5d3xek_nandflash_defconfig
index 968cd66..0914ede 100644
--- a/configs/sama5d3xek_nandflash_defconfig
+++ b/configs/sama5d3xek_nandflash_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_NANDFLASH"
 # CONFIG_CMD_IMI is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d3xek_spiflash_defconfig b/configs/sama5d3xek_spiflash_defconfig
index bc98e6b..622e71a 100644
--- a/configs/sama5d3xek_spiflash_defconfig
+++ b/configs/sama5d3xek_spiflash_defconfig
@@ -6,6 +6,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D3,SYS_USE_SERIALFLASH"
 # CONFIG_CMD_IMI is not set
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d4_xplained_mmc_defconfig b/configs/sama5d4_xplained_mmc_defconfig
index f1261ab..a6afa56 100644
--- a/configs/sama5d4_xplained_mmc_defconfig
+++ b/configs/sama5d4_xplained_mmc_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d4_xplained_nandflash_defconfig b/configs/sama5d4_xplained_nandflash_defconfig
index 0e53b32..b871d9b 100644
--- a/configs/sama5d4_xplained_nandflash_defconfig
+++ b/configs/sama5d4_xplained_nandflash_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d4_xplained_spiflash_defconfig b/configs/sama5d4_xplained_spiflash_defconfig
index a1b2c53..d8fdcf9 100644
--- a/configs/sama5d4_xplained_spiflash_defconfig
+++ b/configs/sama5d4_xplained_spiflash_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d4ek_mmc_defconfig b/configs/sama5d4ek_mmc_defconfig
index bf81f9b..3ea5f85 100644
--- a/configs/sama5d4ek_mmc_defconfig
+++ b/configs/sama5d4ek_mmc_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_MMC"
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d4ek_nandflash_defconfig b/configs/sama5d4ek_nandflash_defconfig
index c78266e..8443781 100644
--- a/configs/sama5d4ek_nandflash_defconfig
+++ b/configs/sama5d4ek_nandflash_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_NANDFLASH"
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sama5d4ek_spiflash_defconfig b/configs/sama5d4ek_spiflash_defconfig
index 7c10aab..5c578dc 100644
--- a/configs/sama5d4ek_spiflash_defconfig
+++ b/configs/sama5d4ek_spiflash_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_EXTRA_OPTIONS="SAMA5D4,SYS_USE_SERIALFLASH"
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_ATMEL=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/sh7752evb_defconfig b/configs/sh7752evb_defconfig
index 4c8883b..5754fe5 100644
--- a/configs/sh7752evb_defconfig
+++ b/configs/sh7752evb_defconfig
@@ -17,7 +17,8 @@ CONFIG_TARGET_SH7752EVB=y
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/sh7753evb_defconfig b/configs/sh7753evb_defconfig
index 9992cff..ae46a8f 100644
--- a/configs/sh7753evb_defconfig
+++ b/configs/sh7753evb_defconfig
@@ -16,7 +16,8 @@ CONFIG_TARGET_SH7753EVB=y
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/sh7757lcr_defconfig b/configs/sh7757lcr_defconfig
index 54d6436..51f9061 100644
--- a/configs/sh7757lcr_defconfig
+++ b/configs/sh7757lcr_defconfig
@@ -17,6 +17,7 @@ CONFIG_TARGET_SH7757LCR=y
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/silk_defconfig b/configs/silk_defconfig
index 67fca2a..d1db8ab 100644
--- a/configs/silk_defconfig
+++ b/configs/silk_defconfig
@@ -17,7 +17,8 @@ CONFIG_TARGET_SILK=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
 CONFIG_SH_SDHI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/smdk5250_defconfig b/configs/smdk5250_defconfig
index b3d16ab..8bbafa5 100644
--- a/configs/smdk5250_defconfig
+++ b/configs/smdk5250_defconfig
@@ -14,7 +14,8 @@ CONFIG_CMD_SOUND=y
 CONFIG_CMD_PMIC=y
 CONFIG_CMD_REGULATOR=y
 CONFIG_DM_I2C_COMPAT=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_PMIC=y
diff --git a/configs/smdk5420_defconfig b/configs/smdk5420_defconfig
index a84d159..790790a 100644
--- a/configs/smdk5420_defconfig
+++ b/configs/smdk5420_defconfig
@@ -11,7 +11,8 @@ CONFIG_SYS_PROMPT="SMDK5420 # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_DM_I2C_COMPAT=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_PMIC=y
diff --git a/configs/snow_defconfig b/configs/snow_defconfig
index 5dbd18a..09eb339 100644
--- a/configs/snow_defconfig
+++ b/configs/snow_defconfig
@@ -23,7 +23,8 @@ CONFIG_CROS_EC_KEYB=y
 CONFIG_CMD_CROS_EC=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_I2C=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_PMIC=y
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig
index 7b60d95..32e787b 100644
--- a/configs/socfpga_arria5_defconfig
+++ b/configs/socfpga_arria5_defconfig
@@ -15,7 +15,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig
index 6a487f4..3c5b7cc 100644
--- a/configs/socfpga_cyclone5_defconfig
+++ b/configs/socfpga_cyclone5_defconfig
@@ -15,7 +15,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
diff --git a/configs/socfpga_de0_nano_soc_defconfig b/configs/socfpga_de0_nano_soc_defconfig
index cfcae5d..53a43f3 100644
--- a/configs/socfpga_de0_nano_soc_defconfig
+++ b/configs/socfpga_de0_nano_soc_defconfig
@@ -21,3 +21,6 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_MTD=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
diff --git a/configs/socfpga_mcvevk_defconfig b/configs/socfpga_mcvevk_defconfig
index b6f6a65..e602b3a 100644
--- a/configs/socfpga_mcvevk_defconfig
+++ b/configs/socfpga_mcvevk_defconfig
@@ -21,3 +21,5 @@ CONFIG_CADENCE_QSPI=y
 CONFIG_DESIGNWARE_SPI=y
 CONFIG_USB=y
 CONFIG_DM_USB=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig
index f45c3ed..48947b1 100644
--- a/configs/socfpga_sockit_defconfig
+++ b/configs/socfpga_sockit_defconfig
@@ -15,7 +15,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
diff --git a/configs/socfpga_socrates_defconfig b/configs/socfpga_socrates_defconfig
index e25d09b..336d30b 100644
--- a/configs/socfpga_socrates_defconfig
+++ b/configs/socfpga_socrates_defconfig
@@ -15,7 +15,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DM_ETH=y
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig
index d499a14..b7fc8a1 100644
--- a/configs/socfpga_sr1500_defconfig
+++ b/configs/socfpga_sr1500_defconfig
@@ -14,7 +14,8 @@ CONFIG_FIT=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_MMC=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
 CONFIG_DM_ETH=y
diff --git a/configs/spring_defconfig b/configs/spring_defconfig
index 352bd1a..f6d7f05 100644
--- a/configs/spring_defconfig
+++ b/configs/spring_defconfig
@@ -23,7 +23,8 @@ CONFIG_CROS_EC_KEYB=y
 CONFIG_CMD_CROS_EC=y
 CONFIG_CROS_EC=y
 CONFIG_CROS_EC_I2C=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_GIGADEVICE=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_DM_PMIC=y
diff --git a/configs/stout_defconfig b/configs/stout_defconfig
index c5af189..c2ba137 100644
--- a/configs/stout_defconfig
+++ b/configs/stout_defconfig
@@ -17,7 +17,8 @@ CONFIG_TARGET_STOUT=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_MISC is not set
 CONFIG_SH_SDHI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/taurus_defconfig b/configs/taurus_defconfig
index 0af7f2d..bb56c38 100644
--- a/configs/taurus_defconfig
+++ b/configs/taurus_defconfig
@@ -11,7 +11,8 @@ CONFIG_SYS_PROMPT="U-Boot> "
 # CONFIG_CMD_FPGA is not set
 # CONFIG_CMD_SOURCE is not set
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_USE_TINY_PRINTF=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/tec-ng_defconfig b/configs/tec-ng_defconfig
index 389603c..4a27e12 100644
--- a/configs/tec-ng_defconfig
+++ b/configs/tec-ng_defconfig
@@ -14,7 +14,8 @@ CONFIG_SYS_PROMPT="Tegra30 (TEC-NG) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA20_SLINK=y
diff --git a/configs/theadorable_debug_defconfig b/configs/theadorable_debug_defconfig
index 62a6ee6..b6897f5 100644
--- a/configs/theadorable_debug_defconfig
+++ b/configs/theadorable_debug_defconfig
@@ -14,7 +14,8 @@ CONFIG_CMD_USB=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DEBUG_UART=y
diff --git a/configs/theadorable_defconfig b/configs/theadorable_defconfig
index 4d5f3b0..291b90e 100644
--- a/configs/theadorable_defconfig
+++ b/configs/theadorable_defconfig
@@ -14,7 +14,8 @@ CONFIG_CMD_SF=y
 # CONFIG_CMD_NET is not set
 # CONFIG_CMD_NFS is not set
 CONFIG_SPL_OF_TRANSLATE=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_MACRONIX=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_DEBUG_UART=y
diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig
index 666cf5e..8820831 100644
--- a/configs/thuban_defconfig
+++ b/configs/thuban_defconfig
@@ -9,7 +9,8 @@ CONFIG_AUTOBOOT_STOP_STR="\x1b\x1b"
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/tqma6q_mba6_mmc_defconfig b/configs/tqma6q_mba6_mmc_defconfig
index 6c52fff..f0175f0 100644
--- a/configs/tqma6q_mba6_mmc_defconfig
+++ b/configs/tqma6q_mba6_mmc_defconfig
@@ -7,6 +7,7 @@ CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/tqma6q_mba6_spi_defconfig b/configs/tqma6q_mba6_spi_defconfig
index 85b239b..c5b6103 100644
--- a/configs/tqma6q_mba6_spi_defconfig
+++ b/configs/tqma6q_mba6_spi_defconfig
@@ -8,6 +8,7 @@ CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/tqma6s_mba6_mmc_defconfig b/configs/tqma6s_mba6_mmc_defconfig
index 977f98a..70b7d5f 100644
--- a/configs/tqma6s_mba6_mmc_defconfig
+++ b/configs/tqma6s_mba6_mmc_defconfig
@@ -8,6 +8,7 @@ CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/tqma6s_mba6_spi_defconfig b/configs/tqma6s_mba6_spi_defconfig
index c6dac61..bbe279c 100644
--- a/configs/tqma6s_mba6_spi_defconfig
+++ b/configs/tqma6s_mba6_spi_defconfig
@@ -9,6 +9,7 @@ CONFIG_OF_BOARD_SETUP=y
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/trimslice_defconfig b/configs/trimslice_defconfig
index a0b3a3e..bfd0cf7 100644
--- a/configs/trimslice_defconfig
+++ b/configs/trimslice_defconfig
@@ -13,7 +13,8 @@ CONFIG_SYS_PROMPT="Tegra20 (TrimSlice) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_PCI_TEGRA=y
 CONFIG_SYS_NS16550=y
diff --git a/configs/tseries_spi_defconfig b/configs/tseries_spi_defconfig
index 4c6d544..1bfa9d6 100644
--- a/configs/tseries_spi_defconfig
+++ b/configs/tseries_spi_defconfig
@@ -25,7 +25,8 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_PING=y
 CONFIG_CMD_TIME=y
 CONFIG_NETCONSOLE=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_STMICRO=y
 # CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
 CONFIG_SYS_NS16550=y
diff --git a/configs/venice2_defconfig b/configs/venice2_defconfig
index 954c1de..1501622 100644
--- a/configs/venice2_defconfig
+++ b/configs/venice2_defconfig
@@ -13,7 +13,8 @@ CONFIG_SYS_PROMPT="Tegra124 (Venice2) # "
 CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_SYS_NS16550=y
 CONFIG_TEGRA114_SPI=y
diff --git a/configs/vf610twr_defconfig b/configs/vf610twr_defconfig
index 7c83887..f5a3134 100644
--- a/configs/vf610twr_defconfig
+++ b/configs/vf610twr_defconfig
@@ -12,6 +12,7 @@ CONFIG_DM=y
 CONFIG_VYBRID_GPIO=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_FSL_LPUART=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/vf610twr_nand_defconfig b/configs/vf610twr_nand_defconfig
index 4591526..db172c0 100644
--- a/configs/vf610twr_nand_defconfig
+++ b/configs/vf610twr_nand_defconfig
@@ -12,6 +12,7 @@ CONFIG_DM=y
 CONFIG_VYBRID_GPIO=y
 CONFIG_NAND_VF610_NFC=y
 CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_FSL_LPUART=y
 CONFIG_OF_LIBFDT=y
diff --git a/configs/vinco_defconfig b/configs/vinco_defconfig
index 7cae79b..f279770 100644
--- a/configs/vinco_defconfig
+++ b/configs/vinco_defconfig
@@ -8,6 +8,7 @@ CONFIG_SYS_PROMPT="vinco => "
 # CONFIG_CMD_LOADS is not set
 # CONFIG_CMD_FLASH is not set
 # CONFIG_CMD_FPGA is not set
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_NETDEVICES=y
 CONFIG_ETH_DESIGNWARE=y
diff --git a/configs/zynq_microzed_defconfig b/configs/zynq_microzed_defconfig
index 4c5152f..49232e1 100644
--- a/configs/zynq_microzed_defconfig
+++ b/configs/zynq_microzed_defconfig
@@ -14,9 +14,10 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_SDHCI=y
-CONFIG_SPI_FLASH=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
 CONFIG_SPI_FLASH_WINBOND=y
 CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_SPI_NOR=y
diff --git a/configs/zynq_zc702_defconfig b/configs/zynq_zc702_defconfig
index f01874f..cddb49b 100644
--- a/configs/zynq_zc702_defconfig
+++ b/configs/zynq_zc702_defconfig
@@ -13,7 +13,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_SDHCI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/zynq_zc706_defconfig b/configs/zynq_zc706_defconfig
index 215f00d..9991081 100644
--- a/configs/zynq_zc706_defconfig
+++ b/configs/zynq_zc706_defconfig
@@ -14,7 +14,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_SDHCI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/zynq_zc770_xm010_defconfig b/configs/zynq_zc770_xm010_defconfig
index cec722f..995b700 100644
--- a/configs/zynq_zc770_xm010_defconfig
+++ b/configs/zynq_zc770_xm010_defconfig
@@ -15,7 +15,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_SDHCI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/zynq_zc770_xm013_defconfig b/configs/zynq_zc770_xm013_defconfig
index 9feaca8..7ffc7b8 100644
--- a/configs/zynq_zc770_xm013_defconfig
+++ b/configs/zynq_zc770_xm013_defconfig
@@ -14,7 +14,8 @@ CONFIG_CMD_GPIO=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_ZYNQ_GEM=y
 CONFIG_ZYNQ_QSPI=y
diff --git a/configs/zynq_zed_defconfig b/configs/zynq_zed_defconfig
index 4a2a2fc..a595075 100644
--- a/configs/zynq_zed_defconfig
+++ b/configs/zynq_zed_defconfig
@@ -14,7 +14,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_SDHCI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_BAR=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_SPI_FLASH_STMICRO=y
diff --git a/configs/zynq_zybo_defconfig b/configs/zynq_zybo_defconfig
index 7c23fec..78eeb30 100644
--- a/configs/zynq_zybo_defconfig
+++ b/configs/zynq_zybo_defconfig
@@ -14,7 +14,8 @@ CONFIG_CMD_GPIO=y
 CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_SPL_DM_SEQ_ALIAS=y
 CONFIG_ZYNQ_SDHCI=y
-CONFIG_SPI_FLASH=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_M25P80=y
 CONFIG_SPI_FLASH_SPANSION=y
 CONFIG_ZYNQ_GEM=y
 CONFIG_DEBUG_UART=y
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 9298c30..f9138c1 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -413,7 +413,7 @@
  */
 #define CONFIG_HARD_SPI
 
-#if defined(CONFIG_SPI_FLASH)
+#if defined(CONFIG_MTD_SPI_NOR)
 #define CONFIG_CMD_SF
 #define CONFIG_SF_DEFAULT_SPEED	10000000
 #define CONFIG_SF_DEFAULT_MODE	0
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 81af871..fe34d40 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -61,7 +61,8 @@
 #define CONFIG_SPL_ENV_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index bc4c733..440ec14 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -50,7 +50,8 @@
 #define CONFIG_SPL_ENV_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index f07b2d1..7031fba 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -80,7 +80,8 @@
 #ifdef CONFIG_SPIFLASH
 #define CONFIG_RESET_VECTOR_ADDRESS		0x200FFC
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x00200000)
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index 1a22bee..96498a1 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -87,7 +87,8 @@
 #ifdef CONFIG_SPIFLASH
 #define CONFIG_RESET_VECTOR_ADDRESS		0x30000FFC
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x30000000)
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 84e195d..cc2dae1 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -73,7 +73,8 @@ $(SRCTREE)/board/freescale/t104xrdb/t1042d4_rcw.cfg
 #ifdef CONFIG_SPIFLASH
 #define	CONFIG_RESET_VECTOR_ADDRESS		0x30000FFC
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x30000000)
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 5957fa8..82db256 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -90,7 +90,8 @@
 #ifdef CONFIG_SPIFLASH
 #define	CONFIG_RESET_VECTOR_ADDRESS		0x200FFC
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE	(768 << 10)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST		(0x00200000)
@@ -540,7 +541,7 @@ unsigned long get_board_ddr_clk(void);
 /*
  * eSPI - Enhanced SPI
  */
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 #ifndef CONFIG_SPL_BUILD
 #endif
 
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index e0769d0..ee8fccd 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -79,7 +79,8 @@
 #ifdef CONFIG_SPIFLASH
 #define        CONFIG_RESET_VECTOR_ADDRESS             0x200FFC
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE       (768 << 10)
 #define CONFIG_SYS_SPI_FLASH_U_BOOT_DST                (0x00200000)
@@ -494,7 +495,7 @@ unsigned long get_board_ddr_clk(void);
 /*
  * eSPI - Enhanced SPI
  */
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 #define CONFIG_SPI_FLASH_BAR
 #define CONFIG_CMD_SF
 #define CONFIG_SF_DEFAULT_SPEED	 10000000
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index 139e629..7c565b6 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -45,7 +45,7 @@
 #define CONFIG_NETMASK		255.255.252.0
 #define CONFIG_ETHPRIME		"eTSEC3"
 
-#ifndef CONFIG_SPI_FLASH
+#ifndef CONFIG_MTD_SPI_NOR
 #endif
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
@@ -86,7 +86,7 @@
 #define CONFIG_NETMASK		255.255.255.0
 #define CONFIG_ETHPRIME		"eTSEC1"
 
-#ifndef CONFIG_SPI_FLASH
+#ifndef CONFIG_MTD_SPI_NOR
 #endif
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
index 150c523..4462a58 100644
--- a/include/configs/am335x_evm.h
+++ b/include/configs/am335x_evm.h
@@ -416,7 +416,8 @@
 /* SPL related */
 #undef CONFIG_SPL_OS_BOOT		/* Not supported by existing map */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
 
diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
index b982ed6..7386625 100644
--- a/include/configs/am43xx_evm.h
+++ b/include/configs/am43xx_evm.h
@@ -145,7 +145,7 @@
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_MMC
 #undef CONFIG_DM_SPI
-#undef CONFIG_DM_SPI_FLASH
+#undef CONFIG_MTD
 #undef CONFIG_TIMER
 #endif
 
diff --git a/include/configs/at91sam9n12ek.h b/include/configs/at91sam9n12ek.h
index 14a8436..b432c79 100644
--- a/include/configs/at91sam9n12ek.h
+++ b/include/configs/at91sam9n12ek.h
@@ -278,7 +278,8 @@
 
 #elif CONFIG_SYS_USE_SPIFLASH
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8400
 
diff --git a/include/configs/at91sam9x5ek.h b/include/configs/at91sam9x5ek.h
index cd91a7b..4bfb7c8 100644
--- a/include/configs/at91sam9x5ek.h
+++ b/include/configs/at91sam9x5ek.h
@@ -280,7 +280,8 @@
 
 #elif CONFIG_SYS_USE_SPIFLASH
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8400
 
diff --git a/include/configs/bav335x.h b/include/configs/bav335x.h
index a9df0b3..50060d5 100644
--- a/include/configs/bav335x.h
+++ b/include/configs/bav335x.h
@@ -548,7 +548,8 @@ DEFAULT_LINUX_BOOT_ENV \
 /* SPL related */
 #undef CONFIG_SPL_OS_BOOT		/* Not supported by existing map */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
 
diff --git a/include/configs/bfin_adi_common.h b/include/configs/bfin_adi_common.h
index 9c537e0..fb9d5bf 100644
--- a/include/configs/bfin_adi_common.h
+++ b/include/configs/bfin_adi_common.h
@@ -64,7 +64,7 @@
 # if defined(CONFIG_BFIN_SPI) || defined(CONFIG_SOFT_SPI)
 #  define CONFIG_CMD_SPI
 # endif
-# ifdef CONFIG_SPI_FLASH
+# ifdef CONFIG_MTD_SPI_NOR
 #  define CONFIG_CMD_SF
 # endif
 # if defined(CONFIG_SYS_I2C) || defined(CONFIG_SYS_I2C_SOFT)
diff --git a/include/configs/cgtqmx6eval.h b/include/configs/cgtqmx6eval.h
index 487c011..da81dc4 100644
--- a/include/configs/cgtqmx6eval.h
+++ b/include/configs/cgtqmx6eval.h
@@ -21,7 +21,8 @@
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
 #define CONFIG_SPL_MMC_SUPPORT
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	(64 * 1024)
 #define CONFIG_SPL_SPI_LOAD
 #include "imx6_spl.h"
@@ -42,7 +43,6 @@
 
 /* SPI NOR */
 #define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
 #define CONFIG_SPI_FLASH_STMICRO
 #define CONFIG_SPI_FLASH_SST
 #define CONFIG_MXC_SPI
diff --git a/include/configs/chromebook_jerry.h b/include/configs/chromebook_jerry.h
index 67f45c0..a4d768d 100644
--- a/include/configs/chromebook_jerry.h
+++ b/include/configs/chromebook_jerry.h
@@ -16,7 +16,8 @@
 
 #define CONFIG_ENV_IS_NOWHERE
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPI_FLASH_GIGADEVICE
 
diff --git a/include/configs/clearfog.h b/include/configs/clearfog.h
index f0de827..b6ebd66 100644
--- a/include/configs/clearfog.h
+++ b/include/configs/clearfog.h
@@ -145,7 +145,8 @@
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
 /* SPL related SPI defines */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_BUS		0
 #define CONFIG_SPL_SPI_CS		0
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index b36ba14..af63d0b 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -233,7 +233,8 @@
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x80 /* offset 64 kb */
 #define CONFIG_SYS_MONITOR_LEN	(CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS / 2 * 1024)
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	(64 * 1024)
 #define CONFIG_SPL_SPI_LOAD
 
diff --git a/include/configs/cm_t43.h b/include/configs/cm_t43.h
index 1c1951c..854032b 100644
--- a/include/configs/cm_t43.h
+++ b/include/configs/cm_t43.h
@@ -167,7 +167,8 @@
 #define CONFIG_SYS_MONITOR_LEN		(512 * 1024)
 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR	0x480
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_I2C_SUPPORT
 #define CONFIG_SPL_POWER_SUPPORT
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 24e55e8..e78b8d4 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -150,7 +150,8 @@
 
 #ifdef CONFIG_USE_SPIFLASH
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000
 #define CONFIG_SYS_SPI_U_BOOT_SIZE	0x40000
@@ -357,7 +358,8 @@
 						CONFIG_SYS_MALLOC_LEN)
 #define CONFIG_SYS_SPL_MALLOC_SIZE	CONFIG_SYS_MALLOC_LEN
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
diff --git a/include/configs/db-88f6820-gp.h b/include/configs/db-88f6820-gp.h
index ef14132..1255c8b 100644
--- a/include/configs/db-88f6820-gp.h
+++ b/include/configs/db-88f6820-gp.h
@@ -145,7 +145,8 @@
 #if CONFIG_SPL_BOOT_DEVICE == SPL_BOOT_SPI_NOR_FLASH
 /* SPL related SPI defines */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_BUS		0
 #define CONFIG_SPL_SPI_CS		0
diff --git a/include/configs/db-mv784mp-gp.h b/include/configs/db-mv784mp-gp.h
index c8b0344..5a88fed 100644
--- a/include/configs/db-mv784mp-gp.h
+++ b/include/configs/db-mv784mp-gp.h
@@ -135,7 +135,8 @@
 
 /* SPL related SPI defines */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_BUS		0
 #define CONFIG_SPL_SPI_CS		0
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 45bda4f..e124c45 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -167,7 +167,7 @@
 
 #ifdef CONFIG_SPL_BUILD
 #undef CONFIG_DM_SPI
-#undef CONFIG_DM_SPI_FLASH
+#undef CONFIG_MTD
 #endif
 
 /*
@@ -208,7 +208,8 @@
 #define CONFIG_SPL_DMA_SUPPORT
 #define CONFIG_TI_EDMA3
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     0x40000
 
 #define CONFIG_SUPPORT_EMMC_BOOT
diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
index 0b7d89b..a9e1219 100644
--- a/include/configs/dreamplug.h
+++ b/include/configs/dreamplug.h
@@ -51,7 +51,7 @@
 /*
  *  Environment variables configurations
  */
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 #define CONFIG_ENV_IS_IN_SPI_FLASH	1
 #define CONFIG_ENV_SECT_SIZE		0x10000	/* 64k */
 #else
diff --git a/include/configs/ds414.h b/include/configs/ds414.h
index e3c7087..334f61b 100644
--- a/include/configs/ds414.h
+++ b/include/configs/ds414.h
@@ -139,7 +139,8 @@
 
 /* SPL related SPI defines */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_BUS		0
 #define CONFIG_SPL_SPI_CS		0
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h
index 7d600bf..86ba4ba 100644
--- a/include/configs/exynos5-common.h
+++ b/include/configs/exynos5-common.h
@@ -128,7 +128,7 @@
 #define CONFIG_I2C_EDID
 
 /* SPI */
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 #define CONFIG_CMD_SF
 #define CONFIG_CMD_SPI
 #define CONFIG_SF_DEFAULT_MODE		SPI_MODE_0
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index cf71f21..3d479db 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -62,7 +62,7 @@
 #define CONFIG_MXC_UART
 #define CONFIG_MXC_UART_BASE	       UART2_BASE
 
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 
 /* SPI */
 #define CONFIG_CMD_SF
@@ -94,7 +94,7 @@
   #define CONFIG_APBH_DMA_BURST8
 #endif
 
-#endif /* CONFIG_SPI_FLASH */
+#endif /* CONFIG_MTD_SPI_NOR */
 
 /* I2C Configs */
 #define CONFIG_CMD_I2C
@@ -249,7 +249,7 @@
 #define CONFIG_CMD_MTDPARTS
 #define CONFIG_MTD_DEVICE
 #define CONFIG_MTD_PARTITIONS
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 #define MTDIDS_DEFAULT    "nor0=nor"
 #define MTDPARTS_DEFAULT  \
 	"mtdparts=nor:512k(uboot),64k(env),2m(kernel),-(rootfs)"
@@ -259,7 +259,7 @@
 #endif
 
 /* Persistent Environment Config */
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 #define CONFIG_ENV_IS_IN_SPI_FLASH
 #else
 #define CONFIG_ENV_IS_IN_NAND
@@ -365,7 +365,7 @@
 			"fi; " \
 		"fi\0"
 
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 	#define CONFIG_EXTRA_ENV_SETTINGS \
 	CONFIG_EXTRA_ENV_SETTINGS_COMMON \
 	"image_os=ventana/openwrt-imx6-imx6q-gw5400-a-squashfs.bin\0" \
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index cee6281..e6f8f6b 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -321,7 +321,6 @@
 /* DM SPI */
 #if defined(CONFIG_FSL_DSPI) || defined(CONFIG_FSL_QSPI)
 #define CONFIG_CMD_SF
-#define CONFIG_DM_SPI_FLASH
 #endif
 
 /*
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index ea25aad..74e5c81 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -195,7 +195,7 @@
 #define CONFIG_FSL_DSPI
 #ifdef CONFIG_FSL_DSPI
 #define CONFIG_CMD_SF
-#define CONFIG_DM_SPI_FLASH
+#define CONFIG_MTD
 #define CONFIG_SPI_FLASH_STMICRO	/* cs0 */
 #define CONFIG_SPI_FLASH_SST		/* cs1 */
 #define CONFIG_SPI_FLASH_EON		/* cs2 */
diff --git a/include/configs/ls2080aqds.h b/include/configs/ls2080aqds.h
index dab3820..6efda6f 100644
--- a/include/configs/ls2080aqds.h
+++ b/include/configs/ls2080aqds.h
@@ -284,7 +284,8 @@ unsigned long get_board_ddr_clk(void);
 /* SPI */
 #ifdef CONFIG_FSL_DSPI
 #define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
 #endif
 
 /*
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index b2c0181..b53bb76 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -257,7 +257,8 @@ unsigned long get_board_sys_clk(void);
 /* SPI */
 #ifdef CONFIG_FSL_DSPI
 #define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
 #define CONFIG_SPI_FLASH_BAR
 #endif
 
diff --git a/include/configs/lsxl.h b/include/configs/lsxl.h
index 8fb0135..b9a66dd 100644
--- a/include/configs/lsxl.h
+++ b/include/configs/lsxl.h
@@ -88,7 +88,7 @@
 /*
  *  Environment variables configurations
  */
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 #define CONFIG_SYS_MAX_FLASH_BANKS	1
 #define CONFIG_SYS_MAX_FLASH_SECT	8
 #define CONFIG_ENV_IS_IN_SPI_FLASH	1
diff --git a/include/configs/ma5d4evk.h b/include/configs/ma5d4evk.h
index 7f8a59f..472d4fb 100644
--- a/include/configs/ma5d4evk.h
+++ b/include/configs/ma5d4evk.h
@@ -246,7 +246,8 @@
 #define CONFIG_SYS_MONITOR_LEN		(512 << 10)
 
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x10000
 
diff --git a/include/configs/maxbcm.h b/include/configs/maxbcm.h
index 43d7fd0..aa006e8 100644
--- a/include/configs/maxbcm.h
+++ b/include/configs/maxbcm.h
@@ -98,7 +98,8 @@
 
 /* SPL related SPI defines */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_BUS		0
 #define CONFIG_SPL_SPI_CS		0
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
index 2fff34a..4707a9b 100644
--- a/include/configs/mx6ul_14x14_evk.h
+++ b/include/configs/mx6ul_14x14_evk.h
@@ -197,7 +197,8 @@
 #define CONFIG_FSL_QSPI
 #ifdef CONFIG_FSL_QSPI
 #define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
 #define CONFIG_SPI_FLASH_BAR
 #define CONFIG_SF_DEFAULT_BUS		0
 #define CONFIG_SF_DEFAULT_CS		0
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 2c981e0..d28cc97 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -287,7 +287,8 @@
 
 #ifdef CONFIG_FSL_QSPI
 #define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
 #define CONFIG_SPI_FLASH_MACRONIX
 #define CONFIG_SPI_FLASH_BAR
 #define CONFIG_SF_DEFAULT_BUS		0
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index fc7bfce..2ad67c9 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -98,7 +98,8 @@
 
 #ifdef CONFIG_USE_SPIFLASH
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000
 #define CONFIG_SYS_SPI_U_BOOT_SIZE	0x30000
diff --git a/include/configs/ot1200.h b/include/configs/ot1200.h
index 879ad58..2165562 100644
--- a/include/configs/ot1200.h
+++ b/include/configs/ot1200.h
@@ -87,7 +87,8 @@
 #include "imx6_spl.h"
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_LIBCOMMON_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SYS_SPI_U_BOOT_OFFS     (64 * 1024)
 #define CONFIG_SPL_SPI_LOAD
 #endif
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 799521e..4d428f6 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -217,7 +217,8 @@
 #define CONFIG_SPL_ENV_SUPPORT
 #define CONFIG_SPL_SERIAL_SUPPORT
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_FLASH_MINIMAL
 #define CONFIG_SPL_FLUSH_IMAGE
 #define CONFIG_SPL_TARGET		"u-boot-with-spl.bin"
@@ -698,7 +699,7 @@
  */
 #define CONFIG_HARD_SPI
 
-#if defined(CONFIG_SPI_FLASH)
+#if defined(CONFIG_MTD_SPI_NOR)
 #define CONFIG_CMD_SF
 #define CONFIG_SF_DEFAULT_SPEED	10000000
 #define CONFIG_SF_DEFAULT_MODE	0
diff --git a/include/configs/pcm051.h b/include/configs/pcm051.h
index 45c140d..3583152 100644
--- a/include/configs/pcm051.h
+++ b/include/configs/pcm051.h
@@ -130,7 +130,8 @@
 
 #ifdef CONFIG_SPI_BOOT
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
 #define CONFIG_SYS_SPI_U_BOOT_SIZE	0x40000
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index 4e29cf3..0427059 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -98,7 +98,8 @@
 
 #ifdef CONFIG_FSL_QSPI
 #define CONFIG_CMD_SF
-#define CONFIG_SPI_FLASH
+#define CONFIG_MTD_SPI_NOR
+#define CONFIG_MTD_M25P80
 #define FSL_QSPI_FLASH_SIZE		(1 << 24)
 #define FSL_QSPI_FLASH_NUM		2
 #define CONFIG_SYS_FSL_QSPI_LE
diff --git a/include/configs/rk3036_common.h b/include/configs/rk3036_common.h
index 368d046..4dcf1a1 100644
--- a/include/configs/rk3036_common.h
+++ b/include/configs/rk3036_common.h
@@ -66,7 +66,6 @@
 #define CONFIG_NR_DRAM_BANKS		1
 #define SDRAM_BANK_SIZE			(512UL << 20UL)
 
-#define CONFIG_SPI_FLASH
 #define CONFIG_SPI
 #define CONFIG_CMD_SF
 #define CONFIG_CMD_SPI
diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index 5322685..25af39d 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -86,7 +86,6 @@
 #define CONFIG_NR_DRAM_BANKS		1
 #define SDRAM_BANK_SIZE			(2UL << 30)
 
-#define CONFIG_SPI_FLASH
 #define CONFIG_SPI
 #define CONFIG_CMD_SF
 #define CONFIG_CMD_SPI
diff --git a/include/configs/sama5d2_xplained.h b/include/configs/sama5d2_xplained.h
index 272257e..aa29ed9 100644
--- a/include/configs/sama5d2_xplained.h
+++ b/include/configs/sama5d2_xplained.h
@@ -152,7 +152,8 @@
 
 #elif CONFIG_SYS_USE_SERIALFLASH
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000
 
diff --git a/include/configs/sama5d3xek.h b/include/configs/sama5d3xek.h
index bd5f4ee..02df0f2 100644
--- a/include/configs/sama5d3xek.h
+++ b/include/configs/sama5d3xek.h
@@ -206,7 +206,8 @@
 
 #elif CONFIG_SYS_USE_SERIALFLASH
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000
 
diff --git a/include/configs/sama5d4_xplained.h b/include/configs/sama5d4_xplained.h
index 52b4584..486e4e0 100644
--- a/include/configs/sama5d4_xplained.h
+++ b/include/configs/sama5d4_xplained.h
@@ -167,7 +167,8 @@
 
 #elif CONFIG_SYS_USE_SERIALFLASH
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000
 
diff --git a/include/configs/sama5d4ek.h b/include/configs/sama5d4ek.h
index ce96a7c..98368a7 100644
--- a/include/configs/sama5d4ek.h
+++ b/include/configs/sama5d4ek.h
@@ -165,7 +165,8 @@
 
 #elif CONFIG_SYS_USE_SERIALFLASH
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x8000
 
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 3a8b90e..b455918 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -158,7 +158,8 @@
 #define CONFIG_SPL_WATCHDOG_SUPPORT
 
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
 
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index b002260..ad18fed 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -378,7 +378,8 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
 
 /* SPL QSPI boot support */
 #ifdef CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x40000
 #endif
diff --git a/include/configs/taurus.h b/include/configs/taurus.h
index c1581d8..81b93a7 100644
--- a/include/configs/taurus.h
+++ b/include/configs/taurus.h
@@ -165,7 +165,8 @@
 /* SPL related */
 #undef CONFIG_SPL_OS_BOOT		/* Not supported by existing map */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
 
diff --git a/include/configs/tegra-common-usb-gadget.h b/include/configs/tegra-common-usb-gadget.h
index f6e1d5c..30e6f9c 100644
--- a/include/configs/tegra-common-usb-gadget.h
+++ b/include/configs/tegra-common-usb-gadget.h
@@ -36,7 +36,7 @@
 #ifdef CONFIG_MMC
 #define CONFIG_DFU_MMC
 #endif
-#ifdef CONFIG_SPI_FLASH
+#ifdef CONFIG_MTD_SPI_NOR
 #define CONFIG_DFU_SF
 #endif
 #define CONFIG_DFU_RAM
diff --git a/include/configs/theadorable.h b/include/configs/theadorable.h
index 9f186ad..b7529e8 100644
--- a/include/configs/theadorable.h
+++ b/include/configs/theadorable.h
@@ -156,7 +156,8 @@
 
 /* SPL related SPI defines */
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SPL_SPI_BUS		0
 #define CONFIG_SPL_SPI_CS		0
diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
index 6a3beac..c91bac6 100644
--- a/include/configs/ti_armv7_keystone2.h
+++ b/include/configs/ti_armv7_keystone2.h
@@ -52,7 +52,8 @@
 					CONFIG_SYS_SPL_MALLOC_SIZE + \
 					SPL_MALLOC_F_SIZE + \
 					CONFIG_SPL_STACK_SIZE - 4)
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	CONFIG_SPL_PAD_TO
diff --git a/include/configs/tseries.h b/include/configs/tseries.h
index 901dfd7..6de02bd 100644
--- a/include/configs/tseries.h
+++ b/include/configs/tseries.h
@@ -263,7 +263,8 @@ MMCARGS
 #define CONFIG_SF_DEFAULT_SPEED		24000000
 
 #define CONFIG_SPL_SPI_SUPPORT
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x20000
 #undef CONFIG_ENV_IS_NOWHERE
diff --git a/include/configs/zynq-common.h b/include/configs/zynq-common.h
index 77edbb8..3177297 100644
--- a/include/configs/zynq-common.h
+++ b/include/configs/zynq-common.h
@@ -341,7 +341,8 @@
 #ifdef CONFIG_ZYNQ_QSPI
 #define CONFIG_SPL_SPI_SUPPORT
 #define CONFIG_SPL_SPI_LOAD
-#define CONFIG_SPL_SPI_FLASH_SUPPORT
+#define CONFIG_SPL_SPI_NOR_SUPPORT
+#define CONFIG_SPL_MTD_SUPPORT
 #define CONFIG_SYS_SPI_U_BOOT_OFFS	0x100000
 #define CONFIG_SYS_SPI_ARGS_OFFS	0x200000
 #define CONFIG_SYS_SPI_ARGS_SIZE	0x80000
-- 
1.9.1



More information about the U-Boot mailing list