Aw: Re: Linux MTD: Per Partition ECC

Ricard Wanderlof ricard.wanderlof at axis.com
Wed Feb 12 02:44:45 EST 2014


On Tue, 11 Feb 2014, Peter Barada wrote:

> It may be possible to burn the bootloader into NAND using MTD_RAW_MODE
> which _should_ disable all ECC for the operation, but in my case the ECC
> generator is internal to the NAND chip itself and this won't work.
>
> I'm working on a possible solution in my linux-3.0 kernel, to modify
> nand_get_device to take an extra pramater "no_ecc" which keys off
> whether the NAND ops mode (if known) is MTD_OOB_RAW, and if so shut off
> all ECC (including the in-chip ECC my NAND requires).    Then every NAND
> operation will enable/disable ECC while getting the controller lock.

I'm sure I don't understand this properly, but in the first paragraph you 
state that the ECC generator is internal to the NAND chip so that you 
can't disable ECC on a per-write basis using MTD_RAW_MODE, then in the 
second paragraph above you say that you want to add a parameter which 
disables ECC. But that is what MTD_OOB_RAW is supposed to do isn't it?

Or is the real problem here that in the default routines in nand_base.c 
there is no way of notifying the _nand_chip_ which mode we're in? It 
should be possible though if you replace the appropriate default callbacks 
with chip-specific ones.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30



More information about the linux-mtd mailing list