aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2012-04-27 15:59:00 +0100
committerAndrey Konovalov <andrey.konovalov@linaro.org>2013-05-25 12:59:34 +0400
commit123c922883b67f189d7893ff08c905fd5bc22ef9 (patch)
treec91ec86cbe96bf235e007a675cc24f91f87fa318
parentfdde7baf98fadd7b7df54242f0403b77e1c55b9c (diff)
downloadvexpress-lsk-123c922883b67f189d7893ff08c905fd5bc22ef9.tar.gz
cpufreq/arm-bl-cpufreq: Provide fake transition latency value
Some governors refuse to work unless a cpufreq driver advertises a finite transition latency value. We can't set this to something sensible until we have real hardware to calibrate on. In the meantime, we can define this to an arbitrary value to permit experimentation with governors such as conservative and ondemand. Signed-off-by: Dave Martin <dave.martin@linaro.org>
-rw-r--r--drivers/cpufreq/arm-bl-cpufreq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/cpufreq/arm-bl-cpufreq.c b/drivers/cpufreq/arm-bl-cpufreq.c
index e37140f0f1b..d65aad7e9fc 100644
--- a/drivers/cpufreq/arm-bl-cpufreq.c
+++ b/drivers/cpufreq/arm-bl-cpufreq.c
@@ -41,6 +41,12 @@
#define CLUSTER_BIG 0
#define CLUSTER_LITTLE 1
+/*
+ * Switch latency advertised to cpufreq. This value is bogus and will
+ * need to be properly calibrated when running on real hardware.
+ */
+#define BL_CPUFREQ_FAKE_LATENCY 1
+
static struct cpufreq_frequency_table __read_mostly bl_freqs[] = {
{ CLUSTER_BIG, FREQ_BIG },
{ CLUSTER_LITTLE, FREQ_LITTLE },
@@ -167,7 +173,7 @@ static int bl_cpufreq_init(struct cpufreq_policy *policy)
/*
* Ideally, transition_latency should be calibrated here.
*/
- policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
+ policy->cpuinfo.transition_latency = BL_CPUFREQ_FAKE_LATENCY;
policy->cur = cluster_to_freq(cluster);
policy->shared_type = CPUFREQ_SHARED_TYPE_NONE;