diff options
author | Alex Frid <afrid@nvidia.com> | 2011-10-25 23:36:26 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2012-03-22 23:48:45 -0700 |
commit | 4166c3e6bab593873f646453497111fc320046a0 (patch) | |
tree | b97e7881fd6563721f2a36586cd205ea8701c5f3 /arch/arm/mach-tegra/tegra3_dvfs.c | |
parent | b3b0840a247e21fe4ed4f1019079f6da62f18697 (diff) |
ARM: tegra: dvfs: Optimize Tegra3 VDD_CPU control in LP mode
Optimized Tegra3 VDD_CPU control when VDD_CPU target is set to zero,
which could happen only while CPU is in LP mode (and CPU regulator
output is turned off by side-band signal, anyway):
- Ignore VDD_CPU dependency on VDD_CORE while VDD_CPU target is zero
- Allow VDD_CPU one step change to zero (i.e., to minimum voltage set
by constraints) after entry to LP mode
- Allow VDD_CPU one step change to the predicted G mode target before
exit from LP mode
(cherry picked from commit 5826f3e28867207b5dad1c50795de8275d1af872)
(cherry picked from commit 79c531421dfc65e27af657fd12b64c4187c67827)
Change-Id: I3c469132034a431d2e9b8727d11d604c306122f1
Reviewed-on: http://git-master/r/63357
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: R4c4f6e79decddb778f58cb5eef853a4c9d52ca94
Diffstat (limited to 'arch/arm/mach-tegra/tegra3_dvfs.c')
-rw-r--r-- | arch/arm/mach-tegra/tegra3_dvfs.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/tegra3_dvfs.c b/arch/arm/mach-tegra/tegra3_dvfs.c index 3d6dcb55640f..d3f881a75d96 100644 --- a/arch/arm/mach-tegra/tegra3_dvfs.c +++ b/arch/arm/mach-tegra/tegra3_dvfs.c @@ -60,6 +60,7 @@ static struct dvfs_rail tegra3_dvfs_rail_vdd_cpu = { .max_millivolts = 1250, .min_millivolts = 850, .step = VDD_SAFE_STEP, + .jmp_to_zero = true, }; static struct dvfs_rail tegra3_dvfs_rail_vdd_core = { @@ -102,7 +103,12 @@ static int tegra3_dvfs_rel_vdd_cpu_vdd_core(struct dvfs_rail *vdd_cpu, static int tegra3_dvfs_rel_vdd_core_vdd_cpu(struct dvfs_rail *vdd_core, struct dvfs_rail *vdd_cpu) { - int cpu_floor = max(vdd_core->new_millivolts, vdd_core->millivolts) - + int cpu_floor; + + if (vdd_cpu->new_millivolts == 0) + return 0; /* If G CPU is off, core relations can be ignored */ + + cpu_floor = max(vdd_core->new_millivolts, vdd_core->millivolts) - cpu_below_core; return max(vdd_cpu->new_millivolts, cpu_floor); } |