Lines Matching refs:hcd

100 	struct usb_hcd *hcd = ohci_to_hcd(ohci);  in start_hnp()  local
101 const unsigned port = hcd->self.otg_port - 1; in start_hnp()
105 otg_start_hnp(hcd->usb_phy->otg); in start_hnp()
108 hcd->usb_phy->otg->state = OTG_STATE_A_SUSPEND; in start_hnp()
120 static int ohci_omap_reset(struct usb_hcd *hcd) in ohci_omap_reset() argument
122 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_reset()
123 struct omap_usb_config *config = dev_get_platdata(hcd->self.controller); in ohci_omap_reset()
124 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_reset()
128 dev_dbg(hcd->self.controller, "starting USB Controller\n"); in ohci_omap_reset()
131 hcd->self.otg_port = config->otg; in ohci_omap_reset()
133 hcd->power_budget = 8; in ohci_omap_reset()
146 hcd->usb_phy = usb_get_phy(USB_PHY_TYPE_USB2); in ohci_omap_reset()
147 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { in ohci_omap_reset()
148 int status = otg_set_host(hcd->usb_phy->otg, in ohci_omap_reset()
150 dev_dbg(hcd->self.controller, "init %s phy, status %d\n", in ohci_omap_reset()
151 hcd->usb_phy->label, status); in ohci_omap_reset()
153 usb_put_phy(hcd->usb_phy); in ohci_omap_reset()
159 hcd->skip_phy_initialization = 1; in ohci_omap_reset()
169 ret = ohci_setup(hcd); in ohci_omap_reset()
231 struct usb_hcd *hcd = 0; in ohci_hcd_omap_probe() local
246 hcd = usb_create_hcd(&ohci_omap_hc_driver, &pdev->dev, in ohci_hcd_omap_probe()
248 if (!hcd) in ohci_hcd_omap_probe()
251 hcd->rsrc_start = pdev->resource[0].start; in ohci_hcd_omap_probe()
252 hcd->rsrc_len = pdev->resource[0].end - pdev->resource[0].start + 1; in ohci_hcd_omap_probe()
253 priv = hcd_to_ohci_omap_priv(hcd); in ohci_hcd_omap_probe()
294 if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { in ohci_hcd_omap_probe()
300 hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_probe()
301 if (!hcd->regs) { in ohci_hcd_omap_probe()
312 retval = usb_add_hcd(hcd, irq, 0); in ohci_hcd_omap_probe()
316 device_wakeup_enable(hcd->self.controller); in ohci_hcd_omap_probe()
319 iounmap(hcd->regs); in ohci_hcd_omap_probe()
321 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_probe()
327 usb_put_hcd(hcd); in ohci_hcd_omap_probe()
346 struct usb_hcd *hcd = platform_get_drvdata(pdev); in ohci_hcd_omap_remove() local
347 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_hcd_omap_remove()
349 dev_dbg(hcd->self.controller, "stopping USB Controller\n"); in ohci_hcd_omap_remove()
350 usb_remove_hcd(hcd); in ohci_hcd_omap_remove()
352 if (!IS_ERR_OR_NULL(hcd->usb_phy)) { in ohci_hcd_omap_remove()
353 (void) otg_set_host(hcd->usb_phy->otg, 0); in ohci_hcd_omap_remove()
354 usb_put_phy(hcd->usb_phy); in ohci_hcd_omap_remove()
356 iounmap(hcd->regs); in ohci_hcd_omap_remove()
357 release_mem_region(hcd->rsrc_start, hcd->rsrc_len); in ohci_hcd_omap_remove()
360 usb_put_hcd(hcd); in ohci_hcd_omap_remove()
370 struct usb_hcd *hcd = platform_get_drvdata(pdev); in ohci_omap_suspend() local
371 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_suspend()
372 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_suspend()
380 ret = ohci_suspend(hcd, do_wakeup); in ohci_omap_suspend()
390 struct usb_hcd *hcd = platform_get_drvdata(dev); in ohci_omap_resume() local
391 struct ohci_hcd *ohci = hcd_to_ohci(hcd); in ohci_omap_resume()
392 struct ohci_omap_priv *priv = hcd_to_ohci_omap_priv(hcd); in ohci_omap_resume()
399 ohci_resume(hcd, false); in ohci_omap_resume()