[less intrusive PATCH, RFC] don't load physmap if length is zero

Jörn Engel joern at wohnheim.fh-wedel.de
Sun Mar 12 17:12:48 EST 2006


On Tue, 28 February 2006 20:16:42 +0100, Lennert Buytenhek wrote:
> 
> OK, so if the previous patch (which converted physmap into a platform
> driver) was too nonobvious, can we at least apply a patch like this so
> that it's possible to compile in physmap without using it?
> 
> This is useful for example on the Technologic Systems TS-72xx boards,
> where some models in the series have NOR flash while others have NAND
> flash, and you'd like to be able to compile a single kernel that works
> on all models.  (So for the NOR models, you call physmap_configure at
> run time, while for the NAND models, you initialise the board-specific
> NAND driver (which I shall submit later.))
> 
> I'd still prefer the platform driver patch to be applied, but having
> some kind of solution merged is better than no solution at all :-)

Is there a good reason why you didn't just write your own mapping
driver?  Most people copy physmap.c, change a few things and use that
driver instead of physmap.c.  It does involve many copies of
essentially the same code, but that code is very simple and no sane
kernel should have more than one mapping driver included, so no object
code is duplicated.

Jörn

-- 
Public Domain  - Free as in Beer
General Public - Free as in Speech
BSD License    - Free as in Enterprise
Shared Source  - Free as in "Work will make you..."




More information about the linux-mtd mailing list