How MTD device registers

Dear All, Can some explain me the code flow for MTD devices.

  1. I work on linux bring up on MIPS core.
  2. U-BOOT is the bootloader. + . Linux is 2.6.28. m25p80 is the SPI flash.
  3. I can see in drivers/mtd/devices/m25p80.c file "spi_register_device".

When I boot from U-BOOT I need to pass cmdline to linux-boot. How do I know the registered device name (hopefully m25p80), so that I can supply the argument in u-boot. Linux boot command line is as : CONFIG_CMDLINE="mtdpart=m25p80:256k(boot),64k(boot_config),64k (board_config),2048k(kernel),4096k(filesystem) root=/dev/mtdpart rootfstype=squashfs,yaffs, jffs2 noinitrd console=ttyS0,115200 init=/ etc/preinit loglevel=7 initcall_debug"

In above,

mtdpart=m25p80 is the problem. Kernel panics........................ VFS: Cannot open root device "mtdpart" or unknown-block(0,0) Please append a correct "root=" boot option; here are the available partitions:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ I though (must be wrong):

Can anyone help with the code to look for.

Regards, B-N

Reply to
bharat
Loading thread data ...

"/dev/mtdblockX" with X from 0 up to the devices and partitions you are using on your flash device.

Maybe you should ask this at: snipped-for-privacy@lists.infradead.org

jbe

Reply to
Juergen Beisert

init=3D/

No I am looking at bootup time. Thats right, I should try at infradead.org

Reply to
b_n

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.