aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/host.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/chipidea/host.c')
-rw-r--r--drivers/usb/chipidea/host.c67
1 files changed, 5 insertions, 62 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index ebff9f4f56ec..caecad9213f5 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -20,77 +20,18 @@
20 */ 20 */
21 21
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/io.h>
23#include <linux/usb.h> 24#include <linux/usb.h>
24#include <linux/usb/hcd.h> 25#include <linux/usb/hcd.h>
25#include <linux/usb/chipidea.h> 26#include <linux/usb/chipidea.h>
26 27
27#define CHIPIDEA_EHCI 28#include "../host/ehci.h"
28#include "../host/ehci-hcd.c"
29 29
30#include "ci.h" 30#include "ci.h"
31#include "bits.h" 31#include "bits.h"
32#include "host.h" 32#include "host.h"
33 33
34static int ci_ehci_setup(struct usb_hcd *hcd) 34static struct hc_driver __read_mostly ci_ehci_hc_driver;
35{
36 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
37 int ret;
38
39 hcd->has_tt = 1;
40
41 ret = ehci_setup(hcd);
42 if (ret)
43 return ret;
44
45 ehci_port_power(ehci, 0);
46
47 return ret;
48}
49
50static const struct hc_driver ci_ehci_hc_driver = {
51 .description = "ehci_hcd",
52 .product_desc = "ChipIdea HDRC EHCI",
53 .hcd_priv_size = sizeof(struct ehci_hcd),
54
55 /*
56 * generic hardware linkage
57 */
58 .irq = ehci_irq,
59 .flags = HCD_MEMORY | HCD_USB2,
60
61 /*
62 * basic lifecycle operations
63 */
64 .reset = ci_ehci_setup,
65 .start = ehci_run,
66 .stop = ehci_stop,
67 .shutdown = ehci_shutdown,
68
69 /*
70 * managing i/o requests and associated device resources
71 */
72 .urb_enqueue = ehci_urb_enqueue,
73 .urb_dequeue = ehci_urb_dequeue,
74 .endpoint_disable = ehci_endpoint_disable,
75 .endpoint_reset = ehci_endpoint_reset,
76
77 /*
78 * scheduling support
79 */
80 .get_frame_number = ehci_get_frame,
81
82 /*
83 * root hub support
84 */
85 .hub_status_data = ehci_hub_status_data,
86 .hub_control = ehci_hub_control,
87 .bus_suspend = ehci_bus_suspend,
88 .bus_resume = ehci_bus_resume,
89 .relinquish_port = ehci_relinquish_port,
90 .port_handed_over = ehci_port_handed_over,
91
92 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
93};
94 35
95static irqreturn_t host_irq(struct ci13xxx *ci) 36static irqreturn_t host_irq(struct ci13xxx *ci)
96{ 37{
@@ -157,5 +98,7 @@ int ci_hdrc_host_init(struct ci13xxx *ci)
157 rdrv->name = "host"; 98 rdrv->name = "host";
158 ci->roles[CI_ROLE_HOST] = rdrv; 99 ci->roles[CI_ROLE_HOST] = rdrv;
159 100
101 ehci_init_driver(&ci_ehci_hc_driver, NULL);
102
160 return 0; 103 return 0;
161} 104}