linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq support for 7447A on 2004 iBooks
@ 2004-06-05  9:15 John Steele Scott
  2004-06-05 12:53 ` John Steele Scott
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: John Steele Scott @ 2004-06-05  9:15 UTC (permalink / raw)
  To: linuxppc-dev list; +Cc: Benjamin Herrenschmidt, Christiaan Welvaart, cpufreq



Okay, thanks to some tips from Benjamin Herrenschmidt, I now have a patch
against 2.6.6 which lets you control dynamic frequency scaling on the latest
model iBook G4. I imagine that this same method would apply to the new
PowerBooks as well.

cheers,

John

diff -upr -X dontdiff linux/arch/ppc/kernel/misc.S
linux-2.6.6-dfs/arch/ppc/kernel/misc.S
- --- linux/arch/ppc/kernel/misc.S	2004-06-05 18:02:48.000000000 +0930
+++ linux-2.6.6-dfs/arch/ppc/kernel/misc.S	2004-05-28 12:47:22.000000000 +0930
@@ -253,6 +253,24 @@ _GLOBAL(low_choose_750fx_pll)
 	mtmsr	r7
 	blr

+_GLOBAL(choose_7447a_dfs)
+	/* Clear MSR:EE */
+	mfmsr	r7
+	rlwinm	r0,r7,0,17,15
+	mtmsr	r0
+
+	/* Calc new HID1 value */
+	mfspr	r4,SPRN_HID1
+	insrwi	r4,r3,1,9	/* insert parameter into bit 9 */
+	sync
+	mtspr	SPRN_HID1,r4
+	sync
+	isync
+
+	/* Return */
+	mtmsr	r7
+	blr
+
 #endif /* CONFIG_CPU_FREQ_PMAC && CONFIG_6xx */

 /* void local_save_flags_ptr(unsigned long *flags) */
diff -upr -X dontdiff linux/arch/ppc/platforms/pmac_cpufreq.c
linux-2.6.6-dfs/arch/ppc/platforms/pmac_cpufreq.c
- --- linux/arch/ppc/platforms/pmac_cpufreq.c	2004-06-05 18:02:48.000000000
+0930
+++ linux-2.6.6-dfs/arch/ppc/platforms/pmac_cpufreq.c	2004-06-05
18:08:06.000000000 +0930
@@ -47,6 +47,7 @@
 #warning "WARNING, CPUFREQ not recommended on SMP kernels"
 #endif

+extern void choose_7447a_dfs(int dfs);
 extern void low_choose_750fx_pll(int pll);
 extern void low_sleep_handler(void);
 extern void openpic_suspend(struct sys_device *sysdev, u32 state);
@@ -61,6 +62,7 @@ static unsigned int cur_freq;
 /* Clean that up some day ... use a func ptr or at least an enum... */
 static int cpufreq_uses_pmu;
 static int cpufreq_uses_gpios;
+static int cpufreq_uses_dfs;

 static u32 voltage_gpio;
 static u32 frequency_gpio;
@@ -123,6 +125,29 @@ static int __pmac cpu_750fx_cpu_speed(in
 	return 0;
 }

+/* Switch CPU speed using DFS */
+static int __pmac dfs_set_cpu_speed(int low_speed)
+{
+	/* If ramping up, set voltage first */
+	if (low_speed == 0) {
+		pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x05);
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(HZ/1000);
+	}
+
+	/* set frequency */
+	choose_7447a_dfs(low_speed);
+
+	/* If ramping down, set voltage last */
+	if (low_speed == 1) {
+		pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x04);
+		set_current_state(TASK_UNINTERRUPTIBLE);
+		schedule_timeout(HZ/1000);
+	}
+
+	return 0;
+}
+
 /* Switch CPU speed using slewing GPIOs
  */
 static int __pmac gpios_set_cpu_speed(unsigned int low_speed)
@@ -273,6 +298,8 @@ static int __pmac do_set_cpu_speed(int s
 		rc = pmu_set_cpu_speed(speed_mode);
 	else if (cpufreq_uses_gpios)
 		rc = gpios_set_cpu_speed(speed_mode);
+	else if (cpufreq_uses_dfs)
+		rc = dfs_set_cpu_speed(speed_mode);
 	else
 		rc = cpu_750fx_cpu_speed(speed_mode);
 	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
@@ -346,6 +373,7 @@ static struct cpufreq_driver pmac_cpufre
  *  - iBook2 500 (PMU based, 400Mhz & 500Mhz)
  *  - iBook2 700 (CPU based, 400Mhz & 700Mhz, support low voltage)
  *  - Recent MacRISC3 machines
+ *  - iBook G4s with 7447A CPUs
  */
 static int __init pmac_cpufreq_setup(void)
 {
@@ -375,6 +403,32 @@ static int __init pmac_cpufreq_setup(voi
 		struct device_node *freq_gpio_np = of_find_node_by_name(NULL,
"frequency-gpio");
 		struct device_node *slew_done_gpio_np = of_find_node_by_name(NULL,
"slewing-done");

+		/*  Check for 7447A based iBook G4 */
+		if (machine_is_compatible("PowerBook6,5")) {
+			/* OF only reports the high frequency */
+			hi_freq = cur_freq;
+			low_freq = cur_freq/2;
+			if(mfspr(HID1) & HID1_DFS)
+				cur_freq = low_freq;
+			else
+				cur_freq = hi_freq;
+
+			volt_gpio_np = of_find_node_by_name(NULL, "cpu-vcore-select");
+			if (!volt_gpio_np){
+				printk(KERN_ERR "cpufreq: missing cpu-vcore-select gpio\n");
+				goto out;
+			}
+
+			u32 *reg = (u32 *)get_property(volt_gpio_np, "reg", NULL);
+			voltage_gpio = *reg;
+
+			cpufreq_uses_pmu = 0;
+			cpufreq_uses_gpios = 0;
+			cpufreq_uses_dfs = 1;
+			has_freq_ctl = 1;
+			goto out;
+		}
+
 		/*
 		 * Check to see if it's GPIO driven or PMU only
 		 *
@@ -497,7 +551,7 @@ out:
 	printk(KERN_INFO "Registering PowerMac CPU frequency driver\n");
 	printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Boot: %d Mhz, switch method:
%s\n",
 	       low_freq/1000, hi_freq/1000, cur_freq/1000,
- -	       cpufreq_uses_pmu ? "PMU" : (cpufreq_uses_gpios ? "GPIOs" : "CPU"));
+	       cpufreq_uses_pmu ? "PMU" : (cpufreq_uses_gpios ? "GPIOs" :
(cpufreq_uses_dfs ? "DFS" : "CPU")));

 	return cpufreq_register_driver(&pmac_cpufreq_driver);
 }
diff -upr -X dontdiff linux/include/asm-ppc/reg.h
linux-2.6.6-dfs/include/asm-ppc/reg.h
- --- linux/include/asm-ppc/reg.h	2004-06-05 18:02:48.000000000 +0930
+++ linux-2.6.6-dfs/include/asm-ppc/reg.h	2004-06-05 18:37:00.778149544 +0930
@@ -174,6 +174,7 @@

 #define SPRN_HID1	0x3F1		/* Hardware Implementation Register 1 */
 #define HID1_EMCP	(1<<31)		/* 7450 Machine Check Pin Enable */
+#define HID1_DFS	(1<<22)		/* 7447A Dynamic Frequency Scaling */
 #define HID1_PC0	(1<<16)		/* 7450 PLL_CFG[0] */
 #define HID1_PC1	(1<<15)		/* 7450 PLL_CFG[1] */
 #define HID1_PC2	(1<<14)		/* 7450 PLL_CFG[2] */

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-05  9:15 [PATCH] cpufreq support for 7447A on 2004 iBooks John Steele Scott
@ 2004-06-05 12:53 ` John Steele Scott
  2004-06-05 16:21 ` Benjamin Herrenschmidt
  2004-06-10  8:50 ` Colin LEROY
  2 siblings, 0 replies; 14+ messages in thread
