Adding devices at runtime

Pavel Roskin proski at gnu.org
Fri Nov 1 00:45:59 EST 2002


Hello!

> > Right now I have to use the MTDRAM driver on the boot device, so the I
> > cannot rewrite it (I haven't tried, but I don't expect it to work).  I can
> > only rewrite the other chip.
> 
> Could you be a little more verbose on what your problem is? What kind
> of mtd devices do you have, what do you want to do with them, why
> register one of them at runtime,...

Sorry, I cannot be more verbose about the device.  I was saying "at
runtime" because I don't need the second chip for the boot process.  I
don't care if it's done at runtime or I hardcode the address into the
kernel.  However, I did check the Config.in and I know that the kernel
only takes parameters for one chip and one MTDRAM device.

> It is possible to register devices at runtime. But I don't know of any
> driver that gives you an interface to do so without insmod'ing it. A
> question of some 50 lines of code to add that functionality.

I have those lines (perhaps they are not very pretty), but I was wondering
if there is "the right way" to do it.  I gather from your that it's called
insmod.  That's fine.

I guess another solution would be writing a map for the device, just like
those little C files under drivers/mtd/maps/

Thank you for reply!

-- 
Regards,
Pavel Roskin





More information about the linux-mtd mailing list