aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-10-08 09:11:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-22 14:14:24 -0400
commit7bccfcd2eb09297e0406b38cfac8e1f3001964f3 (patch)
treebc1abc07d0ce3190e25b27223142a07c6bb0f4fe
parent6efd0f73cc8d748bfcccb23a5ee0b7e000441940 (diff)
USB: OHCI: remove ohci-pcc-soc driver.
This driver is not registered by any in-tree users, and if really needed by some out of tree user, the same functionnality can be restored using the ohci-platform driver using the following platform_data parameters: big_endian_desc = 1 big_endian_mmio = 1 no_big_frame_no = 1 Signed-off-by: Florian Fainelli <florian@openwrt.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/Kconfig10
-rw-r--r--drivers/usb/host/ohci-hcd.c5
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c216
3 files changed, 0 insertions, 231 deletions
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 3f1431d37e1..e6b64f60608 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -333,16 +333,6 @@ config USB_OHCI_ATH79
333 Enables support for the built-in OHCI controller present on the 333 Enables support for the built-in OHCI controller present on the
334 Atheros AR71XX/AR7240 SoCs. 334 Atheros AR71XX/AR7240 SoCs.
335 335
336config USB_OHCI_HCD_PPC_SOC
337 bool "OHCI support for on-chip PPC USB controller"
338 depends on USB_OHCI_HCD && (STB03xxx || PPC_MPC52xx)
339 default y
340 select USB_OHCI_BIG_ENDIAN_DESC
341 select USB_OHCI_BIG_ENDIAN_MMIO
342 ---help---
343 Enables support for the USB controller on the MPC52xx or
344 STB03xxx processor chip. If unsure, say Y.
345
346config USB_OHCI_HCD_PPC_OF_BE 336config USB_OHCI_HCD_PPC_OF_BE
347 bool "OHCI support for OF platform bus (big endian)" 337 bool "OHCI support for OF platform bus (big endian)"
348 depends on USB_OHCI_HCD && PPC_OF 338 depends on USB_OHCI_HCD && PPC_OF
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index cfc1da30667..4c4d652a446 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1067,11 +1067,6 @@ MODULE_LICENSE ("GPL");
1067#define PLATFORM_DRIVER ohci_hcd_pnx8550_driver 1067#define PLATFORM_DRIVER ohci_hcd_pnx8550_driver
1068#endif 1068#endif
1069 1069
1070#ifdef CONFIG_USB_OHCI_HCD_PPC_SOC
1071#include "ohci-ppc-soc.c"
1072#define PLATFORM_DRIVER ohci_hcd_ppc_soc_driver
1073#endif
1074
1075#ifdef CONFIG_ARCH_AT91 1070#ifdef CONFIG_ARCH_AT91
1076#include "ohci-at91.c" 1071#include "ohci-at91.c"
1077#define PLATFORM_DRIVER ohci_hcd_at91_driver 1072#define PLATFORM_DRIVER ohci_hcd_at91_driver
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
deleted file mode 100644
index 185c39ed81b..00000000000
--- a/drivers/usb/host/ohci-ppc-soc.c
+++ /dev/null
@@ -1,216 +0,0 @@
1/*
2 * OHCI HCD (Host Controller Driver) for USB.
3 *
4 * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
5 * (C) Copyright 2000-2002 David Brownell <dbrownell@users.sourceforge.net>
6 * (C) Copyright 2002 Hewlett-Packard Company
7 * (C) Copyright 2003-2005 MontaVista Software Inc.
8 *
9 * Bus Glue for PPC On-Chip OHCI driver
10 * Tested on Freescale MPC5200 and IBM STB04xxx
11 *
12 * Modified by Dale Farnsworth <dale@farnsworth.org> from ohci-sa1111.c
13 *
14 * This file is licenced under the GPL.
15 */
16
17#include <linux/platform_device.h>
18#include <linux/signal.h>
19
20/* configure so an HC device and id are always provided */
21/* always called with process context; sleeping is OK */
22
23/**
24 * usb_hcd_ppc_soc_probe - initialize On-Chip HCDs
25 * Context: !in_interrupt()
26 *
27 * Allocates basic resources for this USB host controller.
28 *
29 * Store this function in the HCD's struct pci_driver as probe().
30 */
31static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
32 struct platform_device *pdev)
33{
34 int retval;
35 struct usb_hcd *hcd;
36 struct ohci_hcd *ohci;
37 struct resource *res;
38 int irq;
39
40 pr_debug("initializing PPC-SOC USB Controller\n");
41
42 res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
43 if (!res) {
44 pr_debug("%s: no irq\n", __FILE__);
45 return -ENODEV;
46 }
47 irq = res->start;
48
49 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
50 if (!res) {
51 pr_debug("%s: no reg addr\n", __FILE__);
52 return -ENODEV;
53 }
54
55 hcd = usb_create_hcd(driver, &pdev->dev, "PPC-SOC USB");
56 if (!hcd)
57 return -ENOMEM;
58 hcd->rsrc_start = res->start;
59 hcd->rsrc_len = resource_size(res);
60
61 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
62 pr_debug("%s: request_mem_region failed\n", __FILE__);
63 retval = -EBUSY;
64 goto err1;
65 }
66
67 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
68 if (!hcd->regs) {
69 pr_debug("%s: ioremap failed\n", __FILE__);
70 retval = -ENOMEM;
71 goto err2;
72 }
73
74 ohci = hcd_to_ohci(hcd);
75 ohci->flags |= OHCI_QUIRK_BE_MMIO | OHCI_QUIRK_BE_DESC;
76
77#ifdef CONFIG_PPC_MPC52xx
78 /* MPC52xx doesn't need frame_no shift */
79 ohci->flags |= OHCI_QUIRK_FRAME_NO;
80#endif
81 ohci_hcd_init(ohci);
82
83 retval = usb_add_hcd(hcd, irq, 0);
84 if (retval == 0)
85 return retval;
86
87 pr_debug("Removing PPC-SOC USB Controller\n");
88
89 iounmap(hcd->regs);
90 err2:
91 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
92 err1:
93 usb_put_hcd(hcd);
94 return retval;
95}
96
97
98/* may be called without controller electrically present */
99/* may be called with controller, bus, and devices active */
100
101/**
102 * usb_hcd_ppc_soc_remove - shutdown processing for On-Chip HCDs
103 * @pdev: USB Host Controller being removed
104 * Context: !in_interrupt()
105 *
106 * Reverses the effect of usb_hcd_ppc_soc_probe().
107 * It is always called from a thread
108 * context, normally "rmmod", "apmd", or something similar.
109 *
110 */
111static void usb_hcd_ppc_soc_remove(struct usb_hcd *hcd,
112 struct platform_device *pdev)
113{
114 usb_remove_hcd(hcd);
115
116 pr_debug("stopping PPC-SOC USB Controller\n");
117
118 iounmap(hcd->regs);
119 release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
120 usb_put_hcd(hcd);
121}
122
123static int __devinit
124ohci_ppc_soc_start(struct usb_hcd *hcd)
125{
126 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
127 int ret;
128
129 if ((ret = ohci_init(ohci)) < 0)
130 return ret;
131
132 if ((ret = ohci_run(ohci)) < 0) {
133 dev_err(hcd->self.controller, "can't start %s\n",
134 hcd->self.bus_name);
135 ohci_stop(hcd);
136 return ret;
137 }
138
139 return 0;
140}
141
142static const struct hc_driver ohci_ppc_soc_hc_driver = {
143 .description = hcd_name,
144 .hcd_priv_size = sizeof(struct ohci_hcd),
145
146 /*
147 * generic hardware linkage
148 */
149 .irq = ohci_irq,
150 .flags = HCD_USB11 | HCD_MEMORY,
151
152 /*
153 * basic lifecycle operations
154 */
155 .start = ohci_ppc_soc_start,
156 .stop = ohci_stop,
157 .shutdown = ohci_shutdown,
158
159 /*
160 * managing i/o requests and associated device resources
161 */
162 .urb_enqueue = ohci_urb_enqueue,
163 .urb_dequeue = ohci_urb_dequeue,
164 .endpoint_disable = ohci_endpoint_disable,
165
166 /*
167 * scheduling support
168 */
169 .get_frame_number = ohci_get_frame,
170
171 /*
172 * root hub support
173 */
174 .hub_status_data = ohci_hub_status_data,
175 .hub_control = ohci_hub_control,
176#ifdef CONFIG_PM
177 .bus_suspend = ohci_bus_suspend,
178 .bus_resume = ohci_bus_resume,
179#endif
180 .start_port_reset = ohci_start_port_reset,
181};
182
183static int ohci_hcd_ppc_soc_drv_probe(struct platform_device *pdev)
184{
185 int ret;
186
187 if (usb_disabled())
188 return -ENODEV;
189
190 ret = usb_hcd_ppc_soc_probe(&ohci_ppc_soc_hc_driver, pdev);
191 return ret;
192}
193
194static int ohci_hcd_ppc_soc_drv_remove(struct platform_device *pdev)
195{
196 struct usb_hcd *hcd = platform_get_drvdata(pdev);
197
198 usb_hcd_ppc_soc_remove(hcd, pdev);
199 return 0;
200}
201
202static struct platform_driver ohci_hcd_ppc_soc_driver = {
203 .probe = ohci_hcd_ppc_soc_drv_probe,
204 .remove = ohci_hcd_ppc_soc_drv_remove,
205 .shutdown = usb_hcd_platform_shutdown,
206#ifdef CONFIG_PM
207 /*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/
208 /*.resume = ohci_hcd_ppc_soc_drv_resume,*/
209#endif
210 .driver = {
211 .name = "ppc-soc-ohci",
212 .owner = THIS_MODULE,
213 },
214};
215
216MODULE_ALIAS("platform:ppc-soc-ohci");