19 #define OCTEON_OHCI_HCD_NAME "octeon-ohci"
25 static void ohci_octeon_hw_start(
void)
32 ohci_ctl.s.l2c_addr_msb = 0;
33 ohci_ctl.s.l2c_buff_emod = 1;
34 ohci_ctl.s.l2c_desc_emod = 1;
39 static void ohci_octeon_hw_stop(
void)
45 static int __devinit ohci_octeon_start(
struct usb_hcd *hcd)
50 ret = ohci_init(ohci);
58 ohci_err(ohci,
"can't start %s", hcd->self.bus_name);
66 static const struct hc_driver ohci_octeon_hc_driver = {
67 .description = hcd_name,
68 .product_desc =
"Octeon OHCI",
69 .hcd_priv_size =
sizeof(
struct ohci_hcd),
75 .flags = HCD_USB11 | HCD_MEMORY,
80 .start = ohci_octeon_start,
82 .shutdown = ohci_shutdown,
87 .urb_enqueue = ohci_urb_enqueue,
88 .urb_dequeue = ohci_urb_dequeue,
89 .endpoint_disable = ohci_endpoint_disable,
94 .get_frame_number = ohci_get_frame,
99 .hub_status_data = ohci_hub_status_data,
100 .hub_control = ohci_hub_control,
124 if (res_mem ==
NULL) {
125 dev_err(&pdev->
dev,
"No register space assigned\n");
131 pdev->
dev.dma_mask = &pdev->
dev.coherent_dma_mask;
137 hcd->rsrc_start = res_mem->
start;
138 hcd->rsrc_len = resource_size(res_mem);
142 dev_err(&pdev->
dev,
"request_mem_region failed\n");
147 reg_base =
ioremap(hcd->rsrc_start, hcd->rsrc_len);
154 ohci_octeon_hw_start();
156 hcd->regs = reg_base;
158 ohci = hcd_to_ohci(hcd);
169 dev_dbg(&pdev->
dev,
"failed to add hcd with err %d\n", ret);
173 platform_set_drvdata(pdev, hcd);
178 ohci_octeon_hw_stop();
190 struct usb_hcd *hcd = platform_get_drvdata(pdev);
194 ohci_octeon_hw_stop();
199 platform_set_drvdata(pdev,
NULL);
205 .probe = ohci_octeon_drv_probe,
206 .remove = ohci_octeon_drv_remove,