From: mlarkin Date: Tue, 13 Jul 2010 07:33:10 +0000 (+0000) Subject: Fix a broken mask for core temperature 1 and 2, and bias properly for degC. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6fb7479520e6cc52cbd07f5ae2dbf9114e4f8d76;p=openbsd Fix a broken mask for core temperature 1 and 2, and bias properly for degC. Tested on Thinkpad T510. --- diff --git a/sys/dev/pci/itherm.c b/sys/dev/pci/itherm.c index 839668e3431..7b4797b12f9 100644 --- a/sys/dev/pci/itherm.c +++ b/sys/dev/pci/itherm.c @@ -60,8 +60,8 @@ #define ITHERM_TSE_ENABLE 0xB8 #define ITHERM_CTV_INVALID 0x8000 -#define ITHERM_CTV_INT_MASK 0x1FE0 -#define ITHERM_CTV_FRAC_MASK 0x001F +#define ITHERM_CTV_INT_MASK 0x3FC0 +#define ITHERM_CTV_FRAC_MASK 0x003F #define ITHERM_REFRESH_INTERVAL 5 @@ -271,6 +271,8 @@ itherm_refresh_sensor_data(struct itherm_softc *sc) data *= 1000000 / 64; sc->sensors[ITHERM_SENSOR_CORETEMP1].value += data; + itherm_bias_temperature_sensor( + &sc->sensors[ITHERM_SENSOR_CORETEMP1]); } /* Core 2 temperature */ @@ -289,6 +291,8 @@ itherm_refresh_sensor_data(struct itherm_softc *sc) data *= 1000000 / 64; sc->sensors[ITHERM_SENSOR_CORETEMP2].value += data; + itherm_bias_temperature_sensor( + &sc->sensors[ITHERM_SENSOR_CORETEMP2]); } /*