Commit bb29b719 authored by Andreas Schwab's avatar Andreas Schwab Committed by Benjamin Herrenschmidt

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: default avatarAndreas Schwab <schwab@linux-m68k.org>
Tested-by: default avatarMichel Dänzer <michel@daenzer.net>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent ec1b33dc
...@@ -55,6 +55,7 @@ static unsigned int low_freq; ...@@ -55,6 +55,7 @@ static unsigned int low_freq;
static unsigned int hi_freq; static unsigned int hi_freq;
static unsigned int cur_freq; static unsigned int cur_freq;
static unsigned int sleep_freq; static unsigned int sleep_freq;
static unsigned long transition_latency;
/* /*
* Different models uses different mechanisms to switch the frequency * Different models uses different mechanisms to switch the frequency
...@@ -403,7 +404,7 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) ...@@ -403,7 +404,7 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
if (policy->cpu != 0) if (policy->cpu != 0)
return -ENODEV; return -ENODEV;
policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; policy->cpuinfo.transition_latency = transition_latency;
policy->cur = cur_freq; policy->cur = cur_freq;
cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu); cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu);
...@@ -658,12 +659,14 @@ static int __init pmac_cpufreq_setup(void) ...@@ -658,12 +659,14 @@ static int __init pmac_cpufreq_setup(void)
if (!value) if (!value)
goto out; goto out;
cur_freq = (*value) / 1000; cur_freq = (*value) / 1000;
transition_latency = CPUFREQ_ETERNAL;
/* Check for 7447A based MacRISC3 */ /* Check for 7447A based MacRISC3 */
if (of_machine_is_compatible("MacRISC3") && if (of_machine_is_compatible("MacRISC3") &&
of_get_property(cpunode, "dynamic-power-step", NULL) && of_get_property(cpunode, "dynamic-power-step", NULL) &&
PVR_VER(mfspr(SPRN_PVR)) == 0x8003) { PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
pmac_cpufreq_init_7447A(cpunode); pmac_cpufreq_init_7447A(cpunode);
transition_latency = 8000000;
/* Check for other MacRISC3 machines */ /* Check for other MacRISC3 machines */
} else if (of_machine_is_compatible("PowerBook3,4") || } else if (of_machine_is_compatible("PowerBook3,4") ||
of_machine_is_compatible("PowerBook3,5") || of_machine_is_compatible("PowerBook3,5") ||
......
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