Lines Matching full:hcd
3 * OHCI HCD (Host Controller Driver) for USB.
29 #include <linux/usb/hcd.h>
98 struct usb_hcd *hcd = platform_get_drvdata(pdev); in at91_start_hc() local
99 struct ohci_regs __iomem *regs = hcd->regs; in at91_start_hc()
100 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in at91_start_hc()
117 struct usb_hcd *hcd = platform_get_drvdata(pdev); in at91_stop_hc() local
118 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in at91_stop_hc()
177 * then invokes the start() method for the HCD associated with it
186 struct usb_hcd *hcd; in usb_hcd_at91_probe() local
196 hcd = usb_create_hcd(driver, dev, dev_name(dev)); in usb_hcd_at91_probe()
197 if (!hcd) in usb_hcd_at91_probe()
199 ohci_at91 = hcd_to_ohci_at91_priv(hcd); in usb_hcd_at91_probe()
201 hcd->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in usb_hcd_at91_probe()
202 if (IS_ERR(hcd->regs)) { in usb_hcd_at91_probe()
203 retval = PTR_ERR(hcd->regs); in usb_hcd_at91_probe()
206 hcd->rsrc_start = res->start; in usb_hcd_at91_probe()
207 hcd->rsrc_len = resource_size(res); in usb_hcd_at91_probe()
236 board = hcd->self.controller->platform_data; in usb_hcd_at91_probe()
237 ohci = hcd_to_ohci(hcd); in usb_hcd_at91_probe()
247 retval = usb_add_hcd(hcd, irq, IRQF_SHARED); in usb_hcd_at91_probe()
249 device_wakeup_enable(hcd->self.controller); in usb_hcd_at91_probe()
257 usb_put_hcd(hcd); in usb_hcd_at91_probe()
266 * @hcd: USB controller to remove
272 * the HCD's stop() method. It is always called from a thread
275 static void usb_hcd_at91_remove(struct usb_hcd *hcd, in usb_hcd_at91_remove() argument
278 usb_remove_hcd(hcd); in usb_hcd_at91_remove()
280 usb_put_hcd(hcd); in usb_hcd_at91_remove()
303 static int ohci_at91_hub_status_data(struct usb_hcd *hcd, char *buf) in ohci_at91_hub_status_data() argument
305 struct at91_usbh_data *pdata = hcd->self.controller->platform_data; in ohci_at91_hub_status_data()
306 int length = ohci_hub_status_data(hcd, buf); in ohci_at91_hub_status_data()
351 static int ohci_at91_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue, in ohci_at91_hub_control() argument
354 struct at91_usbh_data *pdata = dev_get_platdata(hcd->self.controller); in ohci_at91_hub_control()
355 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_at91_hub_control()
360 dev_dbg(hcd->self.controller, in ohci_at91_hub_control()
362 hcd, typeReq, wValue, wIndex, buf, wLength); in ohci_at91_hub_control()
370 dev_dbg(hcd->self.controller, "SetPortFeat: POWER\n"); in ohci_at91_hub_control()
379 dev_dbg(hcd->self.controller, "SetPortFeat: SUSPEND\n"); in ohci_at91_hub_control()
391 dev_dbg(hcd->self.controller, in ohci_at91_hub_control()
402 dev_dbg(hcd->self.controller, in ohci_at91_hub_control()
411 dev_dbg(hcd->self.controller, in ohci_at91_hub_control()
421 dev_dbg(hcd->self.controller, "ClearPortFeature: SUSPEND\n"); in ohci_at91_hub_control()
431 ret = ohci_hub_control(hcd, typeReq, wValue, wIndex + 1, buf, wLength); in ohci_at91_hub_control()
442 dev_dbg(hcd->self.controller, "wHubCharacteristics 0x%04x\n", in ohci_at91_hub_control()
459 dev_dbg(hcd->self.controller, "wHubCharacteristics after 0x%04x\n", in ohci_at91_hub_control()
467 dev_dbg(hcd->self.controller, "GetPortStatus(%d)\n", wIndex); in ohci_at91_hub_control()
616 struct usb_hcd *hcd = dev_get_drvdata(dev); in ohci_hcd_at91_drv_suspend() local
617 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_hcd_at91_drv_suspend()
618 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_hcd_at91_drv_suspend()
629 enable_irq_wake(hcd->irq); in ohci_hcd_at91_drv_suspend()
631 ret = ohci_suspend(hcd, ohci_at91->wakeup); in ohci_hcd_at91_drv_suspend()
634 disable_irq_wake(hcd->irq); in ohci_hcd_at91_drv_suspend()
662 struct usb_hcd *hcd = dev_get_drvdata(dev); in ohci_hcd_at91_drv_resume() local
663 struct ohci_at91_priv *ohci_at91 = hcd_to_ohci_at91_priv(hcd); in ohci_hcd_at91_drv_resume()
668 disable_irq_wake(hcd->irq); in ohci_hcd_at91_drv_resume()
678 ohci_resume(hcd, !ohci_at91->wakeup); in ohci_hcd_at91_drv_resume()