usb: xhci: tegra: refine shutdown path
Ajay Gupta [Mon, 1 Jul 2013 22:33:46 +0000 (15:33 -0700)]
Ignore calling xhci_shutdown when in ELPG as we are on shutdown. Just
make sure PMC wake detect is disabled.

Issue 9629922@https://login.corp.google.com/

Change-Id: Idfc6c55c37c722af6c36275dd387c8fc26ad2577
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: http://git-master/r/245651
Reviewed-on: http://git-master/r/272752
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>

drivers/usb/host/xhci-tegra.c

index 38bc7cf..e7be70c 100644 (file)
@@ -3620,16 +3620,12 @@ static void tegra_xhci_shutdown(struct platform_device *pdev)
                return;
 
        if (tegra->hc_in_elpg) {
-               mutex_lock(&tegra->sync_lock);
-               tegra_xhci_host_partition_elpg_exit(tegra);
-               mutex_unlock(&tegra->sync_lock);
+               pmc_data.pmc_ops->disable_pmc_bus_ctrl(&pmc_data);
+       } else {
+               xhci = tegra->xhci;
+               hcd = xhci_to_hcd(xhci);
+               xhci_shutdown(hcd);
        }
-
-       fw_log_deinit(tegra);
-
-       xhci = tegra->xhci;
-       hcd = xhci_to_hcd(xhci);
-       xhci_shutdown(hcd);
 }
 
 static struct platform_driver tegra_xhci_driver = {