diff options
author | osa <osa@FreeBSD.org> | 2003-12-17 21:06:40 +0800 |
---|---|---|
committer | osa <osa@FreeBSD.org> | 2003-12-17 21:06:40 +0800 |
commit | b0427bc32a8337a772b92669c1e77a382d5fecc1 (patch) | |
tree | b32dadfa71dac577a3fef0c767fc2ac9d3d160b1 /sysutils/mbmon | |
parent | fbcc2f4d4b6ca6d2f648060e57ff5b0c2f1e83f1 (diff) | |
download | freebsd-ports-gnome-b0427bc32a8337a772b92669c1e77a382d5fecc1.tar.gz freebsd-ports-gnome-b0427bc32a8337a772b92669c1e77a382d5fecc1.tar.zst freebsd-ports-gnome-b0427bc32a8337a772b92669c1e77a382d5fecc1.zip |
Enable monitoring for ADM9240.
Submitted by: Alex Vasylenko <lxv@omut.org>
Approved by: maintainer timeout (> 3 months)
PR: 57930
Diffstat (limited to 'sysutils/mbmon')
-rw-r--r-- | sysutils/mbmon/Makefile | 3 | ||||
-rw-r--r-- | sysutils/mbmon/files/patch-sens_winbond.c | 49 |
2 files changed, 51 insertions, 1 deletions
diff --git a/sysutils/mbmon/Makefile b/sysutils/mbmon/Makefile index 27456310bfcd..d2c6d96f2cb2 100644 --- a/sysutils/mbmon/Makefile +++ b/sysutils/mbmon/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/mbmon/files/patch-sens_winbond.c b/sysutils/mbmon/files/patch-sens_winbond.c new file mode 100644 index 000000000000..ee1f521ae38f --- /dev/null +++ b/sysutils/mbmon/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])); + } |