NAND ECC and OOB usage

Phil Thompson phil at river-bank.demon.co.uk
Tue Feb 18 10:17:04 EST 2003


On Tuesday 18 February 2003 3:19 pm, Thomas Gleixner wrote:
> On Tuesday 18 February 2003 14:21, Phil Thompson wrote:
> > On Tuesday 18 February 2003 1:09 pm, Thomas Gleixner wrote:
> > > I have changed the oob-selection for NAND as follows:
> > >
> > > 1. A default oob selector is added to the mtd structure. It can be
> > > initialized on compile time or modified on runtime. For partitioned
> > > devices a default selector is included in the partition description
> > > structure. This can be set on compile time (see autcpu12.c) or on
> > > runtime.
> >
> > This means we really need to be able to specify the selector on the
> > command line as part of mtdparts as well.
>
> You don't need that, as the filesystem forces layout selection itself.

So why hardcode it in autcpu12.c? If it's useful to be able to hardcode the 
selector then it must also be useful to parameterise it in mtdparts.

But maybe it isn't useful to hardcode it either.

As I understand it, the only point of including the selector in struct 
mtd_info is to provide an appropriate default when using user space tools 
that aren't aware of OOB data and ECC. In other words so that you can do...

dd if=jffs2_image of=/dev/mtd1

...and have the OOB data initialised properly. However, because you have to 
deal with potential bad blocks, you shouldn't be using user space tools that 
aren't aware of OOB data. You should be using something like your enhanced 
nandwrite which is going to use the MEMSETOOBSEL ioctl to explicitly set the 
selector correctly anyway.

In other words, I can't see the point in having the selector in struct 
mtd_partition at all.

Phil




More information about the linux-mtd mailing list