[PATCH V4 1/2] Nand driver for Nomadik 8815 SoC (on NHK8815 board)

Alessandro Rubini rubini-list at gnudd.com
Thu Jul 23 05:07:30 EDT 2009


>> 'nand_calculate_ecc' and 'nand_correct_data' (nand_ecc.c) do it in SW.
>> This need not to be re-do.
> 
> When I initially tried soft ecc it didn't work, so I thought ours was
> a different algorithm. Most likely I was wrong, I'll recheck ASAP.

It's slightly different. This is what I get (old is nand_calculate_ecc(), new is mine).

   old: 65 56 55
   new: 56 65 55

   old: 33 fc 0c
   new: fc 33 0c

   old: c0 c0 3c
   new: c0 c0 3c

   old: c3 3f cf
   new: 3f c3 cf

   old: c0 0f 30
   new: 0f c0 30

   old: 03 f3 3f
   new: f3 03 3f

So, the standard procedure is not compatible with data already in
flash (written with the older u-boot and kernel provided by the vendor
with the kit).

The code in nomadik_ecc512_calc() is derived from vendor data sheet,
looking at vendor code I got; since both routines gives the same results,
mine _should_ be compatible with hw ecc, for the day I'll be
able to make it work. However vendor code never used hw ecc, either,
so I'm not sure this routine is really compatible with it.

Actually, I got a hint about why hw ecc isn't working for me, but
can't try it these days.

In view of this, can my code stay? 

/alessandro



More information about the linux-mtd mailing list