use of low level driver
Xavier DEBREUIL
xde at inventel.fr
Tue Jun 19 04:29:48 EDT 2001
I am a little confused about the use of low level functions provided by
different drivers.
I got the mtd stuff work on my board with amd std non cfi flashes. In
amd_flash.c
int __init amd_flash_init(void)
{
register_mtd_chip_driver(&amd_flash_chipdrv);
return 0;
}
allows me to call : do_map_probe("amd_flash",...)
But, if I want to call do_map_probe("cfi" or "cfi_intel",...), I need to
have registered the corresponding mtd chip driver. But when it is part
of the kernel (not a module), "mod_init_t cfi_intelext_init(void)" is
not called in kernel initialisation ? (correct?)
Is it correct to replace it with
int __init cfi_intelext_init(void)
{
register_mtd_chip_driver(&cfi_intelext_chipdrv);
return 0;
}
and
mod_init_t cfi_probe_init(void) by
int __init cfi_probe_init(void)
so that I will be able to call do_map_probe("cfi_intel" or "cfi",...) in
kernel initialisation ?
otherwise, what happend is that kmod is looking for module in the
filesystem ; but at that point, no root fs is mounted.
Xavier
More information about the linux-mtd
mailing list