19 #define OCTEON_EHCI_HCD_NAME "octeon-ehci"
25 static void ehci_octeon_start(
void)
33 ehci_ctl.s.ehci_64b_addr_en = 1;
34 ehci_ctl.s.l2c_addr_msb = 0;
35 ehci_ctl.s.l2c_buff_emod = 1;
36 ehci_ctl.s.l2c_desc_emod = 1;
40 static void ehci_octeon_stop(
void)
45 static const struct hc_driver ehci_octeon_hc_driver = {
46 .description = hcd_name,
47 .product_desc =
"Octeon EHCI",
48 .hcd_priv_size =
sizeof(
struct ehci_hcd),
54 .flags = HCD_MEMORY | HCD_USB2,
62 .shutdown = ehci_shutdown,
67 .urb_enqueue = ehci_urb_enqueue,
68 .urb_dequeue = ehci_urb_dequeue,
69 .endpoint_disable = ehci_endpoint_disable,
70 .endpoint_reset = ehci_endpoint_reset,
75 .get_frame_number = ehci_get_frame,
80 .hub_status_data = ehci_hub_status_data,
81 .hub_control = ehci_hub_control,
84 .relinquish_port = ehci_relinquish_port,
85 .port_handed_over = ehci_port_handed_over,
87 .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
110 if (res_mem ==
NULL) {
111 dev_err(&pdev->
dev,
"No register space assigned\n");
120 pdev->
dev.dma_mask = &ehci_octeon_dma_mask;
126 hcd->rsrc_start = res_mem->
start;
127 hcd->rsrc_len = resource_size(res_mem);
131 dev_err(&pdev->
dev,
"request_mem_region failed\n");
136 hcd->regs =
ioremap(hcd->rsrc_start, hcd->rsrc_len);
145 ehci = hcd_to_ehci(hcd);
152 ehci->
caps = hcd->regs;
156 dev_dbg(&pdev->
dev,
"failed to add hcd with err %d\n", ret);
160 platform_set_drvdata(pdev, hcd);
163 ehci_port_power(ehci, 1);
179 struct usb_hcd *hcd = platform_get_drvdata(pdev);
188 platform_set_drvdata(pdev,
NULL);
194 .probe = ehci_octeon_drv_probe,
195 .remove = ehci_octeon_drv_remove,