Adding devices at runtime

Pavel Roskin proski at
Thu Oct 31 21:06:51 EST 2002


If I understand correctly, the MTD driver allows to define two devices in
predefined memory areas - one using the CFI driver (CONFIG_MTD_PHYSMAP),
the other using the MTDRAM driver (CONFIG_MTD_MTDRAM).

What if I want more MTD devices in the known memory areas?  Can I register
them at runtime, when the kernel is loaded?  Is it possible to do it
without using modules?  Can I do it without changing the kernel (I mean 
something like "echo 200000 20000 2 >/proc/mtd").

I realize that the question is very basic, but my search for "add" and
"register" in the HOWTO from CVS didn't bring any positive results.

Can it be that I want something wrong?  I simply want to boot from one
flash device and be able to access (and possibly rewrite) that device and
another device.  Both are supported by the JEDEC driver
(CONFIG_MTD_JEDECPROBE), but they use different (not adjacent) memory
areas.  (Of course I hacked drivers/mtd/maps/physmap.c to probe
"jedec_probe", but I know that it's already done right in MTD CVS.)

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.

Pavel Roskin

More information about the linux-mtd mailing list