26 static int ohci_exynos_start(
struct usb_hcd *hcd)
31 ohci_dbg(ohci,
"ohci_exynos_start, ohci:%p", ohci);
33 ret = ohci_init(ohci);
39 dev_err(hcd->self.controller,
"can't start %s\n",
48 static const struct hc_driver exynos_ohci_hc_driver = {
49 .description = hcd_name,
50 .product_desc =
"EXYNOS OHCI Host Controller",
51 .hcd_priv_size =
sizeof(
struct ohci_hcd),
54 .flags = HCD_MEMORY|HCD_USB11,
56 .start = ohci_exynos_start,
58 .shutdown = ohci_shutdown,
60 .get_frame_number = ohci_get_frame,
62 .urb_enqueue = ohci_urb_enqueue,
63 .urb_dequeue = ohci_urb_dequeue,
64 .endpoint_disable = ohci_endpoint_disable,
66 .hub_status_data = ohci_hub_status_data,
67 .hub_control = ohci_hub_control,
69 .bus_suspend = ohci_bus_suspend,
70 .bus_resume = ohci_bus_resume,
87 pdata = pdev->
dev.platform_data;
89 dev_err(&pdev->
dev,
"No platform data defined\n");
98 if (!pdev->
dev.dma_mask)
99 pdev->
dev.dma_mask = &ohci_exynos_dma_mask;
100 if (!pdev->
dev.coherent_dma_mask)
108 exynos_ohci->
dev = &pdev->
dev;
111 dev_name(&pdev->
dev));
113 dev_err(&pdev->
dev,
"Unable to create HCD\n");
117 exynos_ohci->
hcd = hcd;
120 if (IS_ERR(exynos_ohci->
clk)) {
121 dev_err(&pdev->
dev,
"Failed to get usbhost clock\n");
122 err = PTR_ERR(exynos_ohci->
clk);
132 dev_err(&pdev->
dev,
"Failed to get I/O memory\n");
137 hcd->rsrc_start = res->
start;
138 hcd->rsrc_len = resource_size(res);
141 dev_err(&pdev->
dev,
"Failed to remap I/O memory\n");
156 ohci = hcd_to_ohci(hcd);
161 dev_err(&pdev->
dev,
"Failed to add USB HCD\n");
165 platform_set_drvdata(pdev, exynos_ohci);
182 struct usb_hcd *hcd = exynos_ohci->
hcd;
200 struct usb_hcd *hcd = exynos_ohci->
hcd;
202 if (hcd->driver->shutdown)
203 hcd->driver->shutdown(hcd);
210 struct usb_hcd *hcd = exynos_ohci->
hcd;
211 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
230 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
238 spin_unlock_irqrestore(&ohci->
lock, flags);
246 struct usb_hcd *hcd = exynos_ohci->
hcd;
256 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
258 ohci_finish_controller_resume(hcd);
263 #define exynos_ohci_suspend NULL
264 #define exynos_ohci_resume NULL
267 static const struct dev_pm_ops exynos_ohci_pm_ops = {
273 static const struct of_device_id exynos_ohci_match[] = {
281 .probe = exynos_ohci_probe,
283 .shutdown = exynos_ohci_shutdown,
285 .name =
"exynos-ohci",
287 .pm = &exynos_ohci_pm_ops,