[patch 1/6] physmap: make map_info customizable

David Woodhouse dwmw2 at infradead.org
Wed Dec 10 11:14:39 EST 2008


Atsushi Nemoto <anemo at mba.ocn.ne.jp> wrote:
> Add a hook to physmap_flash_data for map_info initialization.  This makes
> platform code can customize map operations.
> 
> Background: I wrote this patch to support RBTX4939 board, which requires
> custom map->{read,write,copy_from} function.  I think extending the
> physmap driver is better than adding a new map driver.

Hm. I'm unconvinced -- surely you're calling into a function which does
everything that a 'new map driver' would have to do anyway?

Would you advocate that we remove _all_ the dedicated map drivers and
replace them with this method?

Can't you enable physmap without CONFIG_MTD_COMPLEX_MAPPINGS being set
anyway? The 'special' functions can't be used in that config, and we
just assume that direct access works.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse at intel.com                              Intel Corporation




More information about the linux-mtd mailing list