[PATCH v2] mtd: nand: Add driver for M-sys / Sandisk diskonchip G4

Ivan Djelic ivan.djelic at parrot.com
Thu Nov 3 07:59:15 EDT 2011


On Thu, Nov 03, 2011 at 11:02:11AM +0000, Robert Jarzmik wrote:
> > I can see two cleaner alternatives to solve this issue:
> >
> > 1. When you program a page, before writing hwecc to oob, adjust it like this:
> > 2. Use unprotected spare oob byte 15 as a programmming marker: remove it from
> > ...zip...
> 
> I would see a third one:
> 3. After reading the page, check bit DOC_ECCCONF1_PAGE_IS_WRITTEN in DOC_ECCCONF1 register.
>    I think this bit is calculated from the Hamming Code (not sure), but I'm pretty sure that
>    this bit is 0 when the page is blank, and 1 if the page was written before.
> 

OK, that's even simpler.
But as Matthieu pointed out, you would still need to clean-up bitflips in blank
pages for UBIFS...

BR,
--
Ivan



More information about the linux-mtd mailing list