diff options
author | Alex Frid <afrid@nvidia.com> | 2011-10-25 23:36:26 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:57 -0800 |
commit | f7608a5f206b42f1b598e6f0b1c9d03594688f98 (patch) | |
tree | b0a443e7b0db17388d889a883785d54aa9030534 /arch/arm/mach-tegra/tegra3_dvfs.c | |
parent | 529ed3a4eef9a419faefc700565cd442c102e778 (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 1acc76a3eda3..2f1e28815dcb 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); } |