43 #define CCR_REVID 0x08
48 #define CCR_LMW1L 0x54
49 #define CCR_LMW1H 0x56
50 #define CCR_LMW1BL 0x58
51 #define CCR_LMW1BH 0x5A
52 #define CCR_LMW2L 0x5C
53 #define CCR_LMW2H 0x5E
54 #define CCR_LMW2BL 0x60
55 #define CCR_LMW2BH 0x62
58 #define CCR_PM_GKEN 0x0001
59 #define CCR_PM_CKRNEN 0x0002
60 #define CCR_PM_USBPW1 0x0004
61 #define CCR_PM_USBPW2 0x0008
62 #define CCR_PM_USBPW3 0x0008
63 #define CCR_PM_PMEE 0x0100
64 #define CCR_PM_PMES 0x8000
73 #define hcd_to_tmio(hcd) ((struct tmio_hcd *)(hcd_to_ohci(hcd) + 1))
79 struct usb_hcd *hcd = platform_get_drvdata(dev);
90 spin_unlock_irqrestore(&tmio->
lock, flags);
95 struct usb_hcd *hcd = platform_get_drvdata(dev);
120 struct usb_hcd *hcd = platform_get_drvdata(dev);
122 unsigned long base = hcd->rsrc_start;
130 dev_info(&dev->
dev,
"revision %d @ 0x%08llx, irq %d\n",
134 static int ohci_tmio_start(
struct usb_hcd *hcd)
136 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
139 if ((ret = ohci_init(ohci)) < 0)
142 if ((ret = ohci_run(ohci)) < 0) {
143 dev_err(hcd->self.controller,
"can't start %s\n",
152 static const struct hc_driver ohci_tmio_hc_driver = {
153 .description = hcd_name,
154 .product_desc =
"TMIO OHCI USB Host Controller",
159 .flags = HCD_USB11 | HCD_MEMORY | HCD_LOCAL_MEM,
162 .start = ohci_tmio_start,
164 .shutdown = ohci_shutdown,
167 .urb_enqueue = ohci_urb_enqueue,
168 .urb_dequeue = ohci_urb_dequeue,
169 .endpoint_disable = ohci_endpoint_disable,
172 .get_frame_number = ohci_get_frame,
175 .hub_status_data = ohci_hub_status_data,
176 .hub_control = ohci_hub_control,
178 .bus_suspend = ohci_bus_suspend,
179 .bus_resume = ohci_bus_resume,
189 const struct mfd_cell *cell = mfd_get_cell(dev);
208 goto err_usb_create_hcd;
211 hcd->rsrc_start = regs->
start;
212 hcd->rsrc_len = resource_size(regs);
221 goto err_ioremap_ccr;
224 hcd->regs =
ioremap(hcd->rsrc_start, hcd->rsrc_len);
227 goto err_ioremap_regs;
235 goto err_dma_declare;
245 ohci = hcd_to_ohci(hcd);
276 struct usb_hcd *hcd = platform_get_drvdata(dev);
278 const struct mfd_cell *cell = mfd_get_cell(dev);
289 platform_set_drvdata(dev,
NULL);
297 const struct mfd_cell *cell = mfd_get_cell(dev);
298 struct usb_hcd *hcd = platform_get_drvdata(dev);
299 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
315 spin_unlock_irqrestore(&tmio->
lock, flags);
327 const struct mfd_cell *cell = mfd_get_cell(dev);
328 struct usb_hcd *hcd = platform_get_drvdata(dev);
329 struct ohci_hcd *ohci = hcd_to_ohci(hcd);
353 spin_unlock_irqrestore(&tmio->
lock, flags);
355 ohci_finish_controller_resume(hcd);
360 #define ohci_hcd_tmio_drv_suspend NULL
361 #define ohci_hcd_tmio_drv_resume NULL
365 .probe = ohci_hcd_tmio_drv_probe,