From: John Steele Scott @ 2004-06-05 12:53 UTC (permalink / raw)
  To: linuxppc-dev list; +Cc: Benjamin Herrenschmidt, Christiaan Welvaart, cpufreq



Sorry, it seems that my mailer and I broke the last important line of the
patch. I have uploaded a copy here which has the long lines preserved:

http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040605.patch

cheers,

John

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-05  9:15 [PATCH] cpufreq support for 7447A on 2004 iBooks John Steele Scott
  2004-06-05 12:53 ` John Steele Scott
@ 2004-06-05 16:21 ` Benjamin Herrenschmidt
  2004-06-10 11:34   ` John Steele Scott
  2004-06-10  8:50 ` Colin LEROY
  2 siblings, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2004-06-05 16:21 UTC (permalink / raw)
  To: John Steele Scott; +Cc: linuxppc-dev list, Christiaan Welvaart, cpufreq


On Sat, 2004-06-05 at 04:15, John Steele Scott wrote:
>
> Okay, thanks to some tips from Benjamin Herrenschmidt, I now have a patch
> against 2.6.6 which lets you control dynamic frequency scaling on the latest
> model iBook G4. I imagine that this same method would apply to the new
> PowerBooks as well.

I suggest you also look at the latest Darwin code Apple released, more
sepecifically AppleMacRISC2PE. There is some new bits including something
about tweaking a bus delay when changing the frequency on these models.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-05  9:15 [PATCH] cpufreq support for 7447A on 2004 iBooks John Steele Scott
  2004-06-05 12:53 ` John Steele Scott
  2004-06-05 16:21 ` Benjamin Herrenschmidt
