Lines Matching full:hcd
3 * OHCI HCD (Host Controller Driver) for USB.
35 #include <linux/usb/hcd.h>
72 struct usb_hcd *hcd = ohci_to_hcd(ohci); in start_hnp() local
73 const unsigned port = hcd->self.otg_port - 1; in start_hnp()
77 otg_start_hnp(hcd->usb_phy->otg); in start_hnp()
80 hcd->usb_phy->otg->state = OTG_STATE_A_SUSPEND; in start_hnp()
90 static int ohci_omap_reset(struct usb_hcd *hcd) in ohci_omap_reset() argument
92 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_reset()
93 struct omap_usb_config *config = dev_get_platdata(hcd->self.controller); in ohci_omap_reset()
94 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_reset()
98 dev_dbg(hcd->self.controller, "starting USB Controller\n"); in ohci_omap_reset()
101 hcd->self.otg_port = config->otg; in ohci_omap_reset()
103 hcd->power_budget = 8; in ohci_omap_reset()
111 hcd->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2); in ohci_omap_reset()
112 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { in ohci_omap_reset()
113 int status = otg_set_host(hcd->usb_phy->otg, in ohci_omap_reset()
115 dev_dbg(hcd->self.controller, "init %s phy, status %d\n", in ohci_omap_reset()
116 hcd->usb_phy->label, status); in ohci_omap_reset()
118 usb_put_phy(hcd->usb_phy); in ohci_omap_reset()
124 hcd->skip_phy_initialization = 1; in ohci_omap_reset()
133 ret = ohci_setup(hcd); in ohci_omap_reset()
193 * then invokes the start() method for the HCD associated with it
199 struct usb_hcd *hcd = 0; in ohci_hcd_omap_probe() local
214 hcd = usb_create_hcd(&ohci_omap_hc_driver, &pdev->dev, in ohci_hcd_omap_probe()
216 if (!hcd) in ohci_hcd_omap_probe()
219 hcd->rsrc_start = pdev->resource[0].start; in ohci_hcd_omap_probe()
220 hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; in ohci_hcd_omap_probe()
221 priv = hcd_to_ohci_omap_priv(hcd); in ohci_hcd_omap_probe()
270 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { in ohci_hcd_omap_probe()
276 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_probe()
277 if (!hcd->regs) { in ohci_hcd_omap_probe()
278 dev_err(&pdev->dev, "can't ioremap OHCI HCD\n"); in ohci_hcd_omap_probe()
288 retval = usb_add_hcd(hcd, irq, 0); in ohci_hcd_omap_probe()
292 device_wakeup_enable(hcd->self.controller); in ohci_hcd_omap_probe()
295 iounmap(hcd->regs); in ohci_hcd_omap_probe()
297 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_probe()
307 usb_put_hcd(hcd); in ohci_hcd_omap_probe()
321 * the HCD's stop() method. It is always called from a thread
326 struct usb_hcd *hcd = platform_get_drvdata(pdev); in ohci_hcd_omap_remove() local
327 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_hcd_omap_remove()
329 dev_dbg(hcd->self.controller, "stopping USB Controller\n"); in ohci_hcd_omap_remove()
330 usb_remove_hcd(hcd); in ohci_hcd_omap_remove()
332 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { in ohci_hcd_omap_remove()
333 (void) otg_set_host(hcd->usb_phy->otg, 0); in ohci_hcd_omap_remove()
334 usb_put_phy(hcd->usb_phy); in ohci_hcd_omap_remove()
336 iounmap(hcd->regs); in ohci_hcd_omap_remove()
337 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_remove()
342 usb_put_hcd(hcd); in ohci_hcd_omap_remove()
351 struct usb_hcd *hcd = platform_get_drvdata(pdev); in ohci_omap_suspend() local
352 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_suspend()
353 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_suspend()
361 ret = ohci_suspend(hcd, do_wakeup); in ohci_omap_suspend()
371 struct usb_hcd *hcd = platform_get_drvdata(dev); in ohci_omap_resume() local
372 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_resume()
373 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_resume()
380 ohci_resume(hcd, false); in ohci_omap_resume()