diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-07-06 04:03:06 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-27 20:42:49 -0400 |
commit | 8279d2e6062673f31c59ad9e2104024123154267 (patch) | |
tree | 8410692303bae0ee8d38c5c7f01e489c5c63ccd1 /drivers/macintosh/therm_pm72.h | |
parent | 30f30e13055d1e018c70d2b1b3ff86f8c25c511b (diff) |
[POWERPC] Xserve G5 thermal control fixes
The thermal control for the Xserve G5s had a few issues. For one, the
way to program the RPM fans speeds into the FCU is different between it
and the desktop models, which I didn't figure out until recently, and it
was missing a control loop for the slots fan, running it too fast. Both
of those problems were causing the machine to be much more noisy than
necessary. This patch also changes the fixed value of the slots fan for
desktop G5s to 40% instead of 50%. It seems to still have a pretty good
airflow that way and is much less noisy.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/macintosh/therm_pm72.h')
-rw-r--r-- | drivers/macintosh/therm_pm72.h | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/drivers/macintosh/therm_pm72.h b/drivers/macintosh/therm_pm72.h index fc7e9b7ecaf2..393cc9df94e1 100644 --- a/drivers/macintosh/therm_pm72.h +++ b/drivers/macintosh/therm_pm72.h | |||
@@ -105,6 +105,7 @@ static char * critical_overtemp_path = "/sbin/critical_overtemp"; | |||
105 | #define DRIVES_DALLAS_ID 0x94 | 105 | #define DRIVES_DALLAS_ID 0x94 |
106 | #define BACKSIDE_MAX_ID 0x98 | 106 | #define BACKSIDE_MAX_ID 0x98 |
107 | #define XSERVE_DIMMS_LM87 0x25a | 107 | #define XSERVE_DIMMS_LM87 0x25a |
108 | #define XSERVE_SLOTS_LM75 0x290 | ||
108 | 109 | ||
109 | /* | 110 | /* |
110 | * Some MAX6690, DS1775, LM87 register definitions | 111 | * Some MAX6690, DS1775, LM87 register definitions |
@@ -198,7 +199,7 @@ struct drives_pid_state | |||
198 | 199 | ||
199 | #define SLOTS_FAN_PWM_DEFAULT_ID 2 | 200 | #define SLOTS_FAN_PWM_DEFAULT_ID 2 |
200 | #define SLOTS_FAN_PWM_INDEX 2 | 201 | #define SLOTS_FAN_PWM_INDEX 2 |
201 | #define SLOTS_FAN_DEFAULT_PWM 50 /* Do better here ! */ | 202 | #define SLOTS_FAN_DEFAULT_PWM 40 /* Do better here ! */ |
202 | 203 | ||
203 | 204 | ||
204 | /* | 205 | /* |
@@ -206,7 +207,7 @@ struct drives_pid_state | |||
206 | */ | 207 | */ |
207 | #define DIMM_PID_G_d 0 | 208 | #define DIMM_PID_G_d 0 |
208 | #define DIMM_PID_G_p 0 | 209 | #define DIMM_PID_G_p 0 |
209 | #define DIMM_PID_G_r 0x6553600 | 210 | #define DIMM_PID_G_r 0x06553600 |
210 | #define DIMM_PID_INPUT_TARGET 3276800 | 211 | #define DIMM_PID_INPUT_TARGET 3276800 |
211 | #define DIMM_PID_INTERVAL 1 | 212 | #define DIMM_PID_INTERVAL 1 |
212 | #define DIMM_PID_OUTPUT_MAX 14000 | 213 | #define DIMM_PID_OUTPUT_MAX 14000 |
@@ -226,6 +227,31 @@ struct dimm_pid_state | |||
226 | }; | 227 | }; |
227 | 228 | ||
228 | 229 | ||
230 | /* | ||
231 | * PID factors for the Xserve Slots control loop | ||
232 | */ | ||
233 | #define SLOTS_PID_G_d 0 | ||
234 | #define SLOTS_PID_G_p 0 | ||
235 | #define SLOTS_PID_G_r 0x00100000 | ||
236 | #define SLOTS_PID_INPUT_TARGET 3200000 | ||
237 | #define SLOTS_PID_INTERVAL 1 | ||
238 | #define SLOTS_PID_OUTPUT_MAX 100 | ||
239 | #define SLOTS_PID_OUTPUT_MIN 20 | ||
240 | #define SLOTS_PID_HISTORY_SIZE 20 | ||
241 | |||
242 | struct slots_pid_state | ||
243 | { | ||
244 | int ticks; | ||
245 | struct i2c_client * monitor; | ||
246 | s32 sample_history[SLOTS_PID_HISTORY_SIZE]; | ||
247 | s32 error_history[SLOTS_PID_HISTORY_SIZE]; | ||
248 | int cur_sample; | ||
249 | s32 last_temp; | ||
250 | int first; | ||
251 | int pwm; | ||
252 | }; | ||
253 | |||
254 | |||
229 | 255 | ||
230 | /* Desktops */ | 256 | /* Desktops */ |
231 | 257 | ||
@@ -283,6 +309,9 @@ struct cpu_pid_state | |||
283 | s32 pump_max; | 309 | s32 pump_max; |
284 | }; | 310 | }; |
285 | 311 | ||
312 | /* Tickle FCU every 10 seconds */ | ||
313 | #define FCU_TICKLE_TICKS 10 | ||
314 | |||
286 | /* | 315 | /* |
287 | * Driver state | 316 | * Driver state |
288 | */ | 317 | */ |