[PATCH 1/5] mtd: nand: remove NAND_ATMEL_PMECC

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Tue Aug 5 21:08:53 PDT 2014


On 11:14 Tue 05 Aug     , Rapha??l Poggi wrote:
> By removing this CONFIG_, we can use a structure member to retrieve the config,
> either through the plateform data or through the device tree. So we can handle cases
> when the driver is probed using device tree or not.
NACK

this is use to reduce barebox size

keep the NAND_ATMEL_PMECC

so we choose to enable it or not

Best Regards,
J.
> 
> Signed-off-by: Raphaël Poggi <poggi.raph at gmail.com>
> ---
>  arch/arm/mach-at91/include/mach/board.h |    1 +
>  drivers/mtd/nand/Kconfig                |    8 --------
>  drivers/mtd/nand/atmel_nand.c           |    2 +-
>  3 files changed, 2 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
> index aa0fdae..e2307ed 100644
> --- a/arch/arm/mach-at91/include/mach/board.h
> +++ b/arch/arm/mach-at91/include/mach/board.h
> @@ -63,6 +63,7 @@ struct atmel_nand_data {
>  	u8		bus_width_16;	/* buswidth is 16 bit */
>  	u8		ecc_mode;	/* NAND_ECC_* */
>  	u8		on_flash_bbt;	/* Use flash based bbt */
> +	u8		has_pmecc;	/* Use PMECC */
>  	u8		bus_on_d0;
>  
>  	u8		pmecc_corr_cap;
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 04fe3c8..d49eae3 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -95,14 +95,6 @@ config NAND_ATMEL
>  	prompt "Atmel (AT91SAM9xxx) NAND driver"
>  	depends on ARCH_AT91
>  
> -config NAND_ATMEL_PMECC
> -	bool
> -	prompt "PMECC support"
> -	depends on NAND_ATMEL
> -	select NAND_ECC_HW
> -	help
> -	  Support for PMECC present on the SoC sam9x5 and sam9n12
> -
>  config NAND_S3C24XX
>  	bool
>  	prompt "Samsung S3C24XX NAND driver"
> diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
> index 337e225..3ec6450 100644
> --- a/drivers/mtd/nand/atmel_nand.c
> +++ b/drivers/mtd/nand/atmel_nand.c
> @@ -1219,7 +1219,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
>  
>  	if (IS_ENABLED(CONFIG_NAND_ECC_HW) &&
>  	    nand_chip->ecc.mode == NAND_ECC_HW) {
> -		if (IS_ENABLED(CONFIG_NAND_ATMEL_PMECC))
> +		if (pdata->has_pmecc)
>  			res = atmel_pmecc_nand_init_params(dev, host);
>  		else
>  			res = atmel_hw_nand_init_params(dev, host);
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox



More information about the barebox mailing list