mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-04 11:23:46 +00:00
Enable monitoring for ADM9240.
Submitted by: Alex Vasylenko <lxv@omut.org> Approved by: maintainer timeout (> 3 months) PR: 57930
This commit is contained in:
parent
807da3226a
commit
d85956f748
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=96048
@ -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)
|
||||
|
49
sysutils/mbmon/files/patch-sens_winbond.c
Normal file
49
sysutils/mbmon/files/patch-sens_winbond.c
Normal file
@ -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]));
|
||||
}
|
@ -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)
|
||||
|
49
sysutils/xmbmon/files/patch-sens_winbond.c
Normal file
49
sysutils/xmbmon/files/patch-sens_winbond.c
Normal file
@ -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]));
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user