Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380497

Re: [PATCH 03/12] avr32: set Atmel NAND ECC algorithm explicitly

From Boris Brezillon <boris.brezillon@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH 03/12] avr32: set Atmel NAND ECC algorithm explicitly
Date 2016-04-16 09:40 +0200
Message-ID <rosZI-8lb-13@gated-at.bofh.it> (permalink)
References <roi4i-8kL-5@gated-at.bofh.it> <roi4i-8kL-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 15 Apr 2016 21:54:03 +0200
Rafał Miłecki <zajec5@gmail.com> wrote:

> This is part of process deprecating NAND_ECC_SOFT_BCH (and switching to
> enum nand_ecc_algo).

Not sure we really need to add this ->ecc_algo field: none of the
existing AVR32 boards use software BCH implementation, and I don't
expect to see new AVR32 boards :-). How about setting NAND_ECC_HAMMING
when ecc_mode == NAND_ECC_SOFT directly in the atmel_nand driver?

> 
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
>  arch/avr32/boards/atngw100/setup.c      | 1 +
>  arch/avr32/boards/atstk1000/atstk1002.c | 1 +
>  include/linux/platform_data/atmel.h     | 1 +
>  3 files changed, 3 insertions(+)
> 
> diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
> index afeae89..b059b97 100644
> --- a/arch/avr32/boards/atngw100/setup.c
> +++ b/arch/avr32/boards/atngw100/setup.c
> @@ -98,6 +98,7 @@ static struct atmel_nand_data atngw100mkii_nand_data __initdata = {
>  	.enable_pin	= GPIO_PIN_PE(23),
>  	.bus_width_16	= true,
>  	.ecc_mode	= NAND_ECC_SOFT,
> +	.ecc_algo	= NAND_ECC_HAMMING,
>  	.parts		= nand_partitions,
>  	.num_parts	= ARRAY_SIZE(nand_partitions),
>  };
> diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
> index 6c80aba..6b45faf 100644
> --- a/arch/avr32/boards/atstk1000/atstk1002.c
> +++ b/arch/avr32/boards/atstk1000/atstk1002.c
> @@ -96,6 +96,7 @@ static struct atmel_nand_data atstk1006_nand_data __initdata = {
>  	.rdy_pin	= GPIO_PIN_PB(30),
>  	.enable_pin	= GPIO_PIN_PB(29),
>  	.ecc_mode	= NAND_ECC_SOFT,
> +	.ecc_algo	= NAND_ECC_HAMMING,
>  	.parts		= nand_partitions,
>  	.num_parts	= ARRAY_SIZE(nand_partitions),
>  };
> diff --git a/include/linux/platform_data/atmel.h b/include/linux/platform_data/atmel.h
> index 3c8825b..a283b3d 100644
> --- a/include/linux/platform_data/atmel.h
> +++ b/include/linux/platform_data/atmel.h
> @@ -33,6 +33,7 @@ struct atmel_nand_data {
>  	u8		cle;			/* address line number connected to CLE */
>  	u8		bus_width_16;		/* buswidth is 16 bit */
>  	u8		ecc_mode;		/* ecc mode */
> +	enum nand_ecc_algo ecc_algo;		/* ecc algorithm */
>  	u8		on_flash_bbt;		/* bbt on flash */
>  	struct mtd_partition *parts;
>  	unsigned int	num_parts;



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 03/12] avr32: set Atmel NAND ECC algorithm explicitly Rafał Miłecki <zajec5@gmail.com> - 2016-04-15 22:00 +0200
  Re: [PATCH 03/12] avr32: set Atmel NAND ECC algorithm explicitly Boris Brezillon <boris.brezillon@free-electrons.com> - 2016-04-16 09:40 +0200
  Re: [PATCH 03/12] avr32: set Atmel NAND ECC algorithm explicitly Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> - 2016-04-16 15:00 +0200

csiph-web