summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVenkat Moganty <vmoganty@nvidia.com>2010-08-13 15:00:30 +0530
committerYu-Huan Hsu <yhsu@nvidia.com>2010-09-24 10:39:16 -0700
commitd76367e3326b4e196a84b3e4f9317c89b2db159c (patch)
treeba32dfd75f24bf56a5171018453b5632117608be
parent904ac2e3f599f21fb5a4f5103d130ecdb7271ebc (diff)
[ARM-tegra]UsbPhy: Enable Host mode context save in LP0
During LP0 suspend host mode context is not saved and this makes atatched device to re-enumerate after coming out of the LP0. To fix this USB context registers are saved during LP0 suspend and restored back on LP0 resume. Bug 721762 (cherry picked from commit c4ff3f80540e0228790ea568464b2a8078cce188) Change-Id: I2b57abcfc6451ceccc545c648c0182a6b81dec71 Reviewed-on: http://git-master/r/7185 Reviewed-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com> Tested-by: Hanumanth Venkateswa Moganty <vmoganty@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/nvddk/nvddk_usbphy.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c b/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
index aa80b2fa0eec..733c2787c630 100644
--- a/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
+++ b/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
@@ -634,7 +634,6 @@ NvDdkUsbPhyPowerUp(
NvBool IsDpd)
{
NvError e = NvSuccess;
- NvOdmSocPowerState state = NvRmPowerLowestStateGet();
NV_ASSERT(hUsbPhy);
@@ -671,9 +670,7 @@ NvDdkUsbPhyPowerUp(
/* Allow restoring register context for the USB host if it is a ULPI
interface or if the lowest power state is LP1 */
- if ((hUsbPhy->pProperty->UsbMode == NvOdmUsbModeType_Host) &&
- ((state != NvOdmSocPowerState_DeepSleep) ||
- (hUsbPhy->pProperty->UsbInterfaceType == NvOdmUsbInterfaceType_UlpiExternalPhy)))
+ if (hUsbPhy->pProperty->UsbMode == NvOdmUsbModeType_Host)
{
hUsbPhy->RestoreContext(hUsbPhy);
}
@@ -707,7 +704,6 @@ NvDdkUsbPhyPowerDown(
NvError e = NvSuccess;
NvDdkUsbPhyIoctl_VBusStatusOutputArgs VBusStatus;
NvU32 TimeOut = USB_PHY_HW_TIMEOUT_US;
- NvOdmSocPowerState state = NvRmPowerLowestStateGet();
NV_ASSERT(hUsbPhy);
@@ -720,9 +716,7 @@ NvDdkUsbPhyPowerDown(
/* Allow saving register context for the USB host if it is a ULPI
interface or if the lowest power state is LP1 */
- if ((hUsbPhy->pProperty->UsbMode == NvOdmUsbModeType_Host) &&
- ((state != NvOdmSocPowerState_DeepSleep) ||
- (hUsbPhy->pProperty->UsbInterfaceType == NvOdmUsbInterfaceType_UlpiExternalPhy)))
+ if (hUsbPhy->pProperty->UsbMode == NvOdmUsbModeType_Host)
{
hUsbPhy->SaveContext(hUsbPhy);
}