NAND-Flash ECC data not used

Thomas Gleixner tglx at linutronix.de
Tue Jul 8 06:42:54 EDT 2003


On Tuesday 08 July 2003 10:01, Juergen Beisert wrote:
> Hello all,
>
> I have tried to use a 16MiB NAND flash in my application. It seems to work,
> but it also seem that the driver is not using the ECC data. I have derived
> my small driver from the spia.c source and have added the line
>
> this->eccmode=NAND_ECC_SOFT;
>
> before calling nand_scan(). nand_scan() inserts the ECC check routines
> correctly in the structure. But later, if the jffs2 calls the driver to
> read data from flash, it calls nand_read_ecc() with parameter oobsel = 0.
> So the line
>
> int	eccmode = oobsel ? this->eccmode : NAND_ECC_NONE;
>
> in nand_read_ecc() switches back to NONE ecc mode while reading.

Have you enabled CONFIG_JFFS2_NAND ?

This happens on boot up too, if you have not given the fs type in the 
commandline and the kernel tries to mount the partition with ext2 first.
It should not happen with jffs2.
-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx at linutronix.de




More information about the linux-mtd mailing list