[EMAIL PROTECTED] said:
> 'm headed that way for most uses, but it isn't always the best way to
> go.  The biggest reason is that inspite of how simple I think it is to
> create a map driver for the MTD stuff, there seems to be no
> documentation on how to do it. 

Heh. Mea Culpa, I suppose. 

map_rom isn't a map driver - it's a 'chip driver'.

The CFI modules, amd_flash.c, jedec.c, map_rom and map_ram are capable of 
driving particular types of memory chip if they're given functions to 
actually _access_ the chip. Those functions are provided by the map driver.

For an example of a reasonably simple map driver which has to handle paging
to access different regions of the chips to which it's providing access, see
octagon-5066.c or vmax301.c.

You just provide {read,write}{8,16,32} and copy_{from,to} functions for 
your board, then call the appropriate {cfi,jedec,map_r[ao]m}_probe function 
to probe the chips it contains. That'll return you an MTD device, which you 
either register whole with add_mtd_device() or with in partitions by making 
an array of struct mtd_partitions and using add_mtd_partitions().


--
dwmw2


Reply via email to