Patchwork [U-Boot] kirkwood_nand: allow usage of NAND_ECC_SOFT_BCH

login
register
mail settings
Submitter Holger Brunck
Date Jan. 16, 2013, 8:34 a.m.
Message ID <1358325268-27092-1-git-send-email-holger.brunck@keymile.com>
Download mbox | patch
Permalink /patch/212438/
State Accepted
Delegated to: Prafulla Wadaskar
Headers show

Comments

Holger Brunck - Jan. 16, 2013, 8:34 a.m.
From: Gerlando Falauto <gerlando.falauto@keymile.com>

If CONFIG_NAND_ECC_BCH is set use 4-bit error correction code instead of
the 1-bit error correction code on the NAND device.

Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
---
 drivers/mtd/nand/kirkwood_nand.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Prafulla Wadaskar - Feb. 11, 2013, 3:39 a.m.
> -----Original Message-----
> From: Holger Brunck [mailto:holger.brunck@keymile.com]
> Sent: 16 January 2013 14:04
> To: u-boot@lists.denx.de
> Cc: Gerlando Falauto; Holger Brunck; Valentin Longchamp; Prafulla
> Wadaskar
> Subject: [PATCH] kirkwood_nand: allow usage of NAND_ECC_SOFT_BCH
> 
> From: Gerlando Falauto <gerlando.falauto@keymile.com>
> 
> If CONFIG_NAND_ECC_BCH is set use 4-bit error correction code instead
> of
> the 1-bit error correction code on the NAND device.
> 
> Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> cc: Prafulla Wadaskar <prafulla@marvell.com>
> ---
>  drivers/mtd/nand/kirkwood_nand.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/mtd/nand/kirkwood_nand.c
> b/drivers/mtd/nand/kirkwood_nand.c
> index bdab5aa..0a99a10 100644
> --- a/drivers/mtd/nand/kirkwood_nand.c
> +++ b/drivers/mtd/nand/kirkwood_nand.c
> @@ -74,7 +74,11 @@ void kw_nand_select_chip(struct mtd_info *mtd, int
> chip)
>  int board_nand_init(struct nand_chip *nand)
>  {
>  	nand->options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING;
> +#if defined(CONFIG_NAND_ECC_BCH)
> +	nand->ecc.mode = NAND_ECC_SOFT_BCH;
> +#else
>  	nand->ecc.mode = NAND_ECC_SOFT;
> +#endif
>  	nand->cmd_ctrl = kw_nand_hwcontrol;
>  	nand->chip_delay = 40;
>  	nand->select_chip = kw_nand_select_chip;

Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
Will pull this latter.

Regards...
Prafulla . . .

> --
> 1.7.1
Scott Wood - Feb. 11, 2013, 7:25 p.m.
On 02/10/2013 09:39:08 PM, Prafulla Wadaskar wrote:
> 
> 
> > -----Original Message-----
> > From: Holger Brunck [mailto:holger.brunck@keymile.com]
> > Sent: 16 January 2013 14:04
> > To: u-boot@lists.denx.de
> > Cc: Gerlando Falauto; Holger Brunck; Valentin Longchamp; Prafulla
> > Wadaskar
> > Subject: [PATCH] kirkwood_nand: allow usage of NAND_ECC_SOFT_BCH
> >
> > From: Gerlando Falauto <gerlando.falauto@keymile.com>
> >
> > If CONFIG_NAND_ECC_BCH is set use 4-bit error correction code  
> instead
> > of
> > the 1-bit error correction code on the NAND device.
> >
> > Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
> > Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> > cc: Valentin Longchamp <valentin.longchamp@keymile.com>
> > cc: Prafulla Wadaskar <prafulla@marvell.com>
> > ---
> >  drivers/mtd/nand/kirkwood_nand.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/kirkwood_nand.c
> > b/drivers/mtd/nand/kirkwood_nand.c
> > index bdab5aa..0a99a10 100644
> > --- a/drivers/mtd/nand/kirkwood_nand.c
> > +++ b/drivers/mtd/nand/kirkwood_nand.c
> > @@ -74,7 +74,11 @@ void kw_nand_select_chip(struct mtd_info *mtd,  
> int
> > chip)
> >  int board_nand_init(struct nand_chip *nand)
> >  {
> >  	nand->options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING;
> > +#if defined(CONFIG_NAND_ECC_BCH)
> > +	nand->ecc.mode = NAND_ECC_SOFT_BCH;
> > +#else
> >  	nand->ecc.mode = NAND_ECC_SOFT;
> > +#endif
> >  	nand->cmd_ctrl = kw_nand_hwcontrol;
> >  	nand->chip_delay = 40;
> >  	nand->select_chip = kw_nand_select_chip;
> 
> Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
> Will pull this latter.

Acked-by: Scott Wood <scottwood@freescale.com>

-Scott
Gerlando Falauto - April 8, 2013, 8:42 a.m.
Hi Prafulla,

could you please pull these before we hit 2013.04?

Namely:
http://patchwork.ozlabs.org/patch/212438/
http://patchwork.ozlabs.org/patch/212441/
http://patchwork.ozlabs.org/patch/212439/
http://patchwork.ozlabs.org/patch/212440/

Thanks!
Gerlando

On 02/11/2013 04:39 AM, Prafulla Wadaskar wrote:
>
>
>> -----Original Message-----
>> From: Holger Brunck [mailto:holger.brunck@keymile.com]
>> Sent: 16 January 2013 14:04
>> To: u-boot@lists.denx.de
>> Cc: Gerlando Falauto; Holger Brunck; Valentin Longchamp; Prafulla
>> Wadaskar
>> Subject: [PATCH] kirkwood_nand: allow usage of NAND_ECC_SOFT_BCH
>>
>> From: Gerlando Falauto <gerlando.falauto@keymile.com>
>>
>> If CONFIG_NAND_ECC_BCH is set use 4-bit error correction code instead
>> of
>> the 1-bit error correction code on the NAND device.
>>
>> Signed-off-by: Gerlando Falauto <gerlando.falauto@keymile.com>
>> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
>> cc: Valentin Longchamp <valentin.longchamp@keymile.com>
>> cc: Prafulla Wadaskar <prafulla@marvell.com>
>> ---
>>   drivers/mtd/nand/kirkwood_nand.c |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/mtd/nand/kirkwood_nand.c
>> b/drivers/mtd/nand/kirkwood_nand.c
>> index bdab5aa..0a99a10 100644
>> --- a/drivers/mtd/nand/kirkwood_nand.c
>> +++ b/drivers/mtd/nand/kirkwood_nand.c
>> @@ -74,7 +74,11 @@ void kw_nand_select_chip(struct mtd_info *mtd, int
>> chip)
>>   int board_nand_init(struct nand_chip *nand)
>>   {
>>   	nand->options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING;
>> +#if defined(CONFIG_NAND_ECC_BCH)
>> +	nand->ecc.mode = NAND_ECC_SOFT_BCH;
>> +#else
>>   	nand->ecc.mode = NAND_ECC_SOFT;
>> +#endif
>>   	nand->cmd_ctrl = kw_nand_hwcontrol;
>>   	nand->chip_delay = 40;
>>   	nand->select_chip = kw_nand_select_chip;
>
> Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
> Will pull this latter.
>
> Regards...
> Prafulla . . .
>
>> --
>> 1.7.1
>
Prafulla Wadaskar - April 8, 2013, 8:46 a.m.
Sure, I will check and do the needful, thanks.

Regards...
Prafulla . . .

> -----Original Message-----
> From: Gerlando Falauto
> [mailto:gerlando.falauto@keymile.com]
> Sent: 08 April 2013 14:12
> To: Prafulla Wadaskar
> Cc: Brunck, Holger; u-boot@lists.denx.de; Longchamp,
> Valentin
> Subject: Re: [PATCH] kirkwood_nand: allow usage of
> NAND_ECC_SOFT_BCH
> 
> Hi Prafulla,
> 
> could you please pull these before we hit 2013.04?
> 
> Namely:
> http://patchwork.ozlabs.org/patch/212438/
> http://patchwork.ozlabs.org/patch/212441/
> http://patchwork.ozlabs.org/patch/212439/
> http://patchwork.ozlabs.org/patch/212440/
> 
> Thanks!
> Gerlando
> 
> On 02/11/2013 04:39 AM, Prafulla Wadaskar wrote:
> >
> >
> >> -----Original Message-----
> >> From: Holger Brunck
> [mailto:holger.brunck@keymile.com]
> >> Sent: 16 January 2013 14:04
> >> To: u-boot@lists.denx.de
> >> Cc: Gerlando Falauto; Holger Brunck; Valentin
> Longchamp; Prafulla
> >> Wadaskar
> >> Subject: [PATCH] kirkwood_nand: allow usage of
> NAND_ECC_SOFT_BCH
> >>
> >> From: Gerlando Falauto
> <gerlando.falauto@keymile.com>
> >>
> >> If CONFIG_NAND_ECC_BCH is set use 4-bit error
> correction code instead
> >> of
> >> the 1-bit error correction code on the NAND device.
> >>
> >> Signed-off-by: Gerlando Falauto
> <gerlando.falauto@keymile.com>
> >> Signed-off-by: Holger Brunck
> <holger.brunck@keymile.com>
> >> cc: Valentin Longchamp
> <valentin.longchamp@keymile.com>
> >> cc: Prafulla Wadaskar <prafulla@marvell.com>
> >> ---
> >>   drivers/mtd/nand/kirkwood_nand.c |    4 ++++
> >>   1 files changed, 4 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/drivers/mtd/nand/kirkwood_nand.c
> >> b/drivers/mtd/nand/kirkwood_nand.c
> >> index bdab5aa..0a99a10 100644
> >> --- a/drivers/mtd/nand/kirkwood_nand.c
> >> +++ b/drivers/mtd/nand/kirkwood_nand.c
> >> @@ -74,7 +74,11 @@ void kw_nand_select_chip(struct
> mtd_info *mtd, int
> >> chip)
> >>   int board_nand_init(struct nand_chip *nand)
> >>   {
> >>   	nand->options = NAND_COPYBACK | NAND_CACHEPRG |
> NAND_NO_PADDING;
> >> +#if defined(CONFIG_NAND_ECC_BCH)
> >> +	nand->ecc.mode = NAND_ECC_SOFT_BCH;
> >> +#else
> >>   	nand->ecc.mode = NAND_ECC_SOFT;
> >> +#endif
> >>   	nand->cmd_ctrl = kw_nand_hwcontrol;
> >>   	nand->chip_delay = 40;
> >>   	nand->select_chip = kw_nand_select_chip;
> >
> > Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
> > Will pull this latter.
> >
> > Regards...
> > Prafulla . . .
> >
> >> --
> >> 1.7.1
> >

Patch

diff --git a/drivers/mtd/nand/kirkwood_nand.c b/drivers/mtd/nand/kirkwood_nand.c
index bdab5aa..0a99a10 100644
--- a/drivers/mtd/nand/kirkwood_nand.c
+++ b/drivers/mtd/nand/kirkwood_nand.c
@@ -74,7 +74,11 @@  void kw_nand_select_chip(struct mtd_info *mtd, int chip)
 int board_nand_init(struct nand_chip *nand)
 {
 	nand->options = NAND_COPYBACK | NAND_CACHEPRG | NAND_NO_PADDING;
+#if defined(CONFIG_NAND_ECC_BCH)
+	nand->ecc.mode = NAND_ECC_SOFT_BCH;
+#else
 	nand->ecc.mode = NAND_ECC_SOFT;
+#endif
 	nand->cmd_ctrl = kw_nand_hwcontrol;
 	nand->chip_delay = 40;
 	nand->select_chip = kw_nand_select_chip;