@ 2004-06-10  8:50 ` Colin LEROY
  2 siblings, 0 replies; 14+ messages in thread
From: Colin LEROY @ 2004-06-10  8:50 UTC (permalink / raw)
  To: John Steele Scott, linuxppc-dev list
  Cc: Benjamin Herrenschmidt, Christiaan Welvaart, cpufreq


Hi,

> model iBook G4. I imagine that this same method would apply to the new
> PowerBooks as well.

According to the posts in this forum, it does.
http://forums.gentoo.org/viewtopic.php?t=177205

--
Colin

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-05 16:21 ` Benjamin Herrenschmidt
@ 2004-06-10 11:34   ` John Steele Scott
  2004-06-10 16:12     ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 14+ messages in thread
From: John Steele Scott @ 2004-06-10 11:34 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Christiaan Welvaart, cpufreq



On Sun, 6 Jun 2004 01:51 am, Benjamin Herrenschmidt wrote:
> I suggest you also look at the latest Darwin code Apple released, more
> sepecifically AppleMacRISC2PE. There is some new bits including something
> about tweaking a bus delay when changing the frequency on these models.

I had time to have a look at this today (actually, I didn't have time, but I
looked at it anyway :). There is a register in the UniNorth which controls
whether the address acknowledge will be delayed or not. This delay is not
required when running at high speed.

I have made a new patch for this, available from:
http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040610.patch

This is a fair bit larger than the previous patch, as I have added a function
to the intrepid feature table to control the AACK delay. There is a slight
performance improvement for processes which are bound by memory latency (e.g.
repeatedly cat'ing a 180MB file to /dev/null takes 0.270s with this patch
versus 0.277s with the last one).

This patch also accepts the PowerBook5,4 models. One thing that needs checking
as that the revision of UniNorth on this model is high enough for
intrepid_aack_delay_enable to do its thing. I just assumed that they have the
same UniNorth, but I will ask in the forum thread which Colin pointed to
earlier tonight.

cheers,

John

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-10 11:34   ` John Steele Scott
@ 2004-06-10 16:12     ` Benjamin Herrenschmidt
  2004-06-16  2:34       ` John Steele Scott
  0 siblings, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2004-06-10 16:12 UTC (permalink / raw)
  To: John Steele Scott; +Cc: linuxppc-dev list, Christiaan Welvaart, cpufreq


> I have made a new patch for this, available from:
> http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040610.patch

Looks good except for some coding style issues ;)

