aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2013-06-14 14:28:22 -0700
committerOlof Johansson <olof@lixom.net>2013-06-14 14:28:22 -0700
commit777d466d13238336c83a5a8d402a5f0017f69407 (patch)
tree2e577d7785b43026d1062633e8c507988ad8f1c0 /drivers
parent214099b028f42c48461fb2a08e5b8ab419558cbd (diff)
parent09182ab11b49b67d04598b19eb89cf0bbd672a60 (diff)
Merge tag 'omap-for-v3.11/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
From Tony Lindgren: Move omap4 over to device tree based booting. This allows us to get rid a big pile of platform init code for things that are already handled by device tree related code. As am33xx is already device tree based, we can also remove the same data for am33xx. * tag 'omap-for-v3.11/cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP4: hwmod data: Remove irq entries from mcspi, mmc hwmods ARM: OMAP4: hwmod data: add DSS data back ARM: OMAP4: hwmod data: Clean up the data file ARM: AM33XX: hwmod data: irq, dma and addr info clean up ARM: OMAP2+: Remove omap4 ocp2scp pdata ARM: OMAP2+: Remove omap4 pdata for USB ARM: OMAP2+: Remove omap4 pdata from hsmmc.c ARM: OMAP2+: Remove legacy mux data for omap4 ARM: OMAP2+: Remove board-omap4panda.c ARM: OMAP2+: Remove board-4430sdp.c ARM: OMAP2+: Legacy support for wl12xx when booted with devicetree Resolved merge conflict due to a fix for 3.10 (the fix is removed since the code is no longer used -- data comes from device tree). Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bus/omap-ocp2scp.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/drivers/bus/omap-ocp2scp.c b/drivers/bus/omap-ocp2scp.c
index fe7191663bbd..5511f9814ddd 100644
--- a/drivers/bus/omap-ocp2scp.c
+++ b/drivers/bus/omap-ocp2scp.c
@@ -22,26 +22,6 @@
#include <linux/pm_runtime.h>
#include <linux/of.h>
#include <linux/of_platform.h>
-#include <linux/platform_data/omap_ocp2scp.h>
-
-/**
- * _count_resources - count for the number of resources
- * @res: struct resource *
- *
- * Count and return the number of resources populated for the device that is
- * connected to ocp2scp.
- */
-static unsigned _count_resources(struct resource *res)
-{
- int cnt = 0;
-
- while (res->start != res->end) {
- cnt++;
- res++;
- }
-
- return cnt;
-}
static int ocp2scp_remove_devices(struct device *dev, void *c)
{
@@ -55,11 +35,7 @@ static int ocp2scp_remove_devices(struct device *dev, void *c)
static int omap_ocp2scp_probe(struct platform_device *pdev)
{
int ret;
- unsigned res_cnt, i;
struct device_node *np = pdev->dev.of_node;
- struct platform_device *pdev_child;
- struct omap_ocp2scp_platform_data *pdata = pdev->dev.platform_data;
- struct omap_ocp2scp_dev *dev;
if (np) {
ret = of_platform_populate(np, NULL, NULL, &pdev->dev);
@@ -68,48 +44,12 @@ static int omap_ocp2scp_probe(struct platform_device *pdev)
"failed to add resources for ocp2scp child\n");
goto err0;
}
- } else if (pdata) {
- for (i = 0, dev = *pdata->devices; i < pdata->dev_cnt; i++,
- dev++) {
- res_cnt = _count_resources(dev->res);
-
- pdev_child = platform_device_alloc(dev->drv_name,
- PLATFORM_DEVID_AUTO);
- if (!pdev_child) {
- dev_err(&pdev->dev,
- "failed to allocate mem for ocp2scp child\n");
- goto err0;
- }
-
- ret = platform_device_add_resources(pdev_child,
- dev->res, res_cnt);
- if (ret) {
- dev_err(&pdev->dev,
- "failed to add resources for ocp2scp child\n");
- goto err1;
- }
-
- pdev_child->dev.parent = &pdev->dev;
-
- ret = platform_device_add(pdev_child);
- if (ret) {
- dev_err(&pdev->dev,
- "failed to register ocp2scp child device\n");
- goto err1;
- }
- }
- } else {
- dev_err(&pdev->dev, "OCP2SCP initialized without plat data\n");
- return -EINVAL;
}
pm_runtime_enable(&pdev->dev);
return 0;
-err1:
- platform_device_put(pdev_child);
-
err0:
device_for_each_child(&pdev->dev, NULL, ocp2scp_remove_devices);