Lines Matching full:hcd

3  * OHCI HCD (Host Controller Driver) for USB.
30 #include <linux/usb/hcd.h>
166 struct usb_hcd *hcd = ohci_to_hcd(ohci); in start_hnp() local
167 const unsigned port = hcd->self.otg_port - 1; in start_hnp()
171 otg_start_hnp(hcd->usb_phy->otg); in start_hnp()
174 hcd->usb_phy->otg->state = OTG_STATE_A_SUSPEND; in start_hnp()
186 static int ohci_omap_reset(struct usb_hcd *hcd) in ohci_omap_reset() argument
188 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_reset()
189 struct omap_usb_config *config = dev_get_platdata(hcd->self.controller); in ohci_omap_reset()
190 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_reset()
194 dev_dbg(hcd->self.controller, "starting USB Controller\n"); in ohci_omap_reset()
197 hcd->self.otg_port = config->otg; in ohci_omap_reset()
199 hcd->power_budget = 8; in ohci_omap_reset()
212 hcd->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2); in ohci_omap_reset()
213 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { in ohci_omap_reset()
214 int status = otg_set_host(hcd->usb_phy->otg, in ohci_omap_reset()
216 dev_dbg(hcd->self.controller, "init %s phy, status %d\n", in ohci_omap_reset()
217 hcd->usb_phy->label, status); in ohci_omap_reset()
219 usb_put_phy(hcd->usb_phy); in ohci_omap_reset()
225 hcd->skip_phy_initialization = 1; in ohci_omap_reset()
237 ret = ohci_setup(hcd); in ohci_omap_reset()
291 * then invokes the start() method for the HCD associated with it
297 struct usb_hcd *hcd = 0; in ohci_hcd_omap_probe() local
312 hcd = usb_create_hcd(&ohci_omap_hc_driver, &pdev->dev, in ohci_hcd_omap_probe()
314 if (!hcd) in ohci_hcd_omap_probe()
317 hcd->rsrc_start = pdev->resource[0].start; in ohci_hcd_omap_probe()
318 hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; in ohci_hcd_omap_probe()
319 priv = hcd_to_ohci_omap_priv(hcd); in ohci_hcd_omap_probe()
360 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { in ohci_hcd_omap_probe()
366 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_probe()
367 if (!hcd->regs) { in ohci_hcd_omap_probe()
368 dev_err(&pdev->dev, "can't ioremap OHCI HCD\n"); in ohci_hcd_omap_probe()
378 retval = usb_add_hcd(hcd, irq, 0); in ohci_hcd_omap_probe()
382 device_wakeup_enable(hcd->self.controller); in ohci_hcd_omap_probe()
385 iounmap(hcd->regs); in ohci_hcd_omap_probe()
387 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_probe()
393 usb_put_hcd(hcd); in ohci_hcd_omap_probe()
406 * the HCD's stop() method. It is always called from a thread
411 struct usb_hcd *hcd = platform_get_drvdata(pdev); in ohci_hcd_omap_remove() local
412 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_hcd_omap_remove()
414 dev_dbg(hcd->self.controller, "stopping USB Controller\n"); in ohci_hcd_omap_remove()
415 usb_remove_hcd(hcd); in ohci_hcd_omap_remove()
417 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { in ohci_hcd_omap_remove()
418 (void) otg_set_host(hcd->usb_phy->otg, 0); in ohci_hcd_omap_remove()
419 usb_put_phy(hcd->usb_phy); in ohci_hcd_omap_remove()
421 iounmap(hcd->regs); in ohci_hcd_omap_remove()
422 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_remove()
425 usb_put_hcd(hcd); in ohci_hcd_omap_remove()
435 struct usb_hcd *hcd = platform_get_drvdata(pdev); in ohci_omap_suspend() local
436 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_suspend()
437 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_suspend()
445 ret = ohci_suspend(hcd, do_wakeup); in ohci_omap_suspend()
455 struct usb_hcd *hcd = platform_get_drvdata(dev); in ohci_omap_resume() local
456 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_resume()
457 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_resume()
464 ohci_resume(hcd, false); in ohci_omap_resume()