All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] NAND: Allow drivers to choose ECC block size
@ 2009-11-06 15:53 s-paulraj at ti.com
  2009-11-06 21:12 ` Scott Wood
  0 siblings, 1 reply; 3+ messages in thread
From: s-paulraj at ti.com @ 2009-11-06 15:53 UTC (permalink / raw)
  To: u-boot

From: Sandeep Paulraj <s-paulraj@ti.com>

This patch allows the NAND driver to choose ECC block size in
sw ecc case.

Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
---
This applies to u-boot-nand-flash/next
 drivers/mtd/nand/nand_base.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 9263a69..e62060d 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2842,7 +2842,8 @@ int nand_scan_tail(struct mtd_info *mtd)
 		chip->ecc.write_page = nand_write_page_swecc;
 		chip->ecc.read_oob = nand_read_oob_std;
 		chip->ecc.write_oob = nand_write_oob_std;
-		chip->ecc.size = 256;
+		if (!chip->ecc.size)
+			chip->ecc.size = 256;
 		chip->ecc.bytes = 3;
 		break;
 
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] NAND: Allow drivers to choose ECC block size
  2009-11-06 15:53 [U-Boot] [PATCH] NAND: Allow drivers to choose ECC block size s-paulraj at ti.com
@ 2009-11-06 21:12 ` Scott Wood
  2009-11-06 21:51   ` Paulraj, Sandeep
  0 siblings, 1 reply; 3+ messages in thread
From: Scott Wood @ 2009-11-06 21:12 UTC (permalink / raw)
  To: u-boot

On Fri, Nov 06, 2009 at 10:53:36AM -0500, s-paulraj at ti.com wrote:
> From: Sandeep Paulraj <s-paulraj@ti.com>
> 
> This patch allows the NAND driver to choose ECC block size in
> sw ecc case.
> 
> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
> ---
> This applies to u-boot-nand-flash/next
>  drivers/mtd/nand/nand_base.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 9263a69..e62060d 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -2842,7 +2842,8 @@ int nand_scan_tail(struct mtd_info *mtd)
>  		chip->ecc.write_page = nand_write_page_swecc;
>  		chip->ecc.read_oob = nand_read_oob_std;
>  		chip->ecc.write_oob = nand_write_oob_std;
> -		chip->ecc.size = 256;
> +		if (!chip->ecc.size)
> +			chip->ecc.size = 256;
>  		chip->ecc.bytes = 3;
>  		break;

For this to work, won't the driver have to also be able to override
ecc.calculate, or else nand_calculate_ecc need to be changed to support
other ECC block sizes?

-Scott

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH] NAND: Allow drivers to choose ECC block size
  2009-11-06 21:12 ` Scott Wood
@ 2009-11-06 21:51   ` Paulraj, Sandeep
  0 siblings, 0 replies; 3+ messages in thread
From: Paulraj, Sandeep @ 2009-11-06 21:51 UTC (permalink / raw)
  To: u-boot



> -----Original Message-----
> From: Scott Wood [mailto:scottwood at freescale.com]
> Sent: Friday, November 06, 2009 4:13 PM
> To: Paulraj, Sandeep
> Cc: u-boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH] NAND: Allow drivers to choose ECC block size
> 
> On Fri, Nov 06, 2009 at 10:53:36AM -0500, s-paulraj at ti.com wrote:
> > From: Sandeep Paulraj <s-paulraj@ti.com>
> >
> > This patch allows the NAND driver to choose ECC block size in
> > sw ecc case.
> >
> > Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
> > ---
> > This applies to u-boot-nand-flash/next
> >  drivers/mtd/nand/nand_base.c |    3 ++-
> >  1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> > index 9263a69..e62060d 100644
> > --- a/drivers/mtd/nand/nand_base.c
> > +++ b/drivers/mtd/nand/nand_base.c
> > @@ -2842,7 +2842,8 @@ int nand_scan_tail(struct mtd_info *mtd)
> >  		chip->ecc.write_page = nand_write_page_swecc;
> >  		chip->ecc.read_oob = nand_read_oob_std;
> >  		chip->ecc.write_oob = nand_write_oob_std;
> > -		chip->ecc.size = 256;
> > +		if (!chip->ecc.size)
> > +			chip->ecc.size = 256;
> >  		chip->ecc.bytes = 3;
> >  		break;
> 
> For this to work, won't the driver have to also be able to override
> ecc.calculate, or else nand_calculate_ecc need to be changed to support
> other ECC block sizes?
> 
> -Scott

I believe so

I think we need this

http://patchwork.ozlabs.org/patch/36357/

Sandeep

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-11-06 21:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-06 15:53 [U-Boot] [PATCH] NAND: Allow drivers to choose ECC block size s-paulraj at ti.com
2009-11-06 21:12 ` Scott Wood
2009-11-06 21:51   ` Paulraj, Sandeep

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.