aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2012-10-08 09:11:23 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-22 14:23:57 -0400
commit1de7d89c76350de456143503d52447a466b4025e (patch)
treebe1d23ba3f351c1a5f0dd0d27a87ff284e6e8c24 /drivers/usb/host
parent2be350fafe3fe09765026f41d250dc5d3f000b1a (diff)
USB: EHCI: remove Alchemy EHCI driver
The platform code has been converted to use the ehci-platform driver instead thus obsoleting the ehci-au1xxx driver, which can be removed. 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>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-au1xxx.c184
-rw-r--r--drivers/usb/host/ehci-hcd.c5
2 files changed, 0 insertions, 189 deletions
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
deleted file mode 100644
index 65c945eb4144..000000000000
--- a/drivers/usb/host/ehci-au1xxx.c
+++ /dev/null
@@ -1,184 +0,0 @@
1/*
2 * EHCI HCD (Host Controller Driver) for USB.
3 *
4 * Bus Glue for AMD Alchemy Au1xxx
5 *
6 * Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org>
7 *
8 * Modified for AMD Alchemy Au1200 EHC
9 * by K.Boge <karsten.boge@amd.com>
10 *
11 * This file is licenced under the GPL.
12 */
13
14#include <linux/platform_device.h>
15#include <asm/mach-au1x00/au1000.h>
16
17
18extern int usb_disabled(void);
19
20static int au1xxx_ehci_setup(struct usb_hcd *hcd)
21{
22 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
23 int ret;
24
25 ehci->caps = hcd->regs;
26 ret = ehci_setup(hcd);
27
28 ehci->need_io_watchdog = 0;
29 return ret;
30}
31
32static const struct hc_driver ehci_au1xxx_hc_driver = {
33 .description = hcd_name,
34 .product_desc = "Au1xxx EHCI",
35 .hcd_priv_size = sizeof(struct ehci_hcd),
36
37 /*
38 * generic hardware linkage
39 */
40 .irq = ehci_irq,
41 .flags = HCD_MEMORY | HCD_USB2,
42
43 /*
44 * basic lifecycle operations
45 *
46 * FIXME -- ehci_init() doesn't do enough here.
47 * See ehci-ppc-soc for a complete implementation.
48 */
49 .reset = au1xxx_ehci_setup,
50 .start = ehci_run,
51 .stop = ehci_stop,
52 .shutdown = ehci_shutdown,
53
54 /*
55 * managing i/o requests and associated device resources
56 */
57 .urb_enqueue = ehci_urb_enqueue,
58 .urb_dequeue = ehci_urb_dequeue,
59 .endpoint_disable = ehci_endpoint_disable,
60 .endpoint_reset = ehci_endpoint_reset,
61
62 /*
63 * scheduling support
64 */
65 .get_frame_number = ehci_get_frame,
66
67 /*
68 * root hub support
69 */
70 .hub_status_data = ehci_hub_status_data,
71 .hub_control = ehci_hub_control,
72 .bus_suspend = ehci_bus_suspend,
73 .bus_resume = ehci_bus_resume,
74 .relinquish_port = ehci_relinquish_port,
75 .port_handed_over = ehci_port_handed_over,
76
77 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
78};
79
80static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
81{
82 struct usb_hcd *hcd;
83 struct resource *res;
84 int ret;
85
86 if (usb_disabled())
87 return -ENODEV;
88
89 if (pdev->resource[1].flags != IORESOURCE_IRQ) {
90 pr_debug("resource[1] is not IORESOURCE_IRQ");
91 return -ENOMEM;
92 }
93 hcd = usb_create_hcd(&ehci_au1xxx_hc_driver, &pdev->dev, "Au1xxx");
94 if (!hcd)
95 return -ENOMEM;
96
97 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
98 hcd->rsrc_start = res->start;
99 hcd->rsrc_len = resource_size(res);
100
101 hcd->regs = devm_request_and_ioremap(&pdev->dev, res);
102 if (!hcd->regs) {
103 pr_debug("devm_request_and_ioremap failed");
104 ret = -ENOMEM;
105 goto err1;
106 }
107
108 if (alchemy_usb_control(ALCHEMY_USB_EHCI0, 1)) {
109 printk(KERN_INFO "%s: controller init failed!\n", pdev->name);
110 ret = -ENODEV;
111 goto err1;
112 }
113
114 ret = usb_add_hcd(hcd, pdev->resource[1].start,
115 IRQF_SHARED);
116 if (ret == 0) {
117 platform_set_drvdata(pdev, hcd);
118 return ret;
119 }
120
121 alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
122err1:
123 usb_put_hcd(hcd);
124 return ret;
125}
126
127static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev)
128{
129 struct usb_hcd *hcd = platform_get_drvdata(pdev);
130
131 usb_remove_hcd(hcd);
132 alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
133 usb_put_hcd(hcd);
134 platform_set_drvdata(pdev, NULL);
135
136 return 0;
137}
138
139#ifdef CONFIG_PM
140static int ehci_hcd_au1xxx_drv_suspend(struct device *dev)
141{
142 struct usb_hcd *hcd = dev_get_drvdata(dev);
143 bool do_wakeup = device_may_wakeup(dev);
144 int rc;
145
146 rc = ehci_suspend(hcd, do_wakeup);
147 alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
148
149 return rc;
150}
151
152static int ehci_hcd_au1xxx_drv_resume(struct device *dev)
153{
154 struct usb_hcd *hcd = dev_get_drvdata(dev);
155
156 alchemy_usb_control(ALCHEMY_USB_EHCI0, 1);
157 ehci_resume(hcd, false);
158
159 return 0;
160}
161
162static const struct dev_pm_ops au1xxx_ehci_pmops = {
163 .suspend = ehci_hcd_au1xxx_drv_suspend,
164 .resume = ehci_hcd_au1xxx_drv_resume,
165};
166
167#define AU1XXX_EHCI_PMOPS &au1xxx_ehci_pmops
168
169#else
170#define AU1XXX_EHCI_PMOPS NULL
171#endif
172
173static struct platform_driver ehci_hcd_au1xxx_driver = {
174 .probe = ehci_hcd_au1xxx_drv_probe,
175 .remove = ehci_hcd_au1xxx_drv_remove,
176 .shutdown = usb_hcd_platform_shutdown,
177 .driver = {
178 .name = "au1xxx-ehci",
179 .owner = THIS_MODULE,
180 .pm = AU1XXX_EHCI_PMOPS,
181 }
182};
183
184MODULE_ALIAS("platform:au1xxx-ehci");
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 6202407b2a62..add37bc4bc18 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1219,11 +1219,6 @@ MODULE_LICENSE ("GPL");
1219#define PLATFORM_DRIVER ehci_hcd_sh_driver 1219#define PLATFORM_DRIVER ehci_hcd_sh_driver
1220#endif 1220#endif
1221 1221
1222#ifdef CONFIG_MIPS_ALCHEMY
1223#include "ehci-au1xxx.c"
1224#define PLATFORM_DRIVER ehci_hcd_au1xxx_driver
1225#endif
1226
1227#ifdef CONFIG_USB_EHCI_HCD_OMAP 1222#ifdef CONFIG_USB_EHCI_HCD_OMAP
1228#include "ehci-omap.c" 1223#include "ehci-omap.c"
1229#define PLATFORM_DRIVER ehci_hcd_omap_driver 1224#define PLATFORM_DRIVER ehci_hcd_omap_driver