JFFS2-on-DataFlash : 2 - DataFlash support
Andrew Victor
andrew at sanpeople.com
Thu Feb 3 04:03:16 EST 2005
hi Jörn,
> > + /* and Dataflash */
> > + if (jffs2_dataflash(c)) {
> > + ret = jffs2_dataflash_setup(c);
> > + if (ret)
> > + return ret;
> > + }
>
> This can be a bit simpler:
> ret = jffs2_dataflash_setup()
> if (ret)
> return ret;
I just copied the way it was done for the the NOR ECC flash.
> > - return BLK_STATE_ALLFF; /* OK to erase if all blocks are like this */
> > + if (c->cleanmarker_size == 0)
> > + return BLK_STATE_CLEANMARKER; /* don't bother with re-erase */
If a cleanmarker is not detected (within the first EMPTY_SCAN_SIZE bytes
of a block), the block is added to the 'erase_pending_list' to be
re-erased (and have a new cleanmarker written).
Since we don't need cleanmarkers on DataFlash, we return
BLK_STATE_CLEANMARKER from jffs2_scan_eraseblock() so that the block
rather gets added directly to the 'free_list'.
Regards,
Andrew Victor
More information about the linux-mtd
mailing list