static int ohci_omap_resume(struct platform_device *dev) { struct usb_hcd *hcd = platform_get_drvdata(dev); struct ohci_hcd *ohci = hcd_to_ohci(hcd); if (time_before(jiffies, ohci->next_statechange)) msleep(5); ohci->next_statechange = jiffies; omap_ohci_clock_power(1); ohci_finish_controller_resume(hcd); return 0; }
static int spear_ohci_hcd_drv_resume(struct platform_device *dev) { struct usb_hcd *hcd = platform_get_drvdata(dev); struct ohci_hcd *ohci = hcd_to_ohci(hcd); struct spear_ohci *ohci_p = to_spear_ohci(hcd); if (time_before(jiffies, ohci->next_statechange)) msleep(5); ohci->next_statechange = jiffies; spear_start_ohci(ohci_p); ohci_finish_controller_resume(hcd); return 0; }
static int ohci_hcd_ep93xx_drv_resume(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); struct ohci_hcd *ohci = hcd_to_ohci(hcd); if (time_before(jiffies, ohci->next_statechange)) msleep(5); ohci->next_statechange = jiffies; ep93xx_start_hc(&pdev->dev); ohci_finish_controller_resume(hcd); return 0; }
static int ohci_hcd_s5pv210_drv_resume(struct platform_device *pdev) { struct usb_hcd *hcd = platform_get_drvdata(pdev); int rc = 0; s5pv210_start_ohc(); /* Mark hardware accessible again as we are out of D3 state by now */ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_finish_controller_resume(hcd); return rc; }
static int ohci_sm501_resume(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct usb_hcd *hcd = platform_get_drvdata(pdev); struct ohci_hcd *ohci = hcd_to_ohci(hcd); if (time_before(jiffies, ohci->next_statechange)) msleep(5); ohci->next_statechange = jiffies; sm501_unit_power(dev->parent, SM501_GATE_USB_HOST, 1); ohci_finish_controller_resume(hcd); return 0; }
static int ohci_platform_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct usb_ohci_pdata *pdata = dev->platform_data; struct platform_device *pdev = container_of(dev, struct platform_device, dev); if (pdata->power_on) { int err = pdata->power_on(pdev); if (err < 0) return err; } ohci_finish_controller_resume(hcd); return 0; }
static int sunxi_ohci_hcd_resume(struct device *dev) { struct sunxi_hci_hcd *sunxi_ohci = NULL; struct usb_hcd *hcd = NULL; if(dev == NULL){ DMSG_PANIC("ERR: Argment is invalid\n"); return 0; } hcd = dev_get_drvdata(dev); if(hcd == NULL){ DMSG_PANIC("ERR: hcd is null\n"); return 0; } sunxi_ohci = dev->platform_data; if(sunxi_ohci == NULL){ DMSG_PANIC("ERR: sunxi_ohci is null\n"); return 0; } if(sunxi_ohci->probe == 0){ DMSG_PANIC("ERR: sunxi_ohci is disable, can not resume\n"); return 0; } if(sunxi_ohci->not_suspend){ DMSG_INFO("[%s]: controller not suspend, need not resume\n", sunxi_ohci->hci_name); scene_unlock(&ohci_standby_lock[sunxi_ohci->usbc_no]); disable_wakeup_src(CPUS_USBMOUSE_SRC, 0); }else{ DMSG_INFO("[%s]: sunxi_ohci_hcd_resume\n", sunxi_ohci->hci_name); #ifndef CONFIG_ARCH_SUN9IW1 #ifdef SUNXI_USB_FPGA fpga_config_use_hci((__u32 __force)sunxi_ohci->sram_vbase); #endif #endif sunxi_start_ohci(sunxi_ohci); set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_finish_controller_resume(hcd); } return 0; }
static int exynos_ohci_resume(struct device *dev) { struct exynos_ohci_hcd *exynos_ohci = dev_get_drvdata(dev); struct usb_hcd *hcd = exynos_ohci->hcd; struct platform_device *pdev = to_platform_device(dev); struct s5p_ohci_platdata *pdata = pdev->dev.platform_data; if (pdata && pdata->phy_init) pdata->phy_init(pdev, S5P_USB_PHY_HOST); /* Mark hardware accessible again as we are out of D3 state by now */ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_finish_controller_resume(hcd); return 0; }
static int omap_ohci_bus_resume(struct usb_hcd *hcd) { int ret = 0; /* the omap usb host auto-idle is not fully functional, * manually enable/disable usbtll_ick during * the suspend/resume time. */ clk_enable(clk_get(NULL, "usbtll_ick")); clk_enable(clk_get(NULL, "usbtll_fck")); clk_enable(clk_get(NULL, "usbhost_120m_fck")); clk_enable(clk_get(NULL, "usbhost_48m_fck")); set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_finish_controller_resume(hcd); ret = ohci_bus_resume(hcd); return ret; }
static int ohci_hcd_pxa27x_drv_resume(struct device *dev) { struct usb_hcd *hcd = dev_get_drvdata(dev); struct pxa27x_ohci *ohci = to_pxa27x_ohci(hcd); struct pxaohci_platform_data *inf = dev->platform_data; int status; if (time_before(jiffies, ohci->ohci.next_statechange)) msleep(5); ohci->ohci.next_statechange = jiffies; if ((status = pxa27x_start_hc(ohci, dev)) < 0) return status; /* Select Power Management Mode */ pxa27x_ohci_select_pmm(ohci, inf->port_mode); ohci_finish_controller_resume(hcd); return 0; }
static int ohci_hcd_s5p_drv_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct s5p_ohci_platdata *pdata = pdev->dev.platform_data; struct s5p_ohci_hcd *s5p_ohci = platform_get_drvdata(pdev); struct usb_hcd *hcd = s5p_ohci->hcd; int rc = 0; clk_enable(s5p_ohci->clk); pm_runtime_resume(&pdev->dev); if (pdata->phy_init) pdata->phy_init(pdev, S5P_USB_PHY_HOST); /* Mark hardware accessible again as we are out of D3 state by now */ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_finish_controller_resume(hcd); return rc; }
static int ohci_hcd_s5pv210_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct usb_hcd *hcd = platform_get_drvdata(pdev); int rc = 0; if (dev->power.status == DPM_RESUMING) return 0; #if defined(CONFIG_SAMSUNG_PHONE_SVNET) || defined(CONFIG_SAMSUNG_LTE) || defined(CONFIG_UMTS_LINK_HSIC) #else printk("USB_PM ohci rt resume\n"); usb_host_phy_init(); #endif /* Mark hardware accessible again as we are out of D3 state by now */ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_finish_controller_resume(hcd); return rc; }
static int sw_ohci_hcd_resume(struct device *dev) { struct sw_hci_hcd *sw_ohci = NULL; struct usb_hcd *hcd = NULL; if(dev == NULL){ DMSG_PANIC("ERR: Argment is invalid\n"); return 0; } hcd = dev_get_drvdata(dev); if(hcd == NULL){ DMSG_PANIC("ERR: hcd is null\n"); return 0; } sw_ohci = dev->platform_data; if(sw_ohci == NULL){ DMSG_PANIC("ERR: sw_ohci is null\n"); return 0; } if(sw_ohci->probe == 0){ DMSG_PANIC("ERR: sw_ohci is disable, can not resume\n"); return 0; } if(sw_usb_suspend_disabled(sw_ohci->usbc_no)) return 0; DMSG_INFO("[%s]: sw_ohci_hcd_resume\n", sw_ohci->hci_name); sw_start_ohc(sw_ohci); set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_finish_controller_resume(hcd); return 0; }
static int ohci_pci_resume (struct usb_hcd *hcd) { set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); ohci_finish_controller_resume(hcd); return 0; }