summaryrefslogtreecommitdiff
path: root/sys/dev/isa/itvar.h
diff options
context:
space:
mode:
authorOleg Safiullin <form@cvs.openbsd.org>2007-12-18 21:17:55 +0000
committerOleg Safiullin <form@cvs.openbsd.org>2007-12-18 21:17:55 +0000
commitae4477b7459bc815ac50a13f5116111583162e76 (patch)
tree05a9f6e6afc9b44e913983eb423178bc60676e00 /sys/dev/isa/itvar.h
parent6419734f0d7db56ba7400f42ff11714b3b3a0b93 (diff)
New it(4) driver.
Supports ITE IT8705/8712/8716/8718/8726 and SiS SiS950 hardware monitors and ITE IT8712F/8716F/8718F/8726F watchdog timer.
Diffstat (limited to 'sys/dev/isa/itvar.h')
-rw-r--r--sys/dev/isa/itvar.h98
1 files changed, 49 insertions, 49 deletions
diff --git a/sys/dev/isa/itvar.h b/sys/dev/isa/itvar.h
index 4bd39aa4783..913729ad41d 100644
--- a/sys/dev/isa/itvar.h
+++ b/sys/dev/isa/itvar.h
@@ -1,7 +1,7 @@
-/* $OpenBSD: itvar.h,v 1.4 2007/03/22 16:55:31 deraadt Exp $ */
+/* $OpenBSD: itvar.h,v 1.5 2007/12/18 21:17:54 form Exp $ */
/*
- * Copyright (c) 2003 Julien Bordet <zejames@greyhats.org>
+ * Copyright (c) 2007 Oleg Safiullin <form@pdp-11.org.ru>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -25,68 +25,68 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef _DEV_ISA_ITVAR_H
-#define _DEV_ISA_ITVAR_H
+#ifndef _DEV_ISA_ITVAR_H_
+#define _DEV_ISA_ITVAR_H_
-#define IT_NUM_SENSORS 15
+#define IT_EC_INTERVAL 5
+#define IT_EC_NUMSENSORS 15
+#define IT_EC_VREF 4096
-/* chip ids */
-#define IT_ID_IT87 0x90
+#define IO_IT1 0x2e
+#define IO_IT2 0x4e
-/* ctl registers */
+#define IT_IO_ADDR 0x00
+#define IT_IO_DATA 0x01
-#define ITC_ADDR 0x05
-#define ITC_DATA 0x06
+#define IT_ID_8705 0x8705
+#define IT_ID_8712 0x8712
+#define IT_ID_8716 0x8716
+#define IT_ID_8718 0x8718
+#define IT_ID_8726 0x8726
-/* data registers */
+#define IT_CCR 0x02
+#define IT_LDN 0x07
+#define IT_CHIPID1 0x20
+#define IT_CHIPID2 0x21
+#define IT_CHIPREV 0x22
-#define ITD_CONFIG 0x00
-#define ITD_ISR1 0x01
-#define ITD_ISR2 0x02
-#define ITD_ISR3 0x03
-#define ITD_SMI1 0x04
-#define ITD_SMI2 0x05
-#define ITD_SMI3 0x06
-#define ITD_IMR1 0x07
-#define ITD_IMR2 0x08
-#define ITD_IMR3 0x09
-#define ITD_VID 0x0a
-#define ITD_FAN 0x0b
+#define IT_EC_LDN 0x04
+#define IT_EC_MSB 0x60
+#define IT_EC_LSB 0x61
-#define ITD_FANMINBASE 0x10
-#define ITD_FANENABLE 0x13
+#define IT_EC_ADDR 0x05
+#define IT_EC_DATA 0x06
-#define ITD_SENSORFANBASE 0x0d /* Fan from 0x0d to 0x0f */
-#define ITD_SENSORVOLTBASE 0x20 /* Fan from 0x20 to 0x28 */
-#define ITD_SENSORTEMPBASE 0x29 /* Fan from 0x29 to 0x2b */
+#define IT_EC_CFG 0x00
+#define IT_EC_FAN_DIV 0x0b
+#define IT_EC_FAN_ECR 0x0c
+#define IT_EC_FANBASE 0x0d
+#define IT_EC_FANEXTBASE 0x18
+#define IT_EC_VOLTBASE 0x20
+#define IT_EC_TEMPBASE 0x29
-#define ITD_VOLTMAXBASE 0x30
-#define ITD_VOLTMINBASE 0x31
+#define IT_WDT_LDN 0x07
-#define ITD_TEMPMAXBASE 0x40
-#define ITD_TEMPMINBASE 0x41
+#define IT_WDT_CSR 0x71
+#define IT_WDT_TCR 0x72
+#define IT_WDT_LSB 0x73
+#define IT_WDT_MSB 0x74
-#define ITD_SBUSADDR 0x48
-#define ITD_VOLTENABLE 0x50
-#define ITD_TEMPENABLE 0x51
-
-#define ITD_CHIPID 0x58
-
-#define IT_VREF (4096) /* Vref = 4.096 V */
struct it_softc {
- struct device sc_dev;
+ struct device sc_dev;
- bus_space_tag_t it_iot;
- bus_space_handle_t it_ioh;
+ bus_space_tag_t sc_iot;
+ bus_space_handle_t sc_ioh;
+ int sc_iobase;
+ u_int16_t sc_chipid;
+ u_int8_t sc_chiprev;
- struct ksensor sensors[IT_NUM_SENSORS];
- struct ksensordev sensordev;
- u_int numsensors;
- void (*refresh_sensor_data)(struct it_softc *);
+ bus_space_tag_t sc_ec_iot;
+ bus_space_handle_t sc_ec_ioh;
- u_int8_t (*it_readreg)(struct it_softc *, int);
- void (*it_writereg)(struct it_softc *, int, int);
+ struct ksensor sc_sensors[IT_EC_NUMSENSORS];
+ struct ksensordev sc_sensordev;
};
-#endif
+#endif /* _DEV_ISA_ITVAR_H_ */