* use of low level driver
@ 2001-06-19 8:29 Xavier DEBREUIL
2001-06-19 8:40 ` David Woodhouse
0 siblings, 1 reply; 2+ messages in thread
From: Xavier DEBREUIL @ 2001-06-19 8:29 UTC (permalink / raw)
To: linux-mtd
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: use of low level driver
2001-06-19 8:29 use of low level driver Xavier DEBREUIL
@ 2001-06-19 8:40 ` David Woodhouse
0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2001-06-19 8:40 UTC (permalink / raw)
To: Xavier DEBREUIL; +Cc: linux-mtd
xde@inventel.fr said:
> 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?)
The Intel command set code is a back end only. It doesn't have any code for
probing the chips, and should be invoked only from a driver which can do
so. At the moment, the only driver which can do that is the CFI probe. If
you want to use the cfi_cmdset_0001 code with non-CFI chips, you need to
write your own probe code which will identify the chip, set up a dummy cfi
structure, and swap the chip driver operations with the cfi_cmdset_0001
back end as the cfi_probe code does.
--
dwmw2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-06-19 8:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-06-19 8:29 use of low level driver Xavier DEBREUIL
2001-06-19 8:40 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox