All of lore.kernel.org
 help / color / mirror / Atom feed
* cpufreq on ARM broken
@ 2004-05-29 16:01 Russell King
  2004-06-01 17:11 ` Dave Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Russell King @ 2004-05-29 16:01 UTC (permalink / raw)
  To: cpufreq

Hi,

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.

--- linux-tolinus/arch/arm/mach-sa1100/cpu-sa1100.c	Fri May 21 00:05:46 2004
+++ linux/arch/arm/mach-sa1100/cpu-sa1100.c	Sat May 29 16:19:51 2004
@@ -230,8 +230,9 @@
 }
 
 static struct cpufreq_driver sa1100_driver = {
-	.flags		= (CPUFREQ_PANIC_OUTOFSYNC | 
-			   CPUFREQ_PANIC_RESUME_OUTOFSYNC),
+	.flags		= CPUFREQ_STICKY |
+			  CPUFREQ_PANIC_OUTOFSYNC | 
+			  CPUFREQ_PANIC_RESUME_OUTOFSYNC,
 	.verify		= sa11x0_verify_speed,
 	.target		= sa1100_target,
 	.get		= sa11x0_getspeed,
--- linux-tolinus/arch/arm/mach-sa1100/cpu-sa1110.c	Fri May 21 00:05:46 2004
+++ linux/arch/arm/mach-sa1100/cpu-sa1110.c	Sat May 29 16:19:35 2004
@@ -329,8 +329,9 @@
 }
 
 static struct cpufreq_driver sa1110_driver = {
-	.flags		= (CPUFREQ_PANIC_OUTOFSYNC | 
-			   CPUFREQ_PANIC_RESUME_OUTOFSYNC),
+	.flags		= CPUFREQ_STICKY |
+			  CPUFREQ_PANIC_OUTOFSYNC | 
+			  CPUFREQ_PANIC_RESUME_OUTOFSYNC,
 	.verify		= sa11x0_verify_speed,
 	.target		= sa1110_target,
 	.get		= sa11x0_getspeed,

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-06-02 21:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-29 16:01 cpufreq on ARM broken Russell King
2004-06-01 17:11 ` Dave Jones
2004-06-02 12:21   ` Dominik Brodowski
2004-06-02 12:59     ` Dave Jones
2004-06-02 13:08       ` Dominik Brodowski
2004-06-02 21:36     ` Russell King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.