linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powermac/cpufreq_32: set non-infinite transition time for 7447A driver
@ 2012-10-29  9:15 Andreas Schwab
  2012-11-06 12:28 ` Michel Dänzer
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Schwab @ 2012-10-29  9:15 UTC (permalink / raw)
  To: linuxppc-dev

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>
---
 arch/powerpc/platforms/powermac/cpufreq_32.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index 6417119..311b804 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;
 static unsigned int hi_freq;
 static unsigned int cur_freq;
 static unsigned int sleep_freq;
+static unsigned long transition_latency;
 
 /*
  * Different models uses different mechanisms to switch the frequency
@@ -403,7 +404,7 @@ static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	if (policy->cpu != 0)
 		return -ENODEV;
 
-	policy->cpuinfo.transition_latency	= CPUFREQ_ETERNAL;
+	policy->cpuinfo.transition_latency	= transition_latency;
 	policy->cur = cur_freq;
 
 	cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu);
@@ -658,12 +659,14 @@ static int __init pmac_cpufreq_setup(void)
 	if (!value)
 		goto out;
 	cur_freq = (*value) / 1000;
+	transition_latency = CPUFREQ_ETERNAL;
 
 	/*  Check for 7447A based MacRISC3 */
 	if (of_machine_is_compatible("MacRISC3") &&
 	    of_get_property(cpunode, "dynamic-power-step", NULL) &&
 	    PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
 		pmac_cpufreq_init_7447A(cpunode);
+		transition_latency = 8000000;
 	/* Check for other MacRISC3 machines */
 	} else if (of_machine_is_compatible("PowerBook3,4") ||
 		   of_machine_is_compatible("PowerBook3,5") ||
-- 
1.8.0


-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH] powermac/cpufreq_32: set non-infinite transition time for 7447A driver
  2012-10-29  9:15 [PATCH] powermac/cpufreq_32: set non-infinite transition time for 7447A driver Andreas Schwab
@ 2012-11-06 12:28 ` Michel Dänzer
  0 siblings, 0 replies; 2+ messages in thread
From: Michel Dänzer @ 2012-11-06 12:28 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: linuxppc-dev

On Mon, 2012-10-29 at 10:15 +0100, Andreas Schwab wrote:=20
> 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).
>=20
> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>

Tested-by: Michel D=E4nzer <michel@daenzer.net>


--=20
Earthling Michel D=E4nzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer

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

end of thread, other threads:[~2012-11-06 12:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-29  9:15 [PATCH] powermac/cpufreq_32: set non-infinite transition time for 7447A driver Andreas Schwab
2012-11-06 12:28 ` Michel Dänzer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).