From: Tom Rini Date: Fri, 11 Jul 2025 15:16:04 +0000 (-0600) Subject: mtd: Tighten some mtd driver dependencies X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=178d18862af33072c0791ec05241402bdb49cd1e;p=thirdparty%2Fu-boot.git mtd: Tighten some mtd driver dependencies 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 Signed-off-by: Michael Trimarchi --- diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index e76601a5545..e505f797949 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -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" diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig index 9c8a32bb0a8..3059b00662b 100644 --- a/drivers/mtd/nand/raw/Kconfig +++ b/drivers/mtd/nand/raw/Kconfig @@ -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