From: Kyungmin Park <kmpark@infradead.org>
To: linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org
Subject: [PATCH] [ONENAND] Add command line partition support on OMAP driver
Date: Wed, 29 Oct 2008 11:12:02 +0900 [thread overview]
Message-ID: <20081029021202.GA32306@july> (raw)
Add command line partition support on OMAP driver
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index a9885d1..60cf668 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -51,6 +51,10 @@
#define ONENAND_IO_SIZE SZ_128K
#define ONENAND_BUFRAM_SIZE (1024 * 5)
+#ifdef CONFIG_MTD_PARTITIONS
+static const char *part_probes[] = { "cmdlinepart", NULL, };
+#endif
+
struct omap2_onenand {
struct platform_device *pdev;
int gpmc_cs;
@@ -685,9 +689,12 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
}
#ifdef CONFIG_MTD_PARTITIONS
- if (pdata->parts != NULL)
+ r = parse_mtd_partitions(&c->mtd, part_probes, &c->parts, 0);
+ if (r > 0)
+ r = add_mtd_partitions(&c->mtd, c->parts, r);
+ else if (pdata->parts != NULL)
r = add_mtd_partitions(&c->mtd, pdata->parts,
- pdata->nr_parts);
+ pdata->nr_parts);
else
#endif
r = add_mtd_device(&c->mtd);
WARNING: multiple messages have this Message-ID (diff)
From: Kyungmin Park <kmpark@infradead.org>
To: linux-mtd@lists.infradead.org, linux-omap@vger.kernel.org
Subject: [PATCH] [ONENAND] Add command line partition support on OMAP driver
Date: Wed, 29 Oct 2008 11:12:02 +0900 [thread overview]
Message-ID: <20081029021202.GA32306@july> (raw)
Add command line partition support on OMAP driver
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index a9885d1..60cf668 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -51,6 +51,10 @@
#define ONENAND_IO_SIZE SZ_128K
#define ONENAND_BUFRAM_SIZE (1024 * 5)
+#ifdef CONFIG_MTD_PARTITIONS
+static const char *part_probes[] = { "cmdlinepart", NULL, };
+#endif
+
struct omap2_onenand {
struct platform_device *pdev;
int gpmc_cs;
@@ -685,9 +689,12 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
}
#ifdef CONFIG_MTD_PARTITIONS
- if (pdata->parts != NULL)
+ r = parse_mtd_partitions(&c->mtd, part_probes, &c->parts, 0);
+ if (r > 0)
+ r = add_mtd_partitions(&c->mtd, c->parts, r);
+ else if (pdata->parts != NULL)
r = add_mtd_partitions(&c->mtd, pdata->parts,
- pdata->nr_parts);
+ pdata->nr_parts);
else
#endif
r = add_mtd_device(&c->mtd);
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next reply other threads:[~2008-10-29 2:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 2:12 Kyungmin Park [this message]
2008-10-29 2:12 ` [PATCH] [ONENAND] Add command line partition support on OMAP driver Kyungmin Park
2008-10-29 12:06 ` Adrian Hunter
2008-10-29 12:06 ` Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081029021202.GA32306@july \
--to=kmpark@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.