Initialization ordering problem

William Jhun wjhun at ayrnetworks.com
Tue Mar 19 01:14:49 EST 2002


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? Had the chip
drivers been available as modules and CONFIG_KMOD set, they would have
been loaded and initialized on-demand. However, when linking everything
statically, this fails miserably. I could work up some kludge to make
our platform-specific flash initialization code link in after the mtd
code, but this would be ugly.

Any ideas?

Thanks,
Will




More information about the linux-mtd mailing list