4bit NAND ECC

Nicolas Pitre nico at fluxnic.net
Fri Dec 18 14:47:46 EST 2009


On Thu, 17 Dec 2009, Dennis Millard wrote:

> Anyone who has worked with NAND ECC support, I have a question-
> 
>    I have a platform running the 2.6.30 kernel based on the Marvell 88F6281.
> It has 512 MB NAND flash, and is very similar to the Marvell Sheevaplug
> reference design.  My Uboot is using 4bit NAND ECC to write the kernel and
> ramdisk to flash.  However, I recently discovered that the 2.6.30 kernel does
> not support 4bit ECC mode.  When I try to access the Uboot environment
> variables from the running kernel, I can only use 1bit ECC.  When I switch
> Uboot to use 1bit ECC, I get lots of errors while accessing the Uboot vars in
> flash.  I've been told that I really should be using 4bit ECC in Uboot.
> 
>    I noticed that the 2.6.32 kernel supports 4bit ECC, but it appears to be
> only for the TI DaVinci CPU.  Can someone confirm this?  Does this mean that
> 4bit ECC is not available for general use in the 2.6.32 kernel?  Does anyone
> know of a patch that would make it available for the Marvell 88F6281?

The Davinci 4-bit ECC support is about hardware ECC.

I'm sitting on software 4-bit ECC code that I still have to integrate 
with the MTD code at some point.

And you should really avoid using flash for ramdisks.  Better use 
JFFS2 or UBIFS directly rather than using a ramdisk.


Nicolas



More information about the linux-mtd mailing list