Use spaces between } and else for example, there's also an if without a
space before the ( and please, name the low level asm function low_* like
the other ones, for consistency.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-10 16:12     ` Benjamin Herrenschmidt
@ 2004-06-16  2:34       ` John Steele Scott
  2004-06-18 12:02         ` Sebastian Henschel
  0 siblings, 1 reply; 14+ messages in thread
From: John Steele Scott @ 2004-06-16  2:34 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list, Christiaan Welvaart, cpufreq



On Fri, 11 Jun 2004 01:42 am, Benjamin Herrenschmidt wrote:
> > I have made a new patch for this, available from:
> > http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040610.patch
>
> Looks good except for some coding style issues ;)
>
> Use spaces between } and else for example, there's also an if without a
> space before the ( and please, name the low level asm function low_* like
> the other ones, for consistency.

A new patch which addresses these issues is at:
http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040616.patch

This is functionally identical to the previous patch.

cheers,

John

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-16  2:34       ` John Steele Scott
@ 2004-06-18 12:02         ` Sebastian Henschel
  2004-06-18 15:30           ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 14+ messages in thread
From: Sebastian Henschel @ 2004-06-18 12:02 UTC (permalink / raw)
  To: linuxppc-dev list

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="gKMricLos+KVdGMg", Size: 3349 bytes --]


hello john..

* John Steele Scott <toojays@toojays.net> [2004-06-16 09:24 +0200]:

> On Fri, 11 Jun 2004 01:42 am, Benjamin Herrenschmidt wrote:
> > > I have made a new patch for this, available from:
> > > http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040610.patch
> >
> > Looks good except for some coding style issues ;)
> >
> > Use spaces between } and else for example, there's also an if
> > without a space before the ( and please, name the low level asm
> > function low_* like the other ones, for consistency.
>
> A new patch which addresses these issues is at:
> http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040616.patch
>
> This is functionally identical to the previous patch.

thanks a lot for your patch, it seems to work, according to info from
cpufreqd, bogomips and /proc/cpuinfo. though i had to tweak it a little
bit for the alu powerbook g4 2nd generation 12" aka powerbook6,4:

--- arch/ppc/platforms/pmac_cpufreq.c.old	2004-06-18 12:33:37.000000000 +0200
+++ arch/ppc/platforms/pmac_cpufreq.c	2004-06-18 12:34:32.000000000 +0200
@@ -411,6 +411,7 @@ static int __init pmac_cpufreq_setup(voi

 		/*  Check for 7447A based iBook G4 */
 		if (machine_is_compatible("PowerBook6,5") ||
+		    machine_is_compatible("PowerBook6,4") ||
 		    machine_is_compatible("PowerBook5,4")) {
 			/* OF only reports the high frequency */
 			hi_freq = cur_freq;

i also added an entry in the "feature"-table for 6,4 and 5,4 (which you
might have forgotten at this place). the 5,4 is the alu powerbook g4 2nd
generation 15" which i had worked on two weeks ago (but cannot anymore).

--- arch/ppc/platforms/pmac_feature.c.orig	2004-06-18 12:28:44.000000000 +0200
+++ arch/ppc/platforms/pmac_feature.c	2004-06-18 12:32:39.000000000 +0200
@@ -2135,6 +2135,10 @@ static struct pmac_mb_def pmac_mb_defs[]
 		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
 		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
 	},
+	{	"PowerBook5,4",			"PowerBook G4 15\"",
+		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
+		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+	},
 	{	"PowerBook6,1",			"PowerBook G4 12\"",
 		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
 		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
@@ -2147,6 +2151,10 @@ static struct pmac_mb_def pmac_mb_defs[]
 		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
 		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
 	},
+	{	"PowerBook6,4",			"PowerBook G4 12\"",
+		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
+		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,
+	},
 	{	"PowerBook6,5",			"iBook G4",
 		PMAC_TYPE_UNKNOWN_INTREPID,	intrepid_features,
 		PMAC_MB_HAS_FW_POWER | PMAC_MB_MOBILE,

since there are several entries for PowerBook G4 12", 15" and there will
presumably be a new entry to be made for the current generation 17",
would it be sensible to differentiate the short descriptions a little
bit more? like:

"PowerBook6,4", "PowerBook G4 12\", Alu 2nd Generation"
"PowerBook5,4", "PowerBook G4 15\", Alu 2nd Generation"

i personally own a powerbook5,2 which is the first alu generation, could
that be:

"PowerBook5,2", "PowerBook G4 15\", Alu 1st Generation"

or do the titanium powerbooks g4 also come with the id 5,2?

thanks,
 sebastian
--
::: .O.
::: ..O
::: OOO
::: lynx -source http://www.kodeaffe.de/shensche.pub | gpg --import

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-18 12:02         ` Sebastian Henschel
@ 2004-06-18 15:30           ` Benjamin Herrenschmidt
  2004-06-19  3:19             ` John Steele Scott
  0 siblings, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2004-06-18 15:30 UTC (permalink / raw)
  To: Sebastian Henschel; +Cc: linuxppc-dev list


Can you produce a combined patch ?

Oh, also, stop sending broken MIME messages please ;)

I don't want too long strings in the table, having duplicates is fine.

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-18 15:30           ` Benjamin Herrenschmidt
@ 2004-06-19  3:19             ` John Steele Scott
  2004-06-19  4:39               ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 14+ messages in thread
From: John Steele Scott @ 2004-06-19  3:19 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Sebastian Henschel, linuxppc-dev list



On Sat, 19 Jun 2004 01:00 am, Benjamin Herrenschmidt wrote:
> Can you produce a combined patch ?

Ben,

I've added the check for the 12" and 17" PBs to my patch, the latest version
is at http://www/~toojays/misc/7447a_cpufreq_20040619.patch. I haven't heard
from anybody using the 17" PB, but got the ID from
http://www.theapplemuseum.com/index.php?id=tam&page=products&subpage=newworld

Do you want the additions to pmac_mb_defs to go in the same patch? In my mind
the two issues are independent.

cheers,

John

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-19  3:19             ` John Steele Scott
@ 2004-06-19  4:39               ` Benjamin Herrenschmidt
  2004-06-20 11:13                 ` John Steele Scott
  0 siblings, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2004-06-19  4:39 UTC (permalink / raw)
  To: John Steele Scott; +Cc: Sebastian Henschel, linuxppc-dev list


On Fri, 2004-06-18 at 22:19, John Steele Scott wrote:
>
> On Sat, 19 Jun 2004 01:00 am, Benjamin Herrenschmidt wrote:
> > Can you produce a combined patch ?
>
> Ben,
>
> I've added the check for the 12" and 17" PBs to my patch, the latest version
> is at http://www/~toojays/misc/7447a_cpufreq_20040619.patch. I haven't heard
> from anybody using the 17" PB, but got the ID from
> http://www.theapplemuseum.com/index.php?id=tam&page=products&subpage=newworld
>
> Do you want the additions to pmac_mb_defs to go in the same patch? In my mind
> the two issues are independent.

Hi ! Thanks. Yes, the mb defs can go into the same patch, I'll just
label it "improve support for newer powerbooks" ;)

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-19  4:39               ` Benjamin Herrenschmidt
@ 2004-06-20 11:13                 ` John Steele Scott
  2004-06-20 16:34                   ` Benjamin Herrenschmidt
  2004-06-30 13:14                   ` Christiaan Welvaart
  0 siblings, 2 replies; 14+ messages in thread
From: John Steele Scott @ 2004-06-20 11:13 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Sebastian Henschel, linuxppc-dev list



Sorry, I mailed this yesterday but forgot to Re:All so it didn't get to the
list.

On Sat, 19 Jun 2004 02:09 pm, Benjamin Herrenschmidt wrote:
> On Fri, 2004-06-18 at 22:19, John Steele Scott wrot
> > Do you want the additions to pmac_mb_defs to go in the same patch? In my
> > mind the two issues are independent.
>
> Hi ! Thanks. Yes, the mb defs can go into the same patch, I'll just
> label it "improve support for newer powerbooks" ;)

Okay, here it is:
http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040619a.patch

What is it that is "unknown" about these boards, that they are called
PMAC_TYPE_UNKNOWN_INTREPID? There is no such thing as a "known" intrepid?

Also, I sent an email to the list asking about sleep a couple of days ago. Can
you comment on that?

cheers,

John

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-20 11:13                 ` John Steele Scott
@ 2004-06-20 16:34                   ` Benjamin Herrenschmidt
  2004-06-30 13:14                   ` Christiaan Welvaart
  1 sibling, 0 replies; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2004-06-20 16:34 UTC (permalink / raw)
  To: John Steele Scott; +Cc: Sebastian Henschel, linuxppc-dev list


On Sun, 2004-06-20 at 06:13, John Steele Scott wrote:
>
> Okay, here it is:
> http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040619a.patch
>
> What is it that is "unknown" about these boards, that they are called
> PMAC_TYPE_UNKNOWN_INTREPID? There is no such thing as a "known" intrepid?

Bad naming of the constant, I should have called it "GENERIC_INTREPID"
instead. I used to define constants for machine models, but that ended
up being useless for newworld (still useful to differenciate some
oldworld though). So I just use the generic constant nowadays.

> Also, I sent an email to the list asking about sleep a couple of days ago. Can
> you comment on that?

The problem with sleep at this point is to wake up the video chip which
is shut down by the hardware. ATI will maybe provide infos for that one
day... Or I'll be able to reverse engineer enough when I find time...

Ben.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

* Re: [PATCH] cpufreq support for 7447A on 2004 iBooks
  2004-06-20 11:13                 ` John Steele Scott
  2004-06-20 16:34                   ` Benjamin Herrenschmidt
@ 2004-06-30 13:14                   ` Christiaan Welvaart
  1 sibling, 0 replies; 14+ messages in thread
From: Christiaan Welvaart @ 2004-06-30 13:14 UTC (permalink / raw)
  To: linuxppc-dev list; +Cc: Benjamin Herrenschmidt, John Steele Scott


On Sun, 20 Jun 2004, John Steele Scott wrote:

> Okay, here it is:
> http://www.toojays.net/~toojays/misc/7447a_cpufreq_20040619a.patch

Tested on my 1067MHz iBook that apparently doesn't need the voltage
tweak - it still works.

The patch breaks (32-bit) kernel builds for G5s etc (non-CONFIG_6xx).
Patch below fixes that.


    Christiaan


--- linux-2.6.7/arch/ppc/platforms/pmac_cpufreq.c.bak   2004-06-25 22:35:25.094647214 +0200
+++ linux-2.6.7/arch/ppc/platforms/pmac_cpufreq.c       2004-06-26 04:13:19.182914571 +0200
@@ -128,6 +128,7 @@
 /* Switch CPU speed using DFS */
 static int __pmac dfs_set_cpu_speed(int low_speed)
 {
+#ifdef CONFIG_6xx
        if (low_speed == 0) {
                /* ramping up, set voltage first */
                pmac_call_feature(PMAC_FTR_WRITE_GPIO, NULL, voltage_gpio, 0x05);
@@ -150,6 +151,7 @@
                /* ramping up, disable aack delay last */
                pmac_call_feature(PMAC_FTR_AACK_DELAY_ENABLE, NULL, 0, 0);
        }
+#endif

        return 0;
 }


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

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

end of thread, other threads:[~2004-06-30 13:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-05  9:15 [PATCH] cpufreq support for 7447A on 2004 iBooks John Steele Scott
2004-06-05 12:53 ` John Steele Scott
2004-06-05 16:21 ` Benjamin Herrenschmidt
2004-06-10 11:34   ` John Steele Scott
2004-06-10 16:12     ` Benjamin Herrenschmidt
2004-06-16  2:34       ` John Steele Scott
2004-06-18 12:02         ` Sebastian Henschel
2004-06-18 15:30           ` Benjamin Herrenschmidt
2004-06-19  3:19             ` John Steele Scott
2004-06-19  4:39               ` Benjamin Herrenschmidt
2004-06-20 11:13                 ` John Steele Scott
2004-06-20 16:34                   ` Benjamin Herrenschmidt
2004-06-30 13:14                   ` Christiaan Welvaart
2004-06-10  8:50 ` Colin LEROY

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).