summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/tegra3_dvfs.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2011-11-03 21:07:03 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:50:13 -0800
commitd45ab1ba44d57ca3c08217c5dd1cf3db604301d9 (patch)
treeb42536e8da7ada0db21abe13c889315a66a71030 /arch/arm/mach-tegra/tegra3_dvfs.c
parentf6e531d7fc13b0f759f9acba93c2be0e156a918c (diff)
ARM: tegra: dvfs: Update Tegra3 EMC DVFS
- Moved validation of EMC maximum rate against nominal core voltage from common dvfs initialization to board specific EMC scaling table setup (a logical place to do it, since EMC DVFS is board dependent) - Used current rate as rounded EMC rate if no EMC scaling table is provided (instead of maximum EMC rate - no sense in attempt to set maximum rate, or any rate, for that matter, if there is no table). - Cleaned EMC initialization procedure (cherry picked from commit 4f655077e09c0dc4abc50d190d82c91473e2e81c) Signed-off-by: Alex Frid <afrid@nvidia.com> (cherry picked from commit a213668b4f54b8ea7603a6d1e71f8b4ab1998bf7) Change-Id: Id61f33e42556a6415e45b014bcadace600dd86d5 Reviewed-on: http://git-master/r/64765 Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: R697e04b6140eb0084bdb341febe3acdf91d93535
Diffstat (limited to 'arch/arm/mach-tegra/tegra3_dvfs.c')
-rw-r--r--arch/arm/mach-tegra/tegra3_dvfs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/tegra3_dvfs.c b/arch/arm/mach-tegra/tegra3_dvfs.c
index d39d383e1be6..98b68c97bfcd 100644
--- a/arch/arm/mach-tegra/tegra3_dvfs.c
+++ b/arch/arm/mach-tegra/tegra3_dvfs.c
@@ -340,8 +340,15 @@ static void __init init_dvfs_one(struct dvfs *d, int nominal_mv_index)
return;
}
- if (d->auto_dvfs) {
- /* Update max rate for auto-dvfs clocks */
+ if (!(c->flags & PERIPH_EMC_ENB) && d->auto_dvfs) {
+ /* Update max rate for auto-dvfs clocks, except EMC.
+ * EMC is a special case, since EMC dvfs is board dependent:
+ * max rate and EMC scaling frequencies are determined by tegra
+ * BCT (flashed together with the image) and board specific EMC
+ * DFS table; we will check the scaling ladder against nominal
+ * core voltage when the table is loaded (and if on particular
+ * board the table is not loaded, EMC scaling is disabled).
+ */
BUG_ON(!d->freqs[nominal_mv_index]);
tegra_init_max_rate(
c, d->freqs[nominal_mv_index] * d->freqs_mult);