[RFC] Change ECC algorithm from userspace

Matthieu CASTET matthieu.castet at parrot.com
Fri Oct 28 06:30:51 EDT 2011


Hi,

Javier Martinez Canillas a écrit :
> Hello,
> 
> I want to be able to use 1-bit ECC for the first partition where I
> save the loader binary and has to be accessed by the ROM boot but use
> a 4-bit ECC for my rootfs partition.
> 
> Does anyone have this same issue?
We use raw programming and compute the ecc in software.


> 
> What is the best approach to store data in a NAND device using
> different ECC techniques?
> 
> I've think of two approaches:
> 
> 1- Adding an ioctl to mtdchar (something like ECCSETBITS) to change
> the ECC technique used.
But this won't work if there is concurrent acess to mtd. One program may want 1
bit ecc other want 4 bits ecc.

> 2- Use a platform data field to notify the omap2 nand driver that the
> ROM boot only supports 1-bit ECC. So it can use a 1-bit ECC to write
> and read the first 4 sectors but a 4-bit ECC for the rest.
This may be better.

Matthieu

PS : note that some OMAP ROM support a better protection than Hamming (but the
details are not public AFAIK)



More information about the linux-mtd mailing list