diff options
author | Rakesh Bodla <rbodla@nvidia.com> | 2012-07-17 11:25:51 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-07-23 14:51:41 -0700 |
commit | 1357638e3e517e107b0c22ef40b036a414d6f56f (patch) | |
tree | 5549d42b984a5a97cae4f6fb78228a9400fc7295 /drivers/usb | |
parent | 33a657014d3cabea3de90b47ddc9325d0e5af4fa (diff) |
usb: ehci: tegra: prevent illegal register access
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-tegra.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-tegra.c b/drivers/usb/host/ehci-tegra.c index be667f0c57c6..b2747762a7ed 100644 --- a/drivers/usb/host/ehci-tegra.c +++ b/drivers/usb/host/ehci-tegra.c @@ -546,6 +546,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); |