[PATCH] [RFC] mtd/uclinux: support ROM and allow passing the base address

Mike Frysinger vapier.adi at gmail.com
Fri Oct 12 12:18:41 EDT 2012


On Fri, Oct 12, 2012 at 3:41 AM, Uwe Kleine-König wrote:
> On Thu, Oct 11, 2012 at 12:21:59AM -0400, Mike Frysinger wrote:
>> i don't think's necessary either for the larger change here.  use the logic:
>>     if (physaddr != -1)
>>         mapp->phys = physaddr;
>> and keep the default initialization.
>
> I keep my way as it seems to be more robust for possible future changes.
> (I don't know if that will ever happen, but consider platform device
> support or just a retry of instatiation after physaddr changed from
> something back to -1.)

i'm afraid that will still break things.  the arch code initializes
the mtd map in setup_arch() which i believe is before the
module_init() (which is device_initcall() when it is compiled into).
so clobbering uclinux_ram_map.phys in the module_init will undo what
was done in setup_arch().
-mike



More information about the linux-mtd mailing list