Fan control for PowerMac7_3
Andreas Schwab
schwab at suse.de
Sat Oct 16 08:16:28 EST 2004
Benjamin Herrenschmidt <benh at kernel.crashing.org> writes:
> On Fri, 2004-10-15 at 19:19, Benjamin Herrenschmidt wrote:
>> On Fri, 2004-10-15 at 19:16, Benjamin Herrenschmidt wrote:
>> > Hi !
>> >
>> > This is an experimental (read: totally untested) patch to the G5 fan
>> > control code. All I know is that it builds :)
>>
>> And I sent a wrong version ... sorry, the good one in a few minutes.
>
> Here it is:
Here's a patch to make it compile with DEBUG enabled:
--- linux-2.6.9-rc4/drivers/macintosh/therm_pm72.c.~1~ 2004-10-16 00:02:36.705511068 +0200
+++ linux-2.6.9-rc4/drivers/macintosh/therm_pm72.c 2004-10-16 00:07:04.815455733 +0200
@@ -652,7 +652,7 @@ static int do_read_one_cpu_values(struct
DBG(" cpu %d, fan reading error !\n", state->index);
} else {
state->rpm = rc;
- DBG(" cpu %d, exhaust RPM: %d\n", state->rpm);
+ DBG(" cpu %d, exhaust RPM: %d\n", state->index, state->rpm);
}
/* Get some sensor readings and scale it */
@@ -691,8 +691,8 @@ static int do_read_one_cpu_values(struct
state->last_power = *power;
DBG(" cpu %d, current: %d.%03d, voltage: %d.%03d, power: %d.%03d W\n",
- state->index, FIX32TOPRINT(current_a), FIX32TOPRINT(voltage),
- FIX32TOPRINT(*power));
+ state->index, FIX32TOPRINT(state->current_a),
+ FIX32TOPRINT(state->voltage), FIX32TOPRINT(*power));
return 0;
}
@@ -850,7 +850,7 @@ static void do_monitor_cpu_combined(void
state1->intake_rpm = state0->intake_rpm;
DBG("** CPU %d RPM: %d Ex, %d, Pump: %d, In, overtemp: %d\n",
- state->index, (int)state->rpm, intake, pump, state->overtemp);
+ state1->index, (int)state1->rpm, intake, pump, state1->overtemp);
/* We should check for errors, shouldn't we ? But then, what
* do we do once the error occurs ? For FCU notified fan
Andreas.
--
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
More information about the Linuxppc64-dev
mailing list