[RFC][PATCH][JFFS2] JFFS2 support for NOP 1

Kyungmin Park kmpark at infradead.org
Tue Nov 27 06:48:33 EST 2007


> > diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
> > index f71dac4..80334d7 100644
> > --- a/include/mtd/mtd-abi.h
> > +++ b/include/mtd/mtd-abi.h
> > @@ -30,12 +30,14 @@ struct mtd_oob_buf {
> >  #define MTD_BIT_WRITEABLE    0x800   /* Single bits can be flipped */
> >  #define MTD_NO_ERASE         0x1000  /* No erase necessary */
> >  #define MTD_STUPID_LOCK              0x2000  /* Always locked after reset */
> > +#define MTD_MULTI_LEVEL_CHIP 0x4000  /* Multi Level Chip */
> >
> >  // Some common devices / combinations of capabilities
> >  #define MTD_CAP_ROM          0
> >  #define MTD_CAP_RAM          (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
> >  #define MTD_CAP_NORFLASH     (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
> >  #define MTD_CAP_NANDFLASH    (MTD_WRITEABLE)
> > +#define MTD_CAP_MLC_NANDFLASH        (MTD_WRITEABLE | MTD_MULTI_LEVEL_CHIP)
>
> NAK.  This does not describe the limitations of your chip, but a random
> name.  In fact, the limitations appear to be identical to
> (MTD_NORFLASH & !MTD_BIT_WRITEABLE).
>
> Maybe something like ALLOW_SEPERATE_OOB_WRITE with reversed logic?
>

However MTD_NORFLASH doesn't have the write buffer. It means it can be
write one more.
Maybe you only think the non-oob case. But MLC NAND should have the
write buffer for NOP 1 limitation.

In summary,
NOR: no oob, no problem to write bytes.
SLC NAND: has oob, NOP is allowed at least 2 and more.
MCL NAND:  has oob, but NOP is 1.

Thank you,
Kyungmin Park



More information about the linux-mtd mailing list