HW ECC correction error on LB60.

ZhangJieJing kzjeef at gmail.com
Tue Sep 15 11:22:02 EDT 2009


Hi Everyone,

I found that my board(LB60) have ECC error with NAND flash, kernel will
continue dumping message like [1] forever.

After trace this error code, I found that was print by jz nand
driver([2]:174),  jz nand driver default use Hardware nand ECC, in([2]:308).
I fix this problem just replace HW ECC by SW ECC[3], So, I think we maybe we
don't set corrent HW parameter to the controller.

maybe someone can check it.
I suggest before this the right HW parameter found, we can just use SW ECC,
It's also fast enough for me.

[1]:
uncorrectable ecc: 0xd 0x2e 0xfc 0xff 0xff 0xff 0xff 0xff
0xff
uncorrectable data: 0xfb 0x97 0x46 0x73 0x7f 0x9b 0x3 0xf9 0x6a 0xff 0x96
0xf7 e

[2]:
http://projects.qi-hardware.com/index.php/p/openwrt-xburst/source/tree/xburst/target/linux/xburst/files-2.6.31/drivers/mtd/nand/jz4740_nand.c

[3]:
# based on openwrt, xburst branch on projects.qi-hardware.com

diff --git a/target/linux/xburst/files-2.6.31/drivers/mtd/nand/jz4740_nand.c
b/target/linux/xburst/files-2.6.31/drivers/mtd/nand/jz4740_nand.c
index 7b378c0..1e53852 100644
--- a/target/linux/xburst/files-2.6.31/drivers/mtd/nand/jz4740_nand.c
+++ b/target/linux/xburst/files-2.6.31/drivers/mtd/nand/jz4740_nand.c
@@ -305,7 +305,9 @@ static int __devinit jz_nand_probe(struct
platform_device *pdev)

     chip->ecc.calculate    = jz_nand_calculate_ecc_rs;
     chip->ecc.correct    = jz_nand_correct_ecc_rs;
-    chip->ecc.mode        = NAND_ECC_HW;
+    /* chip->ecc.mode        = NAND_ECC_HW; */
+    /* FIXME: jz's HW ECC correction dump too many, use a soft ecc
+        * instead  */
     chip->ecc.size        = 512;
     chip->ecc.bytes        = 9;
     if (pdata)





---
Best regards,
Zhang Jiejing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20090915/dbddb4d0/attachment.htm>


More information about the discussion mailing list


interactive