From: Grant Likely <grant.likely@secretlab.ca>
To: Murali Karicheri <m-karicheri2@ti.com>,
rob.herring@calxeda.com, rob@landley.net, dwmw2@infradead.org,
artem.bityutskiy@linux.intel.com, hs@denx.de, nsekhar@ti.com,
mikedunn@newsguy.com, devicetree-discuss@lists.ozlabs.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mtd@lists.infradead.org, linux-keystone@list.ti.com
Cc: Murali Karicheri <m-karicheri2@ti.com>
Subject: Re: [linux-keystone] [RESEND PATCH] mtd: davinci: add support for parition binding nodes
Date: Thu, 15 Nov 2012 13:15:42 +0000 [thread overview]
Message-ID: <20121115131542.D7F023E0B12@localhost> (raw)
In-Reply-To: <1351866161-15516-1-git-send-email-m-karicheri2@ti.com>
On Fri, 2 Nov 2012 10:22:41 -0400, Murali Karicheri <m-karicheri2@ti.com> wrote:
> Enhance the driver to support partition subnodes inside the nand
> device bindings to describe partions on the nand device.
>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Looks fine to me.
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> .../devicetree/bindings/arm/davinci/nand.txt | 8 ++++++++
> drivers/mtd/nand/davinci_nand.c | 13 ++++++++++---
> 2 files changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/davinci/nand.txt b/Documentation/devicetree/bindings/arm/davinci/nand.txt
> index e37241f..4746452 100644
> --- a/Documentation/devicetree/bindings/arm/davinci/nand.txt
> +++ b/Documentation/devicetree/bindings/arm/davinci/nand.txt
> @@ -23,6 +23,9 @@ Recommended properties :
> - ti,davinci-nand-buswidth: buswidth 8 or 16
> - ti,davinci-nand-use-bbt: use flash based bad block table support.
>
> +nand device bindings may contain additional sub-nodes describing
> +partitions of the address space. See partition.txt for more detail.
> +
> Example (enbw_cmc board):
> aemif@60000000 {
> compatible = "ti,davinci-aemif";
> @@ -47,5 +50,10 @@ aemif@60000000 {
> ti,davinci-ecc-mode = "hw";
> ti,davinci-ecc-bits = <4>;
> ti,davinci-nand-use-bbt;
> +
> + partition@180000 {
> + label = "ubifs";
> + reg = <0x180000 0x7e80000>;
> + };
> };
> };
> diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
> index df1ab7d..321b053 100644
> --- a/drivers/mtd/nand/davinci_nand.c
> +++ b/drivers/mtd/nand/davinci_nand.c
> @@ -821,9 +821,16 @@ syndrome_done:
> if (ret < 0)
> goto err_scan;
>
> - ret = mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts,
> - pdata->nr_parts);
> -
> + if (pdata->parts)
> + ret = mtd_device_parse_register(&info->mtd, NULL, NULL,
> + pdata->parts, pdata->nr_parts);
> + else {
> + struct mtd_part_parser_data ppdata;
> +
> + ppdata.of_node = pdev->dev.of_node;
> + ret = mtd_device_parse_register(&info->mtd, NULL, &ppdata,
> + NULL, 0);
> + }
> if (ret < 0)
> goto err_scan;
>
> --
> 1.7.9.5
>
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
next prev parent reply other threads:[~2012-11-15 13:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-02 14:22 [RESEND PATCH] mtd: davinci: add support for parition binding nodes Murali Karicheri
2012-11-15 13:15 ` Grant Likely [this message]
2012-11-15 13:50 ` Artem Bityutskiy
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=20121115131542.D7F023E0B12@localhost \
--to=grant.likely@secretlab.ca \
--cc=artem.bityutskiy@linux.intel.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dwmw2@infradead.org \
--cc=hs@denx.de \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-keystone@list.ti.com \
--cc=linux-mtd@lists.infradead.org \
--cc=m-karicheri2@ti.com \
--cc=mikedunn@newsguy.com \
--cc=nsekhar@ti.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox