aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2013-05-30 15:53:07 -0400
committerTony Lindgren <tony@atomide.com>2013-05-30 16:09:31 -0400
commit82c5cde1c4b01a62c9a19c9118b4b434c333ce86 (patch)
tree5383349968d0092bda5ea1e0e7c75abf3fcad200 /arch
parent608d19380c67d3a68ef53568a8ea4f82fefa618e (diff)
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 <arnd@arndb.de> Cc: Olof Johansson <olof@lixom.net> Reviewed-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/devices.c78
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_44xx_data.c21
2 files changed, 0 insertions, 99 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 350116906f18..721da484d8ec 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -20,7 +20,6 @@
20#include <linux/of.h> 20#include <linux/of.h>
21#include <linux/pinctrl/machine.h> 21#include <linux/pinctrl/machine.h>
22#include <linux/platform_data/omap4-keypad.h> 22#include <linux/platform_data/omap4-keypad.h>
23#include <linux/platform_data/omap_ocp2scp.h>
24#include <linux/wl12xx.h> 23#include <linux/wl12xx.h>
25 24
26#include <asm/mach-types.h> 25#include <asm/mach-types.h>
@@ -515,82 +514,6 @@ static void omap_init_vout(void)
515static inline void omap_init_vout(void) {} 514static inline void omap_init_vout(void) {}
516#endif 515#endif
517 516
518#if defined(CONFIG_OMAP_OCP2SCP) || defined(CONFIG_OMAP_OCP2SCP_MODULE)
519static int count_ocp2scp_devices(struct omap_ocp2scp_dev *ocp2scp_dev)
520{
521 int cnt = 0;
522
523 while (ocp2scp_dev->drv_name != NULL) {
524 cnt++;
525 ocp2scp_dev++;
526 }
527
528 return cnt;
529}
530
531static void __init omap_init_ocp2scp(void)
532{
533 struct omap_hwmod *oh;
534 struct platform_device *pdev;
535 int bus_id = -1, dev_cnt = 0, i;
536 struct omap_ocp2scp_dev *ocp2scp_dev;
537 const char *oh_name, *name;
538 struct omap_ocp2scp_platform_data *pdata;
539
540 if (!cpu_is_omap44xx())
541 return;
542
543 oh_name = "ocp2scp_usb_phy";
544 name = "omap-ocp2scp";
545
546 oh = omap_hwmod_lookup(oh_name);
547 if (!oh) {
548 pr_err("%s: could not find omap_hwmod for %s\n", __func__,
549 oh_name);
550 return;
551 }
552
553 pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);
554 if (!pdata) {
555 pr_err("%s: No memory for ocp2scp pdata\n", __func__);
556 return;
557 }
558
559 ocp2scp_dev = oh->dev_attr;
560 dev_cnt = count_ocp2scp_devices(ocp2scp_dev);
561
562 if (!dev_cnt) {
563 pr_err("%s: No devices connected to ocp2scp\n", __func__);
564 kfree(pdata);
565 return;
566 }
567
568 pdata->devices = kzalloc(sizeof(struct omap_ocp2scp_dev *)
569 * dev_cnt, GFP_KERNEL);
570 if (!pdata->devices) {
571 pr_err("%s: No memory for ocp2scp pdata devices\n", __func__);
572 kfree(pdata);
573 return;
574 }
575
576 for (i = 0; i < dev_cnt; i++, ocp2scp_dev++)
577 pdata->devices[i] = ocp2scp_dev;
578
579 pdata->dev_cnt = dev_cnt;
580
581 pdev = omap_device_build(name, bus_id, oh, pdata, sizeof(*pdata));
582 if (IS_ERR(pdev)) {
583 pr_err("Could not build omap_device for %s %s\n",
584 name, oh_name);
585 kfree(pdata->devices);
586 kfree(pdata);
587 return;
588 }
589}
590#else
591static inline void omap_init_ocp2scp(void) { }
592#endif
593
594#if IS_ENABLED(CONFIG_WL12XX) 517#if IS_ENABLED(CONFIG_WL12XX)
595 518
596static struct wl12xx_platform_data wl12xx __initdata; 519static struct wl12xx_platform_data wl12xx __initdata;
@@ -655,7 +578,6 @@ static int __init omap2_init_devices(void)
655 omap_init_sti(); 578 omap_init_sti();
656 omap_init_rng(); 579 omap_init_rng();
657 omap_init_vout(); 580 omap_init_vout();
658 omap_init_ocp2scp();
659 581
660 return 0; 582 return 0;
661} 583}
diff --git a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
index 848b6dc67590..d6dd70728c61 100644
--- a/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_44xx_data.c
@@ -21,7 +21,6 @@
21#include <linux/io.h> 21#include <linux/io.h>
22#include <linux/platform_data/gpio-omap.h> 22#include <linux/platform_data/gpio-omap.h>
23#include <linux/power/smartreflex.h> 23#include <linux/power/smartreflex.h>
24#include <linux/platform_data/omap_ocp2scp.h>
25#include <linux/i2c-omap.h> 24#include <linux/i2c-omap.h>
26 25
27#include <linux/omap-dma.h> 26#include <linux/omap-dma.h>
@@ -2695,25 +2694,6 @@ static struct omap_hwmod_class omap44xx_ocp2scp_hwmod_class = {
2695 .sysc = &omap44xx_ocp2scp_sysc, 2694 .sysc = &omap44xx_ocp2scp_sysc,
2696}; 2695};
2697 2696
2698/* ocp2scp dev_attr */
2699static struct resource omap44xx_usb_phy_and_pll_addrs[] = {
2700 {
2701 .name = "usb_phy",
2702 .start = 0x4a0ad080,
2703 .end = 0x4a0ae000,
2704 .flags = IORESOURCE_MEM,
2705 },
2706 { }
2707};
2708
2709static struct omap_ocp2scp_dev ocp2scp_dev_attr[] = {
2710 {
2711 .drv_name = "omap-usb2",
2712 .res = omap44xx_usb_phy_and_pll_addrs,
2713 },
2714 { }
2715};
2716
2717/* ocp2scp_usb_phy */ 2697/* ocp2scp_usb_phy */
2718static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = { 2698static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2719 .name = "ocp2scp_usb_phy", 2699 .name = "ocp2scp_usb_phy",
@@ -2737,7 +2717,6 @@ static struct omap_hwmod omap44xx_ocp2scp_usb_phy_hwmod = {
2737 .modulemode = MODULEMODE_HWCTRL, 2717 .modulemode = MODULEMODE_HWCTRL,
2738 }, 2718 },
2739 }, 2719 },
2740 .dev_attr = ocp2scp_dev_attr,
2741}; 2720};
2742 2721
2743/* 2722/*