[PATCH V4 1/2] Nand driver for Nomadik 8815 SoC (on NHK8815 board)
vimal singh
vimal.newwork at gmail.com
Thu Jul 23 05:49:18 EDT 2009
On Thu, Jul 23, 2009 at 2:37 PM, Alessandro Rubini<rubini-list at gnudd.com> wrote:
>>> '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).
No, Its just byte order. Try enabling 'CONFIG_MTD_NAND_ECC_SMC' in your configs.
It should work fine.
-vimal
>
> 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
>
--
---
Regards,
\/ | |\/| /-\ |_
____ __o
------ -\<,
----- ( )/ ( )
More information about the linux-mtd
mailing list