linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pxa32xx_nand: add support for partition table parsing
@ 2010-04-23  8:43 Marc Kleine-Budde
  0 siblings, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2010-04-23  8:43 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 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 5d55152..e02fa4f 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1320,6 +1320,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:
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] pxa32xx_nand: add support for partition table parsing
@ 2010-04-23 21:25 Marc Kleine-Budde
  2010-04-28 15:22 ` Marc Kleine-Budde
  2010-04-29  5:47 ` Artem Bityutskiy
  0 siblings, 2 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2010-04-23 21:25 UTC (permalink / raw)
  To: linux-arm-kernel

The pxa32xx_nand driver doesn't support partition tables from the
command line. This patch adds support for it.

Please review and consider to apply.

cheers, Marc

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] pxa32xx_nand: add support for partition table parsing
  2010-04-23 21:25 [PATCH] pxa32xx_nand: add support for partition table parsing Marc Kleine-Budde
@ 2010-04-28 15:22 ` Marc Kleine-Budde
  2010-04-29  5:47 ` Artem Bityutskiy
  1 sibling, 0 replies; 4+ messages in thread
From: Marc Kleine-Budde @ 2010-04-28 15:22 UTC (permalink / raw)
  To: linux-arm-kernel

Marc Kleine-Budde wrote:
> The pxa32xx_nand driver doesn't support partition tables from the
> command line. This patch adds support for it.
> 
> Please review and consider to apply.

Can someone please have a look at this patch.

Cheers, Marc

>>From a2caa92b08351511ee60bd94bf735be5f3a6fb65 Mon Sep 17 00:00:00 2001
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Date: Fri, 23 Apr 2010 10:43:42 +0200
> Subject: [PATCH] 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>
> ---
>  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 5d55152..e02fa4f 100644
> --- a/drivers/mtd/nand/pxa3xx_nand.c
> +++ b/drivers/mtd/nand/pxa3xx_nand.c
> @@ -1320,6 +1320,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:


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100428/fd228e2b/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] pxa32xx_nand: add support for partition table parsing
  2010-04-23 21:25 [PATCH] pxa32xx_nand: add support for partition table parsing Marc Kleine-Budde
  2010-04-28 15:22 ` Marc Kleine-Budde
@ 2010-04-29  5:47 ` Artem Bityutskiy
  1 sibling, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2010-04-29  5:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 2010-04-23 at 23:25 +0200, Marc Kleine-Budde wrote:
> The pxa32xx_nand driver doesn't support partition tables from the
> command line. This patch adds support for it.
> 
> Please review and consider to apply.
> 
> cheers, Marc
> 
> 
> From a2caa92b08351511ee60bd94bf735be5f3a6fb65 Mon Sep 17 00:00:00 2001
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Date: Fri, 23 Apr 2010 10:43:42 +0200
> Subject: [PATCH] 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>

Taken to l2-mtd-2.6.git / master.

-- 
Best Regards,
Artem Bityutskiy (????? ????????)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-29  5:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-23 21:25 [PATCH] pxa32xx_nand: add support for partition table parsing Marc Kleine-Budde
2010-04-28 15:22 ` Marc Kleine-Budde
2010-04-29  5:47 ` Artem Bityutskiy
  -- strict thread matches above, loose matches on Subject: below --
2010-04-23  8:43 Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).