cmdlineparts and chip initialization order
Aras Vaichas
arasv at magellan-technology.com
Thu Nov 11 18:18:03 EST 2004
Marc Singer wrote:
> With a command line like this:
>
> console=ttyAM0 root=/dev/hda1 mtdparts=norflash:2m(boot),-(root);nandflash:32k(apex)ro,-(root)
>
> I am able to initialization partitions for the NOR flash, but not the
> NAND flash. It look like the problem is that the NOR flash driver is
> initializing before the mtdparts command line parsed, but the NAND
> flash isn't.
> <SNIP>
> BTW, it looks like none of the other NAND drivers expect a command
> line partition setup. Has anyone else tried?
I recently had to do this and had the same problem. I took a look at the low
level driver code for my particular processor and noted that not all MTD
drivers had partition parsing code.
e.g in at91_dataflash.c there is parser related code:
int parse_cmdline_partitions(struct mtd_info *master,
struct mtd_partition **pparts, const char *mtd_id);
and ...
#ifdef CONFIG_MTD_CMDLINE_PARTS
char mtdID[14];
#endif
and ...
#ifdef CONFIG_MTD_CMDLINE_PARTS
sprintf(mtdID, "dataflash%i", nr_devices-1);
mtd_parts_nr = parse_cmdline_partitions(device, &mtd_parts, mtdID);
#endif
This parsing code is missing from at91_nand.c, and that's why I wasn't able to
setup my NAND partitions from the command line (previous posting).
regards,
Aras
More information about the linux-mtd
mailing list