summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
diff options
context:
space:
mode:
authorsgadagottu <sgadagottu@nvidia.com>2010-03-20 01:57:00 +0530
committerGary King <gking@nvidia.com>2010-03-21 09:33:01 -0800
commit873a30edbac4017af82525c1e2385d2b743f436e (patch)
tree4d8f39403a5277a2ab054d44034cf10415640017 /arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
parent3fd0b4e9712b848d23f2f341ab4e5b472f50932f (diff)
tegra usb: Switching of USB busy hints, when no active USB tranferstegra-9.12.8
are happening though a device connection on host port. Currently for harmony, an intergrated SMSC hub present on USB3. Because of this device connection is present on USB3 and USB power busy hints are always on. To avoid this, for host by default busy hints are off and USB busy hints will be on for : 1.Bulk and isochronus transfers 2.Interrupts transfers with buffer length >= 256. Busy hint will be on for pre-defined amount of time and after that busy hints will be off automatically. With this in idle state power is reduced. Tested on : Harmony Enumeartion is happening fine. LAN and USB HID devices are working fine Change-Id: Ifd653bebfb52c7702f7d24bf11ccf93e62ea0f66 Reviewed-on: http://git-master/r/915 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/nvddk/nvddk_usbphy.c')
-rw-r--r--arch/arm/mach-tegra/nvddk/nvddk_usbphy.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c b/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
index 7a9da42cdf7c..2ec63f3eae91 100644
--- a/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
+++ b/arch/arm/mach-tegra/nvddk/nvddk_usbphy.c
@@ -404,8 +404,11 @@ NvDdkUsbPhyHelperThread(
/* wait for the signal to turn on/off the busy hints and vbus */
NvOsSemaphoreWaitTimeout(hUsbPhy->HelperThreadSema, NV_WAIT_INFINITE);
- /* Turn on/off the USB busy hints */
- UsbPhyDfsBusyHint(hUsbPhy, hUsbPhy->IsPhyPoweredUp, NV_WAIT_INFINITE);
+ if (!(hUsbPhy->IsPhyPoweredUp && hUsbPhy->IsHostMode))
+ {
+ /* Turn on/off the USB busy hints */
+ UsbPhyDfsBusyHint(hUsbPhy, hUsbPhy->IsPhyPoweredUp, NV_WAIT_INFINITE);
+ }
/* Turn on/off the vbus for host mode */
if (hUsbPhy->IsHostMode)
{
@@ -557,9 +560,12 @@ NvDdkUsbPhyOpen(
// Open the H/W interface
UsbPhyOpenHwInterface(pUsbPhy);
- /* enable the busy hints for USB */
- UsbPhyDfsBusyHint(pUsbPhy, NV_TRUE, NV_WAIT_INFINITE);
-
+ /* Enable the busy hints for USB device mode, for host mode *
+ * transaction based busy hints are on/off mechanism is present */
+ if (pUsbPhy->pProperty->UsbMode != NvOdmUsbModeType_Host)
+ {
+ UsbPhyDfsBusyHint(pUsbPhy, NV_TRUE, NV_WAIT_INFINITE);
+ }
// Initialize the USB Phy
NV_CHECK_ERROR_CLEANUP(UsbPhyInitialize(pUsbPhy));
}