]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mtd: Tighten some mtd driver dependencies
authorTom Rini <trini@konsulko.com>
Fri, 11 Jul 2025 15:16:04 +0000 (09:16 -0600)
committerMichael Trimarchi <michael@amarulasolutions.com>
Thu, 9 Oct 2025 18:57:21 +0000 (20:57 +0200)
A large number of mtd drivers cannot build without access to some
platform specific header files. Express those requirements in Kconfig as
well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
drivers/mtd/Kconfig
drivers/mtd/nand/raw/Kconfig

index e76601a55454cdee11c5f383c305ccbb6afc32ec..e505f797949836fb25c2abae3f4058505c8d8438 100644 (file)
@@ -222,6 +222,7 @@ config SYS_MAX_FLASH_SECT
 
 config SAMSUNG_ONENAND
        bool "Samsung OneNAND driver support"
+       depends on S5P
 
 config USE_SYS_MAX_FLASH_BANKS
        bool "Enable Max number of Flash memory banks"
index 9c8a32bb0a89ab12eac9bb59ae9c14cd2f738fa6..3059b00662be6e4d359eeb36a5330c66970761d0 100644 (file)
@@ -50,6 +50,7 @@ config SYS_NAND_NO_SUBPAGE_WRITE
 
 config DM_NAND_ATMEL
        bool "Support Atmel NAND controller with DM support"
+       depends on ARCH_AT91
        select SYS_NAND_SELF_INIT
        imply SYS_NAND_USE_FLASH_BBT
        help
@@ -58,6 +59,7 @@ config DM_NAND_ATMEL
 
 config NAND_ATMEL
        bool "Support Atmel NAND controller"
+       depends on ARCH_AT91
        select SYS_NAND_SELF_INIT
        imply SYS_NAND_USE_FLASH_BBT
        help
@@ -115,6 +117,7 @@ endif
 config NAND_BRCMNAND
        bool "Support Broadcom NAND controller"
        depends on OF_CONTROL && DM && DM_MTD
+       depends on ARCH_BCMBCA || ARCH_BMIPS || TARGET_BCMNS || TARGET_BCMNS3
        select SYS_NAND_SELF_INIT
        help
          Enable the driver for NAND flash on platforms using a Broadcom NAND
@@ -148,6 +151,7 @@ config NAND_BRCMNAND_IPROC
 
 config NAND_DAVINCI
        bool "Support TI Davinci NAND controller"
+       depends on ARCH_DAVINCI || ARCH_KEYSTONE
        select SYS_NAND_SELF_INIT if TARGET_DA850EVM
        help
          Enable this driver for NAND flash controllers available in TI Davinci
@@ -192,7 +196,7 @@ config SPL_NAND_LOAD
 
 config NAND_CADENCE
        bool "Support Cadence NAND controller as a DT device"
-       depends on OF_CONTROL && DM_MTD
+       depends on OF_CONTROL && DM_MTD && ARCH_SOCFPGA
        select SYS_NAND_SELF_INIT
        select SPL_SYS_NAND_SELF_INIT
        select SPL_NAND_BASE
@@ -234,6 +238,7 @@ config NAND_FSL_ELBC_DT
 
 config NAND_FSL_IFC
        bool "Support Freescale Integrated Flash Controller NAND driver"
+       depends on ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3 || PPC
        select TPL_SYS_NAND_SELF_INIT if TPL_NAND_SUPPORT
        select TPL_NAND_INIT if TPL && !TPL_FRAMEWORK
        select SPL_SYS_NAND_SELF_INIT
@@ -257,13 +262,14 @@ config NAND_KMETER1
 
 config NAND_LPC32XX_MLC
        bool "Support LPC32XX_MLC controller"
+       depends on ARCH_LPC32XX
        select SYS_NAND_SELF_INIT
        help
          Enable the LPC32XX MLC NAND controller.
 
 config NAND_OMAP_GPMC
        bool "Support OMAP GPMC NAND controller"
-       depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || ARCH_K3
+       depends on ARCH_OMAP2PLUS || ARCH_K3
        select SYS_NAND_SELF_INIT if ARCH_K3
        select SPL_NAND_INIT if ARCH_K3
        select SPL_SYS_NAND_SELF_INIT if ARCH_K3
@@ -431,6 +437,7 @@ endif
 
 config NAND_PXA3XX
        bool "Support for NAND on PXA3xx and Armada 370/XP/38x"
+       depends on ARCH_MVEBU
        select SYS_NAND_SELF_INIT
        select DM_MTD
        select REGMAP
@@ -490,7 +497,7 @@ endif
 config NAND_ARASAN
        bool "Configure Arasan Nand"
        select SYS_NAND_SELF_INIT
-       depends on DM_MTD
+       depends on DM_MTD && ARCH_ZYNQMP
        imply CMD_NAND
        help
          This enables Nand driver support for Arasan nand flash
@@ -553,6 +560,7 @@ endif
 
 config NAND_ZYNQ
        bool "Support for Zynq Nand controller"
+       depends on ARCH_ZYNQ
        select SPL_SYS_NAND_SELF_INIT
        select SYS_NAND_SELF_INIT
        select DM_MTD