Re: [RFC PATCH 02/27] mtd: nand: Compile in the NAND core by default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 21 Feb 2019 11:01:51 +0100
Miquel Raynal <miquel.raynal@xxxxxxxxxxx> wrote:

> Force the NAND core be compiled-in when using any kind of NAND.

Why?

> 
> Also remove the redundant dependencies on MTD which is enforced by the
> game of the if/endif blocs.
> 
> Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx>
> ---
>  drivers/mtd/nand/Kconfig         | 12 ++++++++++--
>  drivers/mtd/nand/onenand/Kconfig |  1 -
>  drivers/mtd/nand/raw/Kconfig     |  1 -
>  drivers/mtd/nand/spi/Kconfig     |  1 -
>  4 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 495751ed3fd7..e8d26a715922 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -1,6 +1,14 @@
> -config MTD_NAND_CORE
> -	tristate
> +menuconfig MTD_NAND_CORE
> +	tristate "NAND"

Definitely not something we want to expose in menuconfig.

> +	default y

I don't see what's the problem with letting SPINAND, RAWNAND and
ONENAND select this options if they actually need it.

> +	help
> +	  Embed the NAND core. This is the generic part between raw
> +	  NAND, SPI NAND and Onenand.
> +
> +if MTD_NAND_CORE
>  
>  source "drivers/mtd/nand/onenand/Kconfig"
>  source "drivers/mtd/nand/raw/Kconfig"
>  source "drivers/mtd/nand/spi/Kconfig"
> +
> +endif
> diff --git a/drivers/mtd/nand/onenand/Kconfig b/drivers/mtd/nand/onenand/Kconfig
> index 9dc15748947b..c168f3b4b296 100644
> --- a/drivers/mtd/nand/onenand/Kconfig
> +++ b/drivers/mtd/nand/onenand/Kconfig
> @@ -1,6 +1,5 @@
>  menuconfig MTD_ONENAND
>  	tristate "OneNAND Device Support"
> -	depends on MTD
>  	depends on HAS_IOMEM
>  	help
>  	  This enables support for accessing all type of OneNAND flash
> diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
> index 510a6b32820d..ebb8a3da9fa5 100644
> --- a/drivers/mtd/nand/raw/Kconfig
> +++ b/drivers/mtd/nand/raw/Kconfig
> @@ -11,7 +11,6 @@ config MTD_NAND_ECC_SW_HAMMING_SMC
>  
>  menuconfig MTD_RAW_NAND
>  	tristate "Raw/Parallel NAND Device Support"
> -	depends on MTD
>  	select MTD_NAND_ECC_SW_HAMMING
>  	help
>  	  This enables support for accessing all type of raw/parallel
> diff --git a/drivers/mtd/nand/spi/Kconfig b/drivers/mtd/nand/spi/Kconfig
> index 7c37d2929b68..7631050610ab 100644
> --- a/drivers/mtd/nand/spi/Kconfig
> +++ b/drivers/mtd/nand/spi/Kconfig
> @@ -1,6 +1,5 @@
>  menuconfig MTD_SPI_NAND
>  	tristate "SPI NAND device Support"
> -	select MTD_NAND_CORE
>  	depends on SPI_MASTER
>  	select SPI_MEM
>  	help


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux