ECC configuration of NAND from Linux (MEMSETOOBSEL)

Boris Brezillon boris.brezillon at free-electrons.com
Fri Jan 12 06:46:39 PST 2018


Hello Gudjon,

On Fri, 12 Jan 2018 01:29:55 +0100
"Gudjon I. Gudjonsson" <gudjon at gudjon.org> wrote:

> Hi list
> 
> I am trying to upgrade a few embedded Linux systems remotely 
> and increasing the number of ECC bits at the same time.
> 
> I read your FAQ and found the reference to ioctl (MEMSETOOBSEL) [1]
> but it seems to be removed from the kernel.
> /*
>  * Note, the following ioctl existed in the past and was removed:
>  * #define MEMSETOOBSEL           _IOW('M', 9, struct nand_oobinfo)
>  * Try to avoid adding a new ioctl with the same ioctl number.
>  */
> I assume this is an error in the documentation but I wonder if you
> know any solution to my problem?

It's not something you can change dynamically. When you change the ECC
config, it makes existing content unreadable. In order to change this
setting you'll have to erase the whole flash and then change the ECC
config in your DT or board file (note that not all drivers support
adjusting the ECC strength/step-size).

Regards,

Boris



More information about the linux-mtd mailing list