aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/memory
diff options
context:
space:
mode:
authorRobert ABEL <rabel@cit-ec.uni-bielefeld.de>2015-02-27 10:56:49 -0500
committerRoger Quadros <rogerq@ti.com>2015-03-06 05:22:25 -0500
commitb1dc1ca9d4673dac43b8a77a8b695ffb2918de2a (patch)
treeaa3851b5d97187f5b20dfd1a478a7e215e0d6b63 /drivers/memory
parent5e9444d9a00f4b22ad676f2d9d4b69312871e429 (diff)
ARM OMAP2+ GPMC: add bus children
This patch adds support for spawning buses as children of the GPMC. Signed-off-by: Robert ABEL <rabel@cit-ec.uni-bielefeld.de> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Roger Quadros <rogerq@ti.com>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/omap-gpmc.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 624dccb0f002..91b5a1b9b9c2 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -27,6 +27,7 @@
27#include <linux/of_address.h> 27#include <linux/of_address.h>
28#include <linux/of_mtd.h> 28#include <linux/of_mtd.h>
29#include <linux/of_device.h> 29#include <linux/of_device.h>
30#include <linux/of_platform.h>
30#include <linux/omap-gpmc.h> 31#include <linux/omap-gpmc.h>
31#include <linux/mtd/nand.h> 32#include <linux/mtd/nand.h>
32#include <linux/pm_runtime.h> 33#include <linux/pm_runtime.h>
@@ -1812,8 +1813,21 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
1812 gpmc_cs_enable_mem(cs); 1813 gpmc_cs_enable_mem(cs);
1813 1814
1814no_timings: 1815no_timings:
1815 if (of_platform_device_create(child, NULL, &pdev->dev)) 1816
1816 return 0; 1817 /* create platform device, NULL on error or when disabled */
1818 if (!of_platform_device_create(child, NULL, &pdev->dev))
1819 goto err_child_fail;
1820
1821 /* is child a common bus? */
1822 if (of_match_node(of_default_bus_match_table, child))
1823 /* create children and other common bus children */
1824 if (of_platform_populate(child, of_default_bus_match_table,
1825 NULL, &pdev->dev))
1826 goto err_child_fail;
1827
1828 return 0;
1829
1830err_child_fail:
1817 1831
1818 dev_err(&pdev->dev, "failed to create gpmc child %s\n", child->name); 1832 dev_err(&pdev->dev, "failed to create gpmc child %s\n", child->name);
1819 ret = -ENODEV; 1833 ret = -ENODEV;