Commit f59d3bbe authored by Dave Jones's avatar Dave Jones

[CPUFREQ] Fix cpufreq on ARM

cpufreq doesn't appear to initialise on ARM - cpufreq_register_driver()
fails with -ENODEV.

This appears to be because we register cpus at subsys_initcall() time,
and cpufreq drivers at arch_initcall() time.  We need cpufreq up and
running before any drivers are initialised since their timings depend
on the CPU clock rate.

The following patch appears to fix these problems.

From: Russell King
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 4459527d
...@@ -230,8 +230,9 @@ static int __init sa1100_cpu_init(struct cpufreq_policy *policy) ...@@ -230,8 +230,9 @@ static int __init sa1100_cpu_init(struct cpufreq_policy *policy)
} }
static struct cpufreq_driver sa1100_driver = { static struct cpufreq_driver sa1100_driver = {
.flags = (CPUFREQ_PANIC_OUTOFSYNC | .flags = CPUFREQ_STICKY |
CPUFREQ_PANIC_RESUME_OUTOFSYNC), CPUFREQ_PANIC_OUTOFSYNC |
CPUFREQ_PANIC_RESUME_OUTOFSYNC,
.verify = sa11x0_verify_speed, .verify = sa11x0_verify_speed,
.target = sa1100_target, .target = sa1100_target,
.get = sa11x0_getspeed, .get = sa11x0_getspeed,
......
...@@ -329,8 +329,9 @@ static int __init sa1110_cpu_init(struct cpufreq_policy *policy) ...@@ -329,8 +329,9 @@ static int __init sa1110_cpu_init(struct cpufreq_policy *policy)
} }
static struct cpufreq_driver sa1110_driver = { static struct cpufreq_driver sa1110_driver = {
.flags = (CPUFREQ_PANIC_OUTOFSYNC | .flags = CPUFREQ_STICKY |
CPUFREQ_PANIC_RESUME_OUTOFSYNC), CPUFREQ_PANIC_OUTOFSYNC |
CPUFREQ_PANIC_RESUME_OUTOFSYNC,
.verify = sa11x0_verify_speed, .verify = sa11x0_verify_speed,
.target = sa1110_target, .target = sa1110_target,
.get = sa11x0_getspeed, .get = sa11x0_getspeed,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment