Commit 192afdbf authored by Murali Karicheri's avatar Murali Karicheri Committed by Artem Bityutskiy

mtd: davinci: add support for parition binding nodes

Enhance the driver to support partition subnodes inside the nand
device bindings to describe partions on the nand device.
Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
Reviewed-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent 6f9f59ee
...@@ -23,6 +23,9 @@ Recommended properties : ...@@ -23,6 +23,9 @@ Recommended properties :
- ti,davinci-nand-buswidth: buswidth 8 or 16 - ti,davinci-nand-buswidth: buswidth 8 or 16
- ti,davinci-nand-use-bbt: use flash based bad block table support. - 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): Example (enbw_cmc board):
aemif@60000000 { aemif@60000000 {
compatible = "ti,davinci-aemif"; compatible = "ti,davinci-aemif";
...@@ -47,5 +50,10 @@ aemif@60000000 { ...@@ -47,5 +50,10 @@ aemif@60000000 {
ti,davinci-ecc-mode = "hw"; ti,davinci-ecc-mode = "hw";
ti,davinci-ecc-bits = <4>; ti,davinci-ecc-bits = <4>;
ti,davinci-nand-use-bbt; ti,davinci-nand-use-bbt;
partition@180000 {
label = "ubifs";
reg = <0x180000 0x7e80000>;
};
}; };
}; };
...@@ -821,9 +821,16 @@ static int __init nand_davinci_probe(struct platform_device *pdev) ...@@ -821,9 +821,16 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto err_scan; goto err_scan;
ret = mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts, if (pdata->parts)
pdata->nr_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) if (ret < 0)
goto err_scan; goto err_scan;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment