diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2010-04-23 23:25:44 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-05-10 14:23:43 +0100 |
commit | bff3c10d369440bc87ba612b45ba2777d2bf017f (patch) | |
tree | b2f173bb20162424a46d779e54d0f4d3595a69fb /drivers/mtd | |
parent | 1dd2a092af8ed53eb744c5b9993fa775616cf699 (diff) | |
download | linux-bff3c10d369440bc87ba612b45ba2777d2bf017f.tar.bz2 |
mtd: pxa32xx_nand: add support for partition table parsing
The pxa32xx_nand driver doesn't support partition tables from the
command line. This patch adds support for it.
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index 1a5a0365c983..55a3d2c05f2a 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c @@ -1319,6 +1319,17 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) goto fail_free_irq; } + if (mtd_has_cmdlinepart()) { + static const char *probes[] = { "cmdlinepart", NULL }; + struct mtd_partition *parts; + int nr_parts; + + nr_parts = parse_mtd_partitions(mtd, probes, &parts, 0); + + if (nr_parts) + return add_mtd_partitions(mtd, parts, nr_parts); + } + return add_mtd_partitions(mtd, pdata->parts, pdata->nr_parts); fail_free_irq: |