diff options
author | Suresh Mangipudi <smangipudi@nvidia.com> | 2011-10-19 17:54:44 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:47 -0800 |
commit | 32928632d3d244b949593f7b0f4f7010c9aa1f37 (patch) | |
tree | 49fac293f9ace8cdf4f0e36fc253fb50e0c6eb07 /arch | |
parent | 600c04bb7985e622ab99553d78cf08612c5f64b5 (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
Reviewed-on: http://git-master/r/62336
(cherry picked from commit 6eb5f6192adf8ee996ba51b3d20bc26d1d9e9640)
Change-Id: Id32299f4d72c195a8bf4814cefd2085ddc3ef7d8
Reviewed-on: http://git-master/r/63011
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
Tested-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Rebase-Id: R51d06ec9171a2a90da92037a89b873359e8f950d
Diffstat (limited to 'arch')
-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 76116c46df2e..0255349b35fe 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 | @@ -2215,6 +2215,7 @@ struct tegra_usb_phy *tegra_usb_phy_open(int instance, void __iomem *regs, phy->regulator_on = 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 || @@ -2259,6 +2260,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) { |