summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra_cl_dvfs.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2014-02-23 00:18:54 -0800
committerYu-Huan Hsu <yhsu@nvidia.com>2014-02-24 18:14:17 -0800
commit0d52cfe58a3432853430af092a38d483efe0507f (patch)
tree4d78b040a90df99ffcf9bb9f8a384309d3a1e1eb /arch/arm/mach-tegra/tegra_cl_dvfs.c
parent0165078de4b9f22cdb0be10706aad14f00bdf2d0 (diff)
ARM: tegra: dvfs: Add 1st CL-DVFS out disable fence
Added read fence after CL-DVFS output is disabled first time during initialization. This is necessary to avoid spurious I2C transaction when updating output limits on tegra SoC that has I2C output enable control register and output limits register separated in different apertures. Bug 144152 Change-Id: Ifd5931bf79689f88389bbff3d7bd27f522c98b5c Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/373338 Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/tegra_cl_dvfs.c')
-rw-r--r--arch/arm/mach-tegra/tegra_cl_dvfs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/tegra_cl_dvfs.c b/arch/arm/mach-tegra/tegra_cl_dvfs.c
index 7df1bd9f03b3..7a3b8919c091 100644
--- a/arch/arm/mach-tegra/tegra_cl_dvfs.c
+++ b/arch/arm/mach-tegra/tegra_cl_dvfs.c
@@ -1374,7 +1374,17 @@ static void cl_dvfs_init_out_if(struct tegra_cl_dvfs *cld)
cld->lut_max = get_output_cap(cld, NULL);
}
+ /*
+ * Disable output interface. If configuration and I2C address spaces
+ * are separated, output enable/disable control and output limits are
+ * in different apertures and output must be disabled 1st to avoid
+ * spurious I2C transaction. If configuration and I2C address spaces
+ * are combined output enable/disable control and output limits are
+ * in the same register, and it is safe to just clear it.
+ */
cl_dvfs_i2c_writel(cld, 0, CL_DVFS_OUTPUT_CFG);
+ cl_dvfs_i2c_wmb(cld);
+
val = (cld->safe_output << CL_DVFS_OUTPUT_CFG_SAFE_SHIFT) |
(out_max << CL_DVFS_OUTPUT_CFG_MAX_SHIFT) |
(out_min << CL_DVFS_OUTPUT_CFG_MIN_SHIFT);