diff options
author | Suresh Mangipudi <smangipudi@nvidia.com> | 2011-10-19 17:54:44 +0530 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2011-10-25 13:20:04 -0700 |
commit | 80c58a1366e9b1874beacb791aabe5ae6c20b963 (patch) | |
tree | 341234991b10dda433c27c6bb26fcdc90fe6ff78 | |
parent | 469106a1f8cf8d080f06ae0d2e8d0b2aa4bf3e4b (diff) |
arm: tegra: usb_phy: move setup value init to Phyopen
The transciever settings were set for every suspend/resume of the device.
The transciever settings should be set only once that is during the phyopen.
Bug 889140
Change-Id: Iaf89632fcdbdde950b9f77d3a8b87594061409a1
Reviewed-on: http://git-master/r/59097
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
Tested-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/include/mach/usb_phy.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/usb_phy.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/include/mach/usb_phy.h b/arch/arm/mach-tegra/include/mach/usb_phy.h index fa2a759230df..f200cf2bf90f 100644 --- a/arch/arm/mach-tegra/include/mach/usb_phy.h +++ b/arch/arm/mach-tegra/include/mach/usb_phy.h @@ -107,6 +107,7 @@ struct tegra_usb_phy { int initialized; bool power_on; bool remote_wakeup; + unsigned int xcvr_setup_value; }; typedef int (*tegra_phy_fp)(struct tegra_usb_phy *phy, bool is_dpd); diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c index 9a8085f6aa9e..04b86953449f 100644 --- a/arch/arm/mach-tegra/usb_phy.c +++ b/arch/arm/mach-tegra/usb_phy.c @@ -1044,7 +1044,7 @@ static int utmi_phy_power_on(struct tegra_usb_phy *phy, bool is_dpd) utmip_pad_power_on(phy); - xcvr_setup_value = tegra_phy_xcvr_setup_value(config); + xcvr_setup_value = phy->xcvr_setup_value; val = readl(base + UTMIP_XCVR_CFG0); val &= ~(UTMIP_XCVR_LSBIAS_SEL | UTMIP_FORCE_PD_POWERDOWN | @@ -2214,6 +2214,7 @@ struct tegra_usb_phy *tegra_usb_phy_open(int instance, void __iomem *regs, phy->initialized = 0; phy->power_on = 0; phy->remote_wakeup = false; + phy->xcvr_setup_value = 0; if (!phy->config) { if (phy->usb_phy_type == TEGRA_USB_PHY_TYPE_LINK_ULPI || @@ -2258,6 +2259,7 @@ struct tegra_usb_phy *tegra_usb_phy_open(int instance, void __iomem *regs, if (phy->usb_phy_type == TEGRA_USB_PHY_TYPE_UTMIP) { err = utmip_pad_open(phy); + phy->xcvr_setup_value = tegra_phy_xcvr_setup_value(phy->config); if (err < 0) goto err1; } else if (phy->usb_phy_type == TEGRA_USB_PHY_TYPE_LINK_ULPI) { |