MEMGETREGIONCOUNT ioctl

MikeW mw_phil at yahoo.co.uk
Wed Apr 4 03:49:05 EDT 2007


Gavin Lambert <gavinl <at> compacsort.com> writes:

> 
> I'm a bit of an MTD newbie myself, so I could be wrong about some of
> this, but:
> 
> Quoth Jitendra Jain [jitendra.jain <at> einfochips.com]:
> > As per the driver, the MEMGETREGIONCOUNT returns the
> > parameter numeraseregions, which is meant to signify if the
> > flash erase size is same throughout or whether it has
> > variable sized sectors (which is found on NOR flash devices).
> > Why does the util denote that number as number of erase regions ??
> 
> Because that's sort of what it is.  If your driver doesn't support the
> ioctl at all then callers assume the erase size is constant as given in
> the erasesize field of MEMGETINFO.  If it does support the ioctl, then
> callers expect it to return the number of erase block size-change
> thresholds (since a region can cover multiple erase blocks, provided
> they're contiguous and of the same size).

Perhaps this suggests that the ioctl documentation could be made
clearer or more explicit in this area ...

Regards,
MikeW



=gmane-pad==gmane-pad==gmane-pad==gmane-pad==gmane-pad==gmane-pad=






More information about the linux-mtd mailing list