22 #include <linux/signal.h>
29 static int __devinit ohci_au1xxx_start(
struct usb_hcd *hcd)
34 ohci_dbg(ohci,
"ohci_au1xxx_start, ohci:%p", ohci);
36 if ((ret = ohci_init(ohci)) < 0)
39 if ((ret = ohci_run(ohci)) < 0) {
40 dev_err(hcd->self.controller,
"can't start %s",
49 static const struct hc_driver ohci_au1xxx_hc_driver = {
50 .description = hcd_name,
51 .product_desc =
"Au1xxx OHCI",
52 .hcd_priv_size =
sizeof(
struct ohci_hcd),
58 .flags = HCD_USB11 | HCD_MEMORY,
63 .start = ohci_au1xxx_start,
65 .shutdown = ohci_shutdown,
70 .urb_enqueue = ohci_urb_enqueue,
71 .urb_dequeue = ohci_urb_dequeue,
72 .endpoint_disable = ohci_endpoint_disable,
77 .get_frame_number = ohci_get_frame,
82 .hub_status_data = ohci_hub_status_data,
83 .hub_control = ohci_hub_control,
85 .bus_suspend = ohci_bus_suspend,
86 .bus_resume = ohci_bus_resume,
100 pr_debug(
"resource[1] is not IORESOURCE_IRQ\n");
108 hcd->rsrc_start = pdev->
resource[0].start;
112 pr_debug(
"request_mem_region failed\n");
117 hcd->regs =
ioremap(hcd->rsrc_start, hcd->rsrc_len);
132 ohci_hcd_init(hcd_to_ohci(hcd));
137 platform_set_drvdata(pdev, hcd);
153 struct usb_hcd *hcd = platform_get_drvdata(pdev);
163 platform_set_drvdata(pdev,
NULL);
169 static int ohci_hcd_au1xxx_drv_suspend(
struct device *
dev)
172 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
191 clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
195 spin_unlock_irqrestore(&ohci->
lock, flags);
200 static int ohci_hcd_au1xxx_drv_resume(
struct device *dev)
206 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
207 ohci_finish_controller_resume(hcd);
212 static const struct dev_pm_ops au1xxx_ohci_pmops = {
213 .
suspend = ohci_hcd_au1xxx_drv_suspend,
214 .resume = ohci_hcd_au1xxx_drv_resume,
217 #define AU1XXX_OHCI_PMOPS &au1xxx_ohci_pmops
220 #define AU1XXX_OHCI_PMOPS NULL
224 .probe = ohci_hcd_au1xxx_drv_probe,
225 .remove = ohci_hcd_au1xxx_drv_remove,
228 .name =
"au1xxx-ohci",