Loading drivers/usb/host/ehci-msm2.c +20 −0 Original line number Diff line number Diff line Loading @@ -707,6 +707,8 @@ static int msm_ehci_suspend(struct msm_hcd *mhcd) struct usb_hcd *hcd = mhcd_to_hcd(mhcd); unsigned long timeout; u32 portsc; const struct msm_usb_host_platform_data *pdata; u32 func_ctrl; if (atomic_read(&mhcd->in_lpm)) { dev_dbg(mhcd->dev, "%s called in lpm\n", __func__); Loading @@ -723,6 +725,14 @@ static int msm_ehci_suspend(struct msm_hcd *mhcd) return -EBUSY; } pdata = mhcd->dev->platform_data; if (pdata && pdata->is_uicc) { /* put the controller in non-driving mode */ func_ctrl = msm_ulpi_read(mhcd, ULPI_FUNC_CTRL); func_ctrl &= ~ULPI_FUNC_CTRL_OPMODE_MASK; func_ctrl |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING; msm_ulpi_write(mhcd, func_ctrl, ULPI_FUNC_CTRL); } /* If port is enabled wait 5ms for PHCD to come up. Reset PHY * and link if it fails to do so. * If port is not enabled set the PHCD bit and poll for it to Loading Loading @@ -821,6 +831,8 @@ static int msm_ehci_resume(struct msm_hcd *mhcd) unsigned long timeout; unsigned temp; unsigned long flags; u32 func_ctrl; const struct msm_usb_host_platform_data *pdata; if (!atomic_read(&mhcd->in_lpm)) { dev_dbg(mhcd->dev, "%s called in !in_lpm\n", __func__); Loading Loading @@ -887,6 +899,14 @@ static int msm_ehci_resume(struct msm_hcd *mhcd) } skip_phy_resume: pdata = mhcd->dev->platform_data; if (pdata && pdata->is_uicc) { /* put the controller in normal mode */ func_ctrl = msm_ulpi_read(mhcd, ULPI_FUNC_CTRL); func_ctrl &= ~ULPI_FUNC_CTRL_OPMODE_MASK; func_ctrl |= ULPI_FUNC_CTRL_OPMODE_NORMAL; msm_ulpi_write(mhcd, func_ctrl, ULPI_FUNC_CTRL); } set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); usb_hcd_resume_root_hub(hcd); Loading Loading
drivers/usb/host/ehci-msm2.c +20 −0 Original line number Diff line number Diff line Loading @@ -707,6 +707,8 @@ static int msm_ehci_suspend(struct msm_hcd *mhcd) struct usb_hcd *hcd = mhcd_to_hcd(mhcd); unsigned long timeout; u32 portsc; const struct msm_usb_host_platform_data *pdata; u32 func_ctrl; if (atomic_read(&mhcd->in_lpm)) { dev_dbg(mhcd->dev, "%s called in lpm\n", __func__); Loading @@ -723,6 +725,14 @@ static int msm_ehci_suspend(struct msm_hcd *mhcd) return -EBUSY; } pdata = mhcd->dev->platform_data; if (pdata && pdata->is_uicc) { /* put the controller in non-driving mode */ func_ctrl = msm_ulpi_read(mhcd, ULPI_FUNC_CTRL); func_ctrl &= ~ULPI_FUNC_CTRL_OPMODE_MASK; func_ctrl |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING; msm_ulpi_write(mhcd, func_ctrl, ULPI_FUNC_CTRL); } /* If port is enabled wait 5ms for PHCD to come up. Reset PHY * and link if it fails to do so. * If port is not enabled set the PHCD bit and poll for it to Loading Loading @@ -821,6 +831,8 @@ static int msm_ehci_resume(struct msm_hcd *mhcd) unsigned long timeout; unsigned temp; unsigned long flags; u32 func_ctrl; const struct msm_usb_host_platform_data *pdata; if (!atomic_read(&mhcd->in_lpm)) { dev_dbg(mhcd->dev, "%s called in !in_lpm\n", __func__); Loading Loading @@ -887,6 +899,14 @@ static int msm_ehci_resume(struct msm_hcd *mhcd) } skip_phy_resume: pdata = mhcd->dev->platform_data; if (pdata && pdata->is_uicc) { /* put the controller in normal mode */ func_ctrl = msm_ulpi_read(mhcd, ULPI_FUNC_CTRL); func_ctrl &= ~ULPI_FUNC_CTRL_OPMODE_MASK; func_ctrl |= ULPI_FUNC_CTRL_OPMODE_NORMAL; msm_ulpi_write(mhcd, func_ctrl, ULPI_FUNC_CTRL); } set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); usb_hcd_resume_root_hub(hcd); Loading