usb: xhci: tegra: set SNPS as owner to save power
Ajay Gupta [Fri, 31 May 2013 17:40:19 +0000 (10:40 -0700)]
Saves power when no HS devices are connected.

Bug 1275290

Change-Id: Ic5f75411ea7e888fc150459a03b004fbc034d7e0
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: http://git-master/r/234625
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/usb/host/xhci-tegra.c

index 66ace79..d740fb3 100644 (file)
@@ -2367,6 +2367,8 @@ done:
        if (xhci->main_hcd == hcd) {
                utmi_phy_pad_disable();
                utmi_phy_iddq_override(true);
+               /* set port ownership to SNPS to save power */
+               tegra_xhci_release_port_ownership(tegra, true);
        } else if (xhci->shared_hcd == hcd) {
                /* save leakage power when SS not in use.
                 * This is also done when fw mbox message is received for freq
@@ -2413,6 +2415,7 @@ static int tegra_xhci_bus_resume(struct usb_hcd *hcd)
        if (xhci->main_hcd == hcd && tegra->usb2_rh_suspend) {
                utmi_phy_pad_enable();
                utmi_phy_iddq_override(false);
+               tegra_xhci_release_port_ownership(tegra, false);
        } else if (xhci->shared_hcd == hcd && tegra->usb3_rh_suspend) {
                /* clear ovrd bits */
                tegra_xhci_rx_idle_mode_override(tegra, false);