diff options
author | Murali Karicheri <m-karicheri2@ti.com> | 2012-11-02 15:22:41 +0100 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com> | 2012-11-15 18:50:30 +0100 |
commit | 192afdbfbc5c3346e27b3c3e3be8337495b2a41b (patch) | |
tree | 3fba2b0dc131373680a809557f68a9c7f7e62547 /drivers | |
parent | mtd: cmdlinepart: fix the overflow of big mtd partitions (diff) | |
download | linux-192afdbfbc5c3346e27b3c3e3be8337495b2a41b.tar.xz linux-192afdbfbc5c3346e27b3c3e3be8337495b2a41b.zip |
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: Murali Karicheri <m-karicheri2@ti.com>
Reviewed-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/nand/davinci_nand.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 945047ad0952..3502606f6480 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; |