lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121115131542.D7F023E0B12@localhost>
Date:	Thu, 15 Nov 2012 13:15:42 +0000
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Murali Karicheri <m-karicheri2@...com>, rob.herring@...xeda.com,
	rob@...dley.net, dwmw2@...radead.org,
	artem.bityutskiy@...ux.intel.com, hs@...x.de, nsekhar@...com,
	mikedunn@...sguy.com, devicetree-discuss@...ts.ozlabs.org,
	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-mtd@...ts.infradead.org, linux-keystone@...t.ti.com
Cc:	Murali Karicheri <m-karicheri2@...com>
Subject: Re: [linux-keystone] [RESEND PATCH] mtd: davinci: add support for parition binding nodes

On Fri, 2 Nov 2012 10:22:41 -0400, Murali Karicheri <m-karicheri2@...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@...com>

Looks fine to me.

Reviewed-by: Grant Likely <grant.likely@...retlab.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@...00000 {
>  	compatible = "ti,davinci-aemif";
> @@ -47,5 +50,10 @@ aemif@...00000 {
>  		ti,davinci-ecc-mode = "hw";
>  		ti,davinci-ecc-bits = <4>;
>  		ti,davinci-nand-use-bbt;
> +
> +		partition@...000 {
> +			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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