15 #include <linux/signal.h>
21 static const struct hc_driver ehci_ppc_of_hc_driver = {
22 .description = hcd_name,
23 .product_desc =
"OF EHCI",
24 .hcd_priv_size =
sizeof(
struct ehci_hcd),
30 .flags = HCD_MEMORY | HCD_USB2,
38 .shutdown = ehci_shutdown,
43 .urb_enqueue = ehci_urb_enqueue,
44 .urb_dequeue = ehci_urb_dequeue,
45 .endpoint_disable = ehci_endpoint_disable,
46 .endpoint_reset = ehci_endpoint_reset,
51 .get_frame_number = ehci_get_frame,
56 .hub_status_data = ehci_hub_status_data,
57 .hub_control = ehci_hub_control,
62 .relinquish_port = ehci_relinquish_port,
63 .port_handed_over = ehci_port_handed_over,
65 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
73 #define PPC440EPX_EHCI0_INSREG_BMT (0x1 << 0)
104 dev_dbg(&op->
dev,
"initializing PPC-OF USB Controller\n");
114 hcd->rsrc_start =
res.start;
115 hcd->rsrc_len = resource_size(&
res);
126 pr_err(
"%s: devm_request_and_ioremap failed\n", __FILE__);
131 ehci = hcd_to_ehci(hcd);
141 pr_debug(
"%s: no ohci offset in fdt\n", __FILE__);
143 pr_debug(
"%s: ioremap for ohci hcctrl failed\n", __FILE__);
158 ehci->
caps = hcd->regs;
161 rv = ppc44x_enable_bmt(dn);
162 ehci_dbg(ehci,
"Break Memory Transfer (BMT) is %senabled!\n",
184 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
191 dev_dbg(&op->
dev,
"stopping PPC-OF USB Controller\n");
206 set_ohci_hcfs(ehci, 1);
210 pr_debug(
"%s: no ohci offset in fdt\n", __FILE__);
224 if (hcd->driver->shutdown)
225 hcd->driver->shutdown(hcd);
229 static const struct of_device_id ehci_hcd_ppc_of_match[] = {
231 .compatible =
"usb-ehci",
239 .probe = ehci_hcd_ppc_of_probe,
240 .remove = ehci_hcd_ppc_of_remove,
241 .shutdown = ehci_hcd_ppc_of_shutdown,
243 .name =
"ppc-of-ehci",
245 .of_match_table = ehci_hcd_ppc_of_match,