summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/dvfs.c
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2013-09-19 22:45:09 -0700
committerAjay Nandakumar <anandakumarm@nvidia.com>2013-10-03 19:17:28 +0530
commit2760eca910ae0ee2f983b6f5f091aeb804f01a6c (patch)
treea8e828e0b3ec75540299b457cd21a39f3a83a0c8 /arch/arm/mach-tegra/dvfs.c
parent0b2cb04e9f86865f507d92e677b9443849d845aa (diff)
ARM: tegra: dvfs: Handle zero GPU rail voltage
Preserved voltage of the rail with in-band enable / disable control when all clocks associated with dvfs rail are disabled, and "0" voltage is requested. The rail will be turned off via explicit call to regulator interface - applicable to GPU rail. No changes if "0" voltage is requested for rail with side-band control, and jump-to-zero property - CPU rail: allow to pass "0" through, mainly for statistical purpose. Added warning and preserve voltage if "0" requested for core rail - must never happen (core system clocks are never disabled at run-time). Change-Id: I724ea9373d0731d6f115ecde1e3b8dd8e7ff2884 Signed-off-by: Alex Frid <afrid@nvidia.com> Reviewed-on: http://git-master/r/278180 Reviewed-by: Automatic_Commit_Validation_User Tested-by: Prashant Malani <pmalani@nvidia.com> Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> (cherry picked from commit fab7582bcae0c63a645aa2cbb9e1e001b4b5603c) Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/dvfs.c')
-rw-r--r--arch/arm/mach-tegra/dvfs.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/dvfs.c b/arch/arm/mach-tegra/dvfs.c
index 91ddef4692f8..7c16170b0997 100644
--- a/arch/arm/mach-tegra/dvfs.c
+++ b/arch/arm/mach-tegra/dvfs.c
@@ -408,6 +408,15 @@ static int dvfs_rail_update(struct dvfs_rail *rail)
/* Apply offset and min/max limits if any clock is requesting voltage */
if (millivolts)
millivolts = dvfs_rail_apply_limits(rail, millivolts);
+ /* Keep current voltage if regulator is to be disabled via explicitly */
+ else if (rail->in_band_pm)
+ return 0;
+ /* Keep current voltage if regulator must not be disabled at run time */
+ else if (!rail->jmp_to_zero) {
+ WARN(1, "%s cannot be turned off by dvfs\n");
+ return 0;
+ }
+ /* else: fall thru if regulator is turned off by side band signaling */
/* retry update if limited by from-relationship to account for
circular dependencies */
@@ -1524,7 +1533,8 @@ static int dvfs_tree_show(struct seq_file *s, void *data)
list_for_each_entry(rail, &dvfs_rail_list, node) {
int thermal_mv_floor = 0;
- seq_printf(s, "%s %d mV%s:\n", rail->reg_id, rail->millivolts,
+ seq_printf(s, "%s %d mV%s:\n", rail->reg_id,
+ rail->stats.off ? 0 : rail->millivolts,
rail->dfll_mode ? " dfll mode" :
rail->disabled ? " disabled" : "");
list_for_each_entry(rel, &rail->relationships_from, from_node) {