29 #include <linux/signal.h>
35 #define GRUSBHC_HCIVERSION 0x0100
38 static int ehci_grlib_setup(
struct usb_hcd *hcd)
40 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
43 retval = ehci_setup(hcd);
47 ehci_port_power(ehci, 1);
53 static const struct hc_driver ehci_grlib_hc_driver = {
54 .description = hcd_name,
55 .product_desc =
"GRLIB GRUSBHC EHCI",
56 .hcd_priv_size =
sizeof(
struct ehci_hcd),
62 .flags = HCD_MEMORY | HCD_USB2,
67 .reset = ehci_grlib_setup,
70 .shutdown = ehci_shutdown,
75 .urb_enqueue = ehci_urb_enqueue,
76 .urb_dequeue = ehci_urb_dequeue,
77 .endpoint_disable = ehci_endpoint_disable,
78 .endpoint_reset = ehci_endpoint_reset,
83 .get_frame_number = ehci_get_frame,
88 .hub_status_data = ehci_hub_status_data,
89 .hub_control = ehci_hub_control,
94 .relinquish_port = ehci_relinquish_port,
95 .port_handed_over = ehci_port_handed_over,
97 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
114 dev_dbg(&op->
dev,
"initializing GRUSBHC EHCI USB Controller\n");
121 op->
dev.dma_mask = &op->
dev.coherent_dma_mask;
127 hcd->rsrc_start =
res.start;
128 hcd->rsrc_len = resource_size(&
res);
139 pr_err(
"%s: devm_request_and_ioremap failed\n", __FILE__);
144 ehci = hcd_to_ehci(hcd);
146 ehci->
caps = hcd->regs;
149 hc_capbase = ehci_readl(ehci, &ehci->
caps->hc_capbase);
177 dev_dbg(&op->
dev,
"stopping GRLIB GRUSBHC EHCI USB Controller\n");
193 if (hcd->driver->shutdown)
194 hcd->driver->shutdown(hcd);
198 static const struct of_device_id ehci_hcd_grlib_of_match[] = {
200 .name =
"GAISLER_EHCI",
211 .probe = ehci_hcd_grlib_probe,
212 .remove = ehci_hcd_grlib_remove,
213 .shutdown = ehci_hcd_grlib_shutdown,
215 .name =
"grlib-ehci",
217 .of_match_table = ehci_hcd_grlib_of_match,