Initialization ordering problem

David Woodhouse dwmw2 at redhat.com
Tue Mar 19 05:51:05 EST 2002


On Mon, 18 Mar 2002, William Jhun wrote:

> Hello,
> 
> Since mtd chip drivers (cfi_probe.c, etc) register their presence during
> module (or __initcall) initialization, an attempt to probe for flash
> devices before all mtd components have initialized may fail. Our
> platform-specific code (which in turn calls do_map_probe() in chipreg.c)
> just happens to get linked in before the mtd code. Resultingly, all
> probes fail as the required chip drivers are not present. Is there a
> better solution for this than changing the link order? 

Ask Keith. I objected strongly at the time to the inter_module_xxx stuff
introducing these link order constraints where previously there were none.

In 2.5, you could possibly use subsys_initcall for the chip registrations 
to ensure they happen first.

-- 
dwmw2





More information about the linux-mtd mailing list