Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-21 Thread Sean MacLennan
On Fri, 21 Aug 2009 10:47:09 +0530 vimal singh vimal.neww...@gmail.com wrote: Just one question: did you enabled MTD_NAND_ECC_SMC in configs? It is automagically selected when you select the NDFC driver. Cheers, Sean ___ U-Boot mailing list

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-21 Thread Stefan Roese
On Friday 21 August 2009 07:17:09 vimal singh wrote: diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 89bf85a..497e175 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -101,9 +101,8 @@ static int ndfc_calculate_ecc(struct mtd_info *mtd,

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-21 Thread Victor Gallardo
Hi Vimal, With the current ndfc code, the error correction gets the bits wrong. Switching it back to the original way and the correction is correct. diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 89bf85a..497e175 100644 --- a/drivers/mtd/nand/ndfc.c +++

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-21 Thread Stefan Roese
Hi Feng, On Friday 21 August 2009 01:42:42 Feng Kan wrote: We had a board with high number of correctable ECC errors. Which crashed the jffs when it was miss correcting the wrong byte location. OK, thanks. Do you want me to submit a patch for this, or do you prefer to do it. Sure, please

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-20 Thread Sean MacLennan
On Thu, 20 Aug 2009 07:01:21 +0200 Stefan Roese s...@denx.de wrote: On Thursday 20 August 2009 06:38:51 Sean MacLennan wrote: I see other boards using SMC as well, can someone comment on the change I am proposing. Should I change the correction algorithm or the calculate function? If

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-20 Thread Victor Gallardo
@lists.ozlabs.org] On Behalf Of Sean MacLennan Sent: Thursday, August 20, 2009 12:37 PM To: Stefan Roese Cc: u-boot@lists.denx.de; Feng Kan; linux-...@lists.infradead.org; linuxppc-...@ozlabs.org Subject: Re: [U-Boot] NAND ECC Error with wrong SMC ording bug On Thu, 20 Aug 2009 07:01:21 +0200

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-20 Thread Feng Kan
Hi Stefan: We had a board with high number of correctable ECC errors. Which crashed the jffs when it was miss correcting the wrong byte location. Do you want me to submit a patch for this, or do you prefer to do it. I am submitting a patch for linux right now. Feng Kan AMCC Software On

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-20 Thread vimal singh
snip With the current ndfc code, the error correction gets the bits wrong. Switching it back to the original way and the correction is correct. diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 89bf85a..497e175 100644 --- a/drivers/mtd/nand/ndfc.c +++

[U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-19 Thread Feng Kan
Hi All: It seems that the ECC correction is broken on the Linux with the 4xx NDFC driver. It uses the SMC order when reading the ECC code. 2-1-3 static int ndfc_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code) { struct

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-19 Thread Sean MacLennan
On Wed, 19 Aug 2009 16:16:54 -0700 Feng Kan f...@amcc.com wrote: I see other boards using SMC as well, can someone comment on the change I am proposing. Should I change the correction algorithm or the calculate function? If the later is preferred it would mean the change must be pushed in

Re: [U-Boot] NAND ECC Error with wrong SMC ording bug

2009-08-19 Thread Stefan Roese
On Thursday 20 August 2009 06:38:51 Sean MacLennan wrote: I see other boards using SMC as well, can someone comment on the change I am proposing. Should I change the correction algorithm or the calculate function? If the later is preferred it would mean the change must be pushed in both