From 123c922883b67f189d7893ff08c905fd5bc22ef9 Mon Sep 17 00:00:00 2001 From: Dave Martin Date: Fri, 27 Apr 2012 15:59:00 +0100 Subject: 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 --- drivers/cpufreq/arm-bl-cpufreq.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3