summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2005-04-29 17:13:55 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2005-04-29 17:13:55 +0000
commit3bc24c40954bdddcf449fe4af8372d9afe58ca61 (patch)
tree0ae353cb6dca0b18bf031e95771a07126211a9cd /sys
parente1e8d996cb5f5c869ca72073ec2e686efe803b64 (diff)
Correct FAN3 divisor for IT8705 and add support for FAN3 divisor on IT8712.
Diff from Stephan Leemburg <sleemburg@jvc.nl>.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/isa/it.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/isa/it.c b/sys/dev/isa/it.c
index 92ff100bc41..6be0db7dfad 100644
--- a/sys/dev/isa/it.c
+++ b/sys/dev/isa/it.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: it.c,v 1.13 2005/04/09 14:42:33 grange Exp $ */
+/* $OpenBSD: it.c,v 1.14 2005/04/29 17:13:54 grange Exp $ */
/*
* Copyright (c) 2003 Julien Bordet <zejames@greyhats.org>
@@ -285,17 +285,18 @@ it_generic_fanrpm(struct it_softc *sc, struct sensor *sensors)
{
int i, sdata, divisor;
+ divisor = it_readreg(sc, ITD_FAN);
for (i = 0; i < 3; i++) {
sdata = it_readreg(sc, ITD_SENSORFANBASE + i);
switch (i) {
case 2:
- divisor = 2;
+ divisor = (divisor & 0x40) ? 3 : 1;
break;
case 1:
- divisor = (it_readreg(sc, ITD_FAN) >> 3) & 0x7;
+ divisor = (divisor >> 3) & 0x7;
break;
- default:
- divisor = it_readreg(sc, ITD_FAN) & 0x7;
+ case 0:
+ divisor = divisor & 0x7;
break;
}