aboutsummaryrefslogtreecommitdiff
path: root/sysutils/xmbmon
diff options
context:
space:
mode:
authorSergey A. Osokin <osa@FreeBSD.org>2003-12-17 13:06:40 +0000
committerSergey A. Osokin <osa@FreeBSD.org>2003-12-17 13:06:40 +0000
commitd85956f748950efaf306bf2e551b5d97be71329e (patch)
tree221eb3eedfbe46835a5abd2ec820bb637fdfb371 /sysutils/xmbmon
parent807da3226aa9bb635d290b18b530755651727d87 (diff)
downloadports-d85956f748950efaf306bf2e551b5d97be71329e.tar.gz
ports-d85956f748950efaf306bf2e551b5d97be71329e.zip
Enable monitoring for ADM9240.
Submitted by: Alex Vasylenko <lxv@omut.org> Approved by: maintainer timeout (> 3 months) PR: 57930
Notes
Notes: svn path=/head/; revision=96048
Diffstat (limited to 'sysutils/xmbmon')
-rw-r--r--sysutils/xmbmon/Makefile3
-rw-r--r--sysutils/xmbmon/files/patch-sens_winbond.c49
2 files changed, 51 insertions, 1 deletions
diff --git a/sysutils/xmbmon/Makefile b/sysutils/xmbmon/Makefile
index 27456310bfcd..d2c6d96f2cb2 100644
--- a/sysutils/xmbmon/Makefile
+++ b/sysutils/xmbmon/Makefile
@@ -7,6 +7,7 @@
PORTNAME= xmbmon
PORTVERSION= 203
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/
.if defined(WITHOUT_X11)
@@ -15,7 +16,7 @@ PKGNAMESUFFIX= -nox11
DISTNAME= ${PORTNAME}${PORTVERSION}
MAINTAINER= kaz@kobe1995.net
-COMMENT= X/tty motherboard monitor for LM78/79, W8378x, AS99127F and VT82C686
+COMMENT= X/tty motherboard monitor for LM78/79, W8378x, AS99127F, VT82C686 and ADM9240
GNU_CONFIGURE= yes
.if defined(WITHOUT_X11)
diff --git a/sysutils/xmbmon/files/patch-sens_winbond.c b/sysutils/xmbmon/files/patch-sens_winbond.c
new file mode 100644
index 000000000000..ee1f521ae38f
--- /dev/null
+++ b/sysutils/xmbmon/files/patch-sens_winbond.c
@@ -0,0 +1,49 @@
+--- sens_winbond.c.orig Sat Jul 5 07:56:47 2003
++++ sens_winbond.c Sun Oct 12 20:17:01 2003
+@@ -86,6 +86,7 @@
+ #define WINBD_FANDIV 0x47
+ #define WINBD_REGPIN 0x4B
+ #define ASUSM_FANDIV 0xA1
++#define ANADM_TEMPCFG 0x4B
+
+ #define WINBD_DIOSEL 0x59
+ #define WINBD_VMCTRL 0x5D
+@@ -299,6 +300,12 @@
+ goto ret1;
+ }
+
++ if (wbdchipid == ADM9240) {
++ temp1_flag = temp2_flag = 1; /* disable! */
++ method->Write(WINBD_CONFIG, 0x01); /* init. chip */
++ goto ret1;
++ }
++
+ if (method == &method_isa && wbdchipid >= LM78) {
+ temp1_flag = temp2_flag = 1; /* disable! */
+ goto ret1;
+@@ -364,9 +371,15 @@
+ (wbdchipid == W83783S || wbdchipid == W83697HF || wbdchipid == ASM58))
+ return 0xFFFF;
+
+- if (no == 0)
+- return (float) method->Read(WINBD_TEMP0);
+- else if (no == 1) {
++ if (no == 0) {
++ f = (float) method->Read(WINBD_TEMP0);
++ if (wbdchipid == ADM9240) {
++ n = method->Read(ANADM_TEMPCFG);
++ if (n & 0x80)
++ f += 0.5;
++ }
++ return f;
++ } else if (no == 1) {
+ if (wbdchipid == ASB100)
+ return (float) method->Read(ASUSB_TEMP4);
+ if (wbdchipid == ASM58)
+@@ -518,5 +531,5 @@
+ return 0xFFFF;
+ }
+
+- return 1350000 / (r * (1 << div[no]));
++ return 22500 * 60 / (r * (1 << div[no]));
+ }