View | Details | Raw Unified | Return to bug 209202
Collapse All | Expand All

(-)b/sys/powerpc/powermac/powermac_thermal.c (-3 / +3 lines)
Lines 43-49 __FBSDID("$FreeBSD$"); Link Here
43
#include "powermac_thermal.h"
43
#include "powermac_thermal.h"
44
44
45
/* A 10 second timer for spinning down fans. */
45
/* A 10 second timer for spinning down fans. */
46
#define FAN_HYSTERESIS_TIMER	10
46
#define FAN_HYSTERESIS_TIMER	30
47
47
48
static void fan_management_proc(void);
48
static void fan_management_proc(void);
49
static void pmac_therm_manage_fans(void);
49
static void pmac_therm_manage_fans(void);
Lines 143-152 pmac_therm_manage_fans(void) Link Here
143
		average_excess = max_excess_zone = 0;
143
		average_excess = max_excess_zone = 0;
144
		SLIST_FOREACH(sensor, &sensors, entries) {
144
		SLIST_FOREACH(sensor, &sensors, entries) {
145
			temp = imin(sensor->last_val,
145
			temp = imin(sensor->last_val,
146
			    sensor->sensor->max_temp);
146
			    sensor->sensor->high_temp);
147
			frac_excess = (temp -
147
			frac_excess = (temp -
148
			    sensor->sensor->target_temp)*100 /
148
			    sensor->sensor->target_temp)*100 /
149
			    (sensor->sensor->max_temp - temp + 1);
149
			    (sensor->sensor->high_temp - temp + 1);
150
			if (frac_excess < 0)
150
			if (frac_excess < 0)
151
				frac_excess = 0;
151
				frac_excess = 0;
152
			if (sensor->sensor->zone == fan->fan->zone) {
152
			if (sensor->sensor->zone == fan->fan->zone) {
(-)b/sys/powerpc/powermac/powermac_thermal.h (-1 / +1 lines)
Lines 42-48 struct pmac_fan { Link Here
42
};
42
};
43
43
44
struct pmac_therm {
44
struct pmac_therm {
45
	int target_temp, max_temp;	/* Tenths of a degree K */
45
	int target_temp, high_temp, max_temp;	/* Tenths of a degree K */
46
	
46
	
47
	char name[32];
47
	char name[32];
48
	int zone;
48
	int zone;
(-)b/sys/powerpc/powermac/smu.c (-2 / +3 lines)
Lines 1245-1252 smu_attach_sensors(device_t dev, phandle_t sensroot) Link Here
1245
1245
1246
		if (sens->type == SMU_TEMP_SENSOR) {
1246
		if (sens->type == SMU_TEMP_SENSOR) {
1247
			/* Make up some numbers */
1247
			/* Make up some numbers */
1248
			sens->therm.target_temp = 500 + 2732; /* 50 C */
1248
			sens->therm.target_temp = 400 + 2732; /* 40 C */
1249
			sens->therm.max_temp = 900 + 2732; /* 90 C */
1249
           sens->therm.high_temp = 750 + 2732; /* 75 C */
1250
           sens->therm.max_temp = 950 + 2732; /* 95 C */
1250
1251
1251
			sens->therm.read =
1252
			sens->therm.read =
1252
			    (int (*)(struct pmac_therm *))smu_sensor_read;
1253
			    (int (*)(struct pmac_therm *))smu_sensor_read;
(-)b/sys/powerpc/powermac/smusat.c (-2 / +3 lines)
Lines 184-191 smusat_attach(device_t dev) Link Here
184
184
185
		if (sens->type == SMU_TEMP_SENSOR) {
185
		if (sens->type == SMU_TEMP_SENSOR) {
186
			/* Make up some numbers */
186
			/* Make up some numbers */
187
			sens->therm.target_temp = 500 + 2732; /* 50 C */
187
			sens->therm.target_temp = 400 + 2732; /* 40 C */
188
			sens->therm.max_temp = 900 + 2732; /* 90 C */
188
			sens->therm.high_temp = 750 + 2732; /* 75 C */
189
			sens->therm.max_temp = 950 + 2732; /* 95 C */
189
			sens->therm.read =
190
			sens->therm.read =
190
			    (int (*)(struct pmac_therm *))smusat_sensor_read;
191
			    (int (*)(struct pmac_therm *))smusat_sensor_read;
191
			pmac_thermal_sensor_register(&sens->therm);
192
			pmac_thermal_sensor_register(&sens->therm);

Return to bug 209202