Skip to contentSkip to conversation

mtd: Tighten some driver dependencies

PATCH In review Tom Rini 1 participant 2 messages Sep 26, 2025 – Dec 6, 2025

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 mtd: Tighten some driver dependencies

The ALTERA_QSPI driver conflicts with the regular FLASH_CFI_DRIVER as both implement the same high level functionality and so use the same global namespace. In a similar fashion, all NAND drivers are mutually exclusive due to namespace collisions. For the remaining drivers which did not already have some architecture specific dependency, add them.

---
Cc: Dario Binacchi <[email protected]>
Cc: Michael Trimarchi <[email protected]>

---
 drivers/mtd/Kconfig          | 2 +-
 drivers/mtd/nand/raw/Kconfig | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/mtd/Kconfig +1 -1
index 86752b5926de..21b8b21f6b22 100644
@@ -186,7 +186,7 @@ config FLASH_VERIFY
 
 config ALTERA_QSPI
 	bool "Altera Generic Quad SPI Controller"
-	depends on DM_MTD
+	depends on DM_MTD && !FLASH_CFI_DRIVER
 	select USE_SYS_MAX_FLASH_BANKS
 	help
 	  This enables access to Altera EPCQ/EPCS flash chips using the
drivers/mtd/nand/raw/Kconfig +2 -1
index f083113486ed..58ffa826d71b 100644
@@ -218,7 +218,7 @@ config NAND_DENALI_DT
 	bool "Support Denali NAND controller as a DT device"
 	select NAND_DENALI
 	select SPL_SYS_NAND_SELF_INIT
-	depends on OF_CONTROL && DM_MTD
+	depends on OF_CONTROL && DM_MTD && (ARCH_SOCFPGA || ARCH_UNIPHIER)
 	help
 	  Enable the driver for NAND flash on platforms using a Denali NAND
 	  controller as a DT device.
@@ -400,6 +400,7 @@ endif
 
 config NAND_VF610_NFC
 	bool "Support for Freescale NFC for VF610"
+	depends on ARCH_VF610
 	select SYS_NAND_SELF_INIT
 	select SYS_NAND_DRIVER_ECC_LAYOUT
 	imply CMD_NAND
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 8 lines · Tom Rini

The ALTERA_QSPI driver conflicts with the regular FLASH_CFI_DRIVER as both implement the same high level functionality and so use the same global namespace. In a similar fashion, all NAND drivers are mutually exclusive due to namespace collisions. For the remaining drivers which did not already have some architecture specific dependency, add them.

[...]

Applied to u-boot/next, thanks!

[1/1] mtd: Tighten some driver dependencies

      commit: 272e356b179fc68335298a6088f698bf034a4f55
Signature · 1 line
Tom