[MTD] [NAND] add cmdline parsing (mtdparts=) support to cafe_nand
[dwmw2: updated and made to still register whole device first] Signed-off-by: Philip Rakity <pakity@yahoo.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
committed by
David Woodhouse
parent
fefae48bf8
commit
68874414de
@@ -90,7 +90,7 @@ static int timing[3];
|
|||||||
module_param_array(timing, int, &numtimings, 0644);
|
module_param_array(timing, int, &numtimings, 0644);
|
||||||
|
|
||||||
#ifdef CONFIG_MTD_PARTITIONS
|
#ifdef CONFIG_MTD_PARTITIONS
|
||||||
static const char *part_probes[] = { "RedBoot", NULL };
|
static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Hrm. Why isn't this already conditional on something in the struct device? */
|
/* Hrm. Why isn't this already conditional on something in the struct device? */
|
||||||
@@ -805,10 +805,13 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
|
|||||||
add_mtd_device(mtd);
|
add_mtd_device(mtd);
|
||||||
|
|
||||||
#ifdef CONFIG_MTD_PARTITIONS
|
#ifdef CONFIG_MTD_PARTITIONS
|
||||||
|
#ifdef CONFIG_MTD_CMDLINE_PARTS
|
||||||
|
mtd->name = "cafe_nand";
|
||||||
|
#endif
|
||||||
nr_parts = parse_mtd_partitions(mtd, part_probes, &parts, 0);
|
nr_parts = parse_mtd_partitions(mtd, part_probes, &parts, 0);
|
||||||
if (nr_parts > 0) {
|
if (nr_parts > 0) {
|
||||||
cafe->parts = parts;
|
cafe->parts = parts;
|
||||||
dev_info(&cafe->pdev->dev, "%d RedBoot partitions found\n", nr_parts);
|
dev_info(&cafe->pdev->dev, "%d partitions found\n", nr_parts);
|
||||||
add_mtd_partitions(mtd, parts, nr_parts);
|
add_mtd_partitions(mtd, parts, nr_parts);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user