28 #include <linux/signal.h>
48 static int ehci_xilinx_port_handed_over(
struct usb_hcd *hcd,
int portnum)
50 dev_warn(hcd->self.controller,
"port %d cannot be enabled\n", portnum);
53 "Maybe you have connected a low speed device?\n");
56 "We do not support low speed devices\n");
59 "Maybe your device is not a high speed device?\n");
61 "The USB host controller does not support full speed "
62 "nor low speed devices\n");
64 "You can reconfigure the host controller to have "
65 "full speed support\n");
72 static const struct hc_driver ehci_xilinx_of_hc_driver = {
73 .description = hcd_name,
74 .product_desc =
"OF EHCI",
75 .hcd_priv_size =
sizeof(
struct ehci_hcd),
81 .flags = HCD_MEMORY | HCD_USB2,
89 .shutdown = ehci_shutdown,
94 .urb_enqueue = ehci_urb_enqueue,
95 .urb_dequeue = ehci_urb_dequeue,
96 .endpoint_disable = ehci_endpoint_disable,
97 .endpoint_reset = ehci_endpoint_reset,
102 .get_frame_number = ehci_get_frame,
107 .hub_status_data = ehci_hub_status_data,
108 .hub_control = ehci_hub_control,
113 .relinquish_port =
NULL,
114 .port_handed_over = ehci_xilinx_port_handed_over,
116 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
141 dev_dbg(&op->
dev,
"initializing XILINX-OF USB Controller\n");
152 hcd->rsrc_start =
res.start;
153 hcd->rsrc_len = resource_size(&
res);
164 pr_err(
"%s: devm_request_and_ioremap failed\n", __FILE__);
169 ehci = hcd_to_ehci(hcd);
180 if (value && (*value == 1)) {
181 ehci_dbg(ehci,
"USB host controller supports FS devices\n");
185 "USB host controller is HS only\n");
191 ehci->
caps = hcd->regs + 0x100;
215 dev_dbg(&op->
dev,
"stopping XILINX-OF USB Controller\n");
234 if (hcd->driver->shutdown)
235 hcd->driver->shutdown(hcd);
239 static const struct of_device_id ehci_hcd_xilinx_of_match[] = {
240 {.compatible =
"xlnx,xps-usb-host-1.00.a",},
246 .probe = ehci_hcd_xilinx_of_probe,
247 .remove = ehci_hcd_xilinx_of_remove,
248 .shutdown = ehci_hcd_xilinx_of_shutdown,
250 .name =
"xilinx-of-ehci",
252 .of_match_table = ehci_hcd_xilinx_of_match,