aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-10-28 19:15:14 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-11-14 21:00:33 -0500
commitbb29b719372742939af05457aff1b59608764e89 (patch)
tree2132db6166f40da511fb0e04119799a568345270 /arch/powerpc
parentec1b33dcd2c0ed773e6458d1c8b337966114562b (diff)
powerpc/powermac/cpufreq_32: Set non-infinite transition time for 7447A driver
The transition time for the 7447A is around 8ms which makes it possible to use the ondemand governor. This has been tested on the iBook G4 (PowerBook6,7). Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Tested-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index 64171198535c..311b804353b1 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_32.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_32.c
@@ -55,6 +55,7 @@ static unsigned int low_freq;
55static unsigned int hi_freq; 55static unsigned int hi_freq;
56static unsigned int cur_freq; 56static unsigned int cur_freq;
57static unsigned int sleep_freq; 57static unsigned int sleep_freq;
58static unsigned long transition_latency;
58 59
59/* 60/*
60 * Different models uses different mechanisms to switch the frequency 61 * Different models uses different mechanisms to switch the frequency
@@ -403,7 +404,7 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
403 if (policy->cpu != 0) 404 if (policy->cpu != 0)
404 return -ENODEV; 405 return -ENODEV;
405 406
406 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 407 policy->cpuinfo.transition_latency = transition_latency;
407 policy->cur = cur_freq; 408 policy->cur = cur_freq;
408 409
409 cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu); 410 cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu);
@@ -658,12 +659,14 @@ static int __init pmac_cpufreq_setup(void)
658 if (!value) 659 if (!value)
659 goto out; 660 goto out;
660 cur_freq = (*value) / 1000; 661 cur_freq = (*value) / 1000;
662 transition_latency = CPUFREQ_ETERNAL;
661 663
662 /* Check for 7447A based MacRISC3 */ 664 /* Check for 7447A based MacRISC3 */
663 if (of_machine_is_compatible("MacRISC3") && 665 if (of_machine_is_compatible("MacRISC3") &&
664 of_get_property(cpunode, "dynamic-power-step", NULL) && 666 of_get_property(cpunode, "dynamic-power-step", NULL) &&
665 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) { 667 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
666 pmac_cpufreq_init_7447A(cpunode); 668 pmac_cpufreq_init_7447A(cpunode);
669 transition_latency = 8000000;
667 /* Check for other MacRISC3 machines */ 670 /* Check for other MacRISC3 machines */
668 } else if (of_machine_is_compatible("PowerBook3,4") || 671 } else if (of_machine_is_compatible("PowerBook3,4") ||
669 of_machine_is_compatible("PowerBook3,5") || 672 of_machine_is_compatible("PowerBook3,5") ||