From 82c5cde1c4b01a62c9a19c9118b4b434c333ce86 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Thu, 30 May 2013 12:53:07 -0700 Subject: ARM: OMAP2+: Remove omap4 ocp2scp pdata This is omap4+ only and no longer needed as omap4+ can be booted using device tree. Also remove the related pdata handling from the driver and the now unneeded platform_data/omap_ocp2scp.h. Cc: Arnd Bergmann Cc: Olof Johansson Reviewed-by: Kishon Vijay Abraham I Acked-by: Felipe Balbi Signed-off-by: Tony Lindgren --- drivers/bus/omap-ocp2scp.c | 60 ---------------------------------------------- 1 file changed, 60 deletions(-) (limited to 'drivers/bus/omap-ocp2scp.c') 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 #include #include -#include - -/** - * _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); -- cgit v1.2.3