]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
usb: ehci: tegra: prevent illegal register access
authorRakesh Bodla <rbodla@nvidia.com>
Tue, 17 Jul 2012 05:55:51 +0000 (11:25 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:14:26 +0000 (12:14 -0700)
Make sure phy is turned ON before reading USB
registers.

Bug 993380
Bug 1006579

Reviewed-on: http://git-master/r/116045
(cherry picked from commit a1a6db7dc88880fb3d4bca0036ce421e4032adae)
Change-Id: If94e691bf9b5b46dd8f8562f27cf86e59a4d6353
Reviewed-on: http://git-master/r/117257
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Bodla <rbodla@nvidia.com>
Tested-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Rebase-Id: R9c7246e2dae708b1f0f034ccd69c4371848db324

drivers/usb/host/ehci-tegra.c

index 41851e3810527b4b15fac00c753c68bfd823a744..71da92a4432a15496604e07164c93ba2a39dc87f 100644 (file)
@@ -631,6 +631,11 @@ static int tegra_ehci_remove(struct platform_device *pdev)
 
        if (tegra->irq)
                disable_irq_wake(tegra->irq);
+
+       /* Make sure phy is powered ON to access USB register */
+       if(!tegra_usb_phy_hw_accessible(tegra->phy))
+               tegra_usb_phy_power_on(tegra->phy);
+
        usb_remove_hcd(hcd);
        usb_put_hcd(hcd);
        tegra_usb_phy_power_off(tegra->phy);