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>2012-03-22 23:48:57 -0700
commitce937fd3a4b2f40a6adbd14bfb186b80463e5c7c (patch)
treec41bbb413e73ee6a3f613c1f4d16d345c6e6bf25 /arch/arm/mach-tegra/tegra3_dvfs.c
parent2cd2e71b79fb3763a9dc4b8ac6ba11271d7c1eb1 (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 53923025eb3b..753e255d8bf5 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);