diff options
author | Rakesh Bodla <rbodla@nvidia.com> | 2012-07-17 11:25:51 +0530 |
---|---|---|
committer | Matthew Pedro <mapedro@nvidia.com> | 2012-08-02 13:32:30 -0700 |
commit | bbd5680a5f51728d073369511967a5b6bb24d1a1 (patch) | |
tree | a3b3952a17251c2eeb99f28675854c0eac5a4964 /drivers/usb | |
parent | c2f5d504ef382f879b90464572c208ee074b1df4 (diff) |
usb: ehci: tegra: prevent illegal register access
Make sure phy is turned ON before reading USB
registers.
Bug 993380
Bug 1006579
Bug 1018601
Change-Id: Ib951cad822f90f59fe829d016e2c1bda7a7cc243
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/116045
(cherry picked from commit a1a6db7dc88880fb3d4bca0036ce421e4032adae)
Reviewed-on: http://git-master/r/117972
Tested-by: Preetham Chandru <pchandru@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Kiran Adduri <kadduri@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@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); |