usb: host: tegra: disable pmc before going to LP0
Rakesh Bodla [Thu, 13 Jun 2013 06:17:08 +0000 (11:17 +0530)]
Disable pmc before going to LP0 irrespective of
whether it is otg port or not.

Bug 934024

Change-Id: I53aa18f5c3f6492d0fe97d2d7a0b969392bcdb71
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/239342
(cherry picked from commit 833d8333a11abba3ba0ddce658ff1b97a2ff98bc)
Reviewed-on: http://git-master/r/247152
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

drivers/usb/host/ehci-tegra.c

index 5a197c5..ba11c37 100644 (file)
@@ -608,7 +608,7 @@ static int tegra_ehci_resume(struct platform_device *pdev)
 {
        struct tegra_ehci_hcd *tegra = platform_get_drvdata(pdev);
        struct tegra_usb_platform_data *pdata = dev_get_platdata(&pdev->dev);
-       if (pdata->u_data.host.turn_off_vbus_on_lp0 && pdata->port_otg)
+       if (pdata->u_data.host.turn_off_vbus_on_lp0)
                tegra_usb_enable_vbus(tegra->phy, true);
        return usb_phy_set_suspend(get_usb_phy(tegra->phy), 0);
 }
@@ -624,8 +624,7 @@ static int tegra_ehci_suspend(struct platform_device *pdev, pm_message_t state)
                return -EBUSY;
        else {
                err = usb_phy_set_suspend(get_usb_phy(tegra->phy), 1);
-               if (pdata->u_data.host.turn_off_vbus_on_lp0 &&
-                       pdata->port_otg) {
+               if (pdata->u_data.host.turn_off_vbus_on_lp0) {
                        tegra_usb_enable_vbus(tegra->phy, false);
                        tegra_usb_phy_pmc_disable(tegra->phy);
                }