[PATCH,RFC] [MTD] replace MTD_NORFLASH with MTD_GENERIC_TYPE

Nicolas Pitre nico at cam.org
Tue May 30 15:10:08 EDT 2006


On Tue, 30 May 2006, Jörn Engel wrote:

> Here is another migration path, that will likely receive Artems
> objections as well.
> 
> Invariant:
> In the end, initialization of the wbuf code will be identical for all
> devices that require wbuf.  Whether a device requires wbuf is simply
> checked by looking at mtd->size.  If mtd->size is greater than 1, we
> need wbuf.
> 
> Step 1:
> Turn MTD_NOR into MTD_GENERIC_TYPE and call the current initialization
> for NOR the generic one.
> 
> Step 2:
> Turn MTD_DATAFLASH into MTD_GENERIC_TYPE, remove its special cased
> wbuf initialization and make sure the generic one is usable for
> DATAFLASH as well.
> 
> Step 3:
> Turn MTD_NAND into MTD_GENERIC_TYPE, remove its special cased wbuf
> initialization and make sure the generic one is usable for NAND as
> well.

If presented that way you're indeed up for more protests.

Just don't "turn MTD_* into MTD_GENERIC_TYPE".  Instead, try to "move 
MTD_* away from using mtd->type".  Or something like that.


Nicolas


More information about the linux-mtd mailing list