Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/isa modularize and recognize ASUS F8000 Super I/O chips
details: https://anonhg.NetBSD.org/src/rev/5f71c8cdf7d9
branches: trunk
changeset: 767820:5f71c8cdf7d9
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Jul 31 17:53:26 2011 +0000
description:
modularize and recognize ASUS F8000 Super I/O chips
diffstat:
sys/dev/isa/finsio_isa.c | 41 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 38 insertions(+), 3 deletions(-)
diffs (85 lines):
diff -r 07aeb9949dbb -r 5f71c8cdf7d9 sys/dev/isa/finsio_isa.c
--- a/sys/dev/isa/finsio_isa.c Sun Jul 31 16:32:02 2011 +0000
+++ b/sys/dev/isa/finsio_isa.c Sun Jul 31 17:53:26 2011 +0000
@@ -1,5 +1,5 @@
/* $OpenBSD: fins.c,v 1.1 2008/03/19 19:33:09 deraadt Exp $ */
-/* $NetBSD: finsio_isa.c,v 1.5 2011/06/20 18:12:54 pgoyette Exp $ */
+/* $NetBSD: finsio_isa.c,v 1.6 2011/07/31 17:53:26 jmcneill Exp $ */
/*
* Copyright (c) 2008 Juan Romero Pardines
@@ -19,11 +19,12 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: finsio_isa.c,v 1.5 2011/06/20 18:12:54 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: finsio_isa.c,v 1.6 2011/07/31 17:53:26 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
+#include <sys/module.h>
#include <sys/bus.h>
#include <dev/isa/isareg.h>
@@ -73,6 +74,7 @@
# define FINSIO_IDF71806 0x0341 /* F71872 and F1806 F/FG */
# define FINSIO_IDF71883 0x0541 /* F71882 and F1883 */
# define FINSIO_IDF71862 0x0601 /* F71862FG */
+# define FINSIO_IDF8000 0x0581 /* F8000 */
/* in bank sensors of config space */
#define FINSIO_SENSADDR 0x60 /* sensors assigned I/O address (2 bytes) */
@@ -418,7 +420,7 @@
{ .fs_desc = NULL }
};
-
+
static int
finsio_isa_match(device_t parent, cfdata_t match, void *aux)
{
@@ -510,6 +512,10 @@
sc->sc_finsio_sensors = f71883_sensors;
aprint_normal(": Fintek F71882/F71883 Super I/O\n");
break;
+ case FINSIO_IDF8000:
+ sc->sc_finsio_sensors = f71883_sensors;
+ aprint_normal(": ASUS F8000 Super I/O\n");
+ break;
default:
/*
* Unknown Chip ID, assume the same register layout
@@ -682,3 +688,32 @@
edata->state = ENVSYS_SVALID;
}
}
+
+MODULE(MODULE_CLASS_DRIVER, finsio, NULL);
+
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
+
+static int
+finsio_modcmd(modcmd_t cmd, void *opaque)
+{
+ int error = 0;
+
+ switch (cmd) {
+ case MODULE_CMD_INIT:
+#ifdef _MODULE
+ error = config_init_component(cfdriver_ioconf_finsio,
+ cfattach_ioconf_finsio, cfdata_ioconf_finsio);
+#endif
+ return error;
+ case MODULE_CMD_FINI:
+#ifdef _MODULE
+ error = config_fini_component(cfdriver_ioconf_finsio,
+ cfattach_ioconf_finsio, cfdata_ioconf_finsio);
+#endif
+ return error;
+ default:
+ return ENOTTY;
+ }
+}
Home |
Main Index |
Thread Index |
Old Index