21 static int ohci_sm501_init(
struct usb_hcd *hcd)
23 return ohci_init(hcd_to_ohci(hcd));
26 static int ohci_sm501_start(
struct usb_hcd *hcd)
28 struct device *
dev = hcd->self.controller;
31 ret = ohci_run(hcd_to_ohci(hcd));
33 dev_err(dev,
"can't start %s", hcd->self.bus_name);
42 static const struct hc_driver ohci_sm501_hc_driver = {
43 .description = hcd_name,
44 .product_desc =
"SM501 OHCI",
45 .hcd_priv_size =
sizeof(
struct ohci_hcd),
51 .flags = HCD_USB11 | HCD_MEMORY | HCD_LOCAL_MEM,
56 .reset = ohci_sm501_init,
57 .start = ohci_sm501_start,
59 .shutdown = ohci_shutdown,
64 .urb_enqueue = ohci_urb_enqueue,
65 .urb_dequeue = ohci_urb_dequeue,
66 .endpoint_disable = ohci_endpoint_disable,
71 .get_frame_number = ohci_get_frame,
76 .hub_status_data = ohci_hub_status_data,
77 .hub_control = ohci_hub_control,
79 .bus_suspend = ohci_bus_suspend,
80 .bus_resume = ohci_bus_resume,
89 const struct hc_driver *
driver = &ohci_sm501_hc_driver;
93 struct usb_hcd *hcd =
NULL;
101 dev_err(dev,
"no resource definition for memory\n");
107 dev_err(dev,
"request_mem_region failed\n");
131 dev_err(dev,
"cannot declare coherent memory\n");
139 dev_err(dev,
"no resource definition for registers\n");
150 hcd->rsrc_start = res->
start;
151 hcd->rsrc_len = resource_size(res);
154 dev_err(dev,
"request_mem_region failed\n");
159 hcd->regs =
ioremap(hcd->rsrc_start, hcd->rsrc_len);
160 if (hcd->regs ==
NULL) {
161 dev_err(dev,
"cannot remap registers\n");
166 ohci_hcd_init(hcd_to_ohci(hcd));
194 struct usb_hcd *hcd = platform_get_drvdata(pdev);
210 platform_set_drvdata(pdev,
NULL);
220 struct ohci_hcd *
ohci = hcd_to_ohci(platform_get_drvdata(pdev));
233 struct usb_hcd *hcd = platform_get_drvdata(pdev);
234 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
241 ohci_finish_controller_resume(hcd);
245 #define ohci_sm501_suspend NULL
246 #define ohci_sm501_resume NULL
255 .probe = ohci_hcd_sm501_drv_probe,
256 .remove = ohci_hcd_sm501_drv_remove,