summaryrefslogtreecommitdiff
path: root/include/linux/tegra-cpuidle.h
diff options
context:
space:
mode:
authorSai Gurrappadi <sgurrappadi@nvidia.com>2014-02-10 18:17:37 -0800
committerMitch Luban <mluban@nvidia.com>2014-02-12 12:24:14 -0800
commit5e1aa046eb5ee0599de46c06eb434dfa1b37fbda (patch)
tree183ea37655475f38f4050221ba4c68fa6a69a247 /include/linux/tegra-cpuidle.h
parentc8a0b48a8b5aadacf9e181012d36ad435df64be7 (diff)
ARM: tegra: Return the actual idle state
MC clock stop and powergating use the same powerdown function so it is possible to request power_down(state=2) but end up powergating (state=1). This causes faulty updating of residency times. Fix this by returning the actual idle state entered instead of returning true/false. Bug 1452222 Change-Id: I5d07f1316770030edcb1bccf4409b452eb6814d9 Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/365695 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Mitch Luban <mluban@nvidia.com>
Diffstat (limited to 'include/linux/tegra-cpuidle.h')
-rw-r--r--include/linux/tegra-cpuidle.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/tegra-cpuidle.h b/include/linux/tegra-cpuidle.h
index b204955e4736..84e930915797 100644
--- a/include/linux/tegra-cpuidle.h
+++ b/include/linux/tegra-cpuidle.h
@@ -3,7 +3,7 @@
*
* Declarations for power state transition code
*
- * Copyright (c) 2011-2012, NVIDIA Corporation.
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -26,11 +26,22 @@
#define TEGRA_CPUIDLE_FORCE_DO_CLKGT_VMIN 0x1
#define TEGRA_CPUIDLE_FORCE_NO_CLKGT_VMIN 0x2
+/*
+ * Available tegra cpuidle states.
+ * Should not exceed CPUIDLE_STATE_MAX
+ */
+enum tegra_cpuidle_states {
+ CPUIDLE_STATE_CLKGATING,
+ CPUIDLE_STATE_POWERGATING,
+ CPUIDLE_STATE_MC_CLK_STOP,
+ CPUIDLE_MAX_STATE_NUM = CPUIDLE_STATE_MAX,
+};
+
extern int tegra_pg_exit_latency;
extern u32 tegra_force_clkgt_at_vmin;
struct tegra_cpuidle_ops {
- bool (*tegra_idle_pd)(struct cpuidle_device *dev,
+ int (*tegra_idle_pd)(struct cpuidle_device *dev,
struct cpuidle_state *state);
void (*cpu_idle_stats_pd_ready)(unsigned int cpu);
void (*cpu_idle_stats_pd_time)(unsigned int cpu, s64 us);