[U-Boot] [PATCH v2 22/24] cmd: make all MTD commands depend on MTD

Boris Brezillon boris.brezillon at bootlin.com
Wed Nov 28 23:59:42 UTC 2018


On Thu, 29 Nov 2018 00:07:58 +0100
Miquel Raynal <miquel.raynal at bootlin.com> wrote:

> Defconfigs have been fixed, now we can add proper dependencies in
> Kconfig.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
> ---
>  cmd/Kconfig         | 8 +++++++-
>  drivers/mtd/Kconfig | 1 +
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index e2973b3c51..717e814c56 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -868,6 +868,7 @@ config CMD_MMC_SWRITE
>  
>  config CMD_MTD
>  	bool "mtd"
> +	depends on MTD
>  	select MTD_PARTITIONS
>  	help
>  	  MTD commands support.
> @@ -875,6 +876,7 @@ config CMD_MTD
>  config CMD_NAND
>  	bool "nand"
>  	default y if NAND_SUNXI
> +	depends on MTD_RAW_NAND
>  	help
>  	  NAND support.
>  
> @@ -915,6 +917,7 @@ config CMD_MMC_SPI
>  
>  config CMD_ONENAND
>  	bool "onenand - access to onenand device"
> +	depends on MTD
>  	help
>  	  OneNAND is a brand of NAND ('Not AND' gate) flash which provides
>  	  various useful features. This command allows reading, writing,
> @@ -1014,9 +1017,11 @@ config CMD_SDRAM
>  
>  config CMD_SF
>  	bool "sf"
> +	depends on MTD

The SF cmd completely bypasses the MTD framework, so this one is not
needed (yet).

>  	help
>  	  SPI Flash support
>  
> +if CMD_SF
>  config CMD_SF_TEST
>  	bool "sf test - Allow testing of SPI flash"
>  	help
> @@ -1027,6 +1032,7 @@ config CMD_SF_TEST
>  	  Mbps (Million Bits Per Second). This value should approximately
>  	  equal the SPI bus speed for a single-bit-wide SPI bus, assuming
>  	  everything is working properly.
> +endif
>  
>  config CMD_SPI
>  	bool "sspi"
> @@ -1733,7 +1739,7 @@ config CMD_JFFS2
>  
>  config CMD_MTDPARTS
>  	bool "MTD partition support"
> -	select MTD_DEVICE if (CMD_NAND || NAND)
> +	depends on MTD
>  	help
>  	  MTD partitioning tool support.
>  	  It is strongly encouraged to avoid using this command
> diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
> index 345046c2a6..0832f5b411 100644
> --- a/drivers/mtd/Kconfig
> +++ b/drivers/mtd/Kconfig
> @@ -19,6 +19,7 @@ config DM_MTD
>  
>  config MTD_NOR_FLASH
>  	bool "Enable parallel NOR flash support"
> +	depends on MTD
>  	help
>  	  Enable support for parallel NOR flash.
>  



More information about the U-Boot mailing list