summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-10-18 19:09:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-10-18 19:09:15 +0000
commit8c71a0e3270a16731886ce7f59dffbf1ef751187 (patch)
treedfddc31c53c452a502afa4429f294a67015592d2 /sys/arch/i386/pci
parentd26b37ad58d552ed3053b9653726cd0b3d0cb699 (diff)
do not enable watchdog functionality if small kernel
Diffstat (limited to 'sys/arch/i386/pci')
-rw-r--r--sys/arch/i386/pci/geodesc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/i386/pci/geodesc.c b/sys/arch/i386/pci/geodesc.c
index bede835d89b..ee839b67b76 100644
--- a/sys/arch/i386/pci/geodesc.c
+++ b/sys/arch/i386/pci/geodesc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: geodesc.c,v 1.7 2006/10/17 21:28:23 tom Exp $ */
+/* $OpenBSD: geodesc.c,v 1.8 2006/10/18 19:09:14 deraadt Exp $ */
/*
* Copyright (c) 2003 Markus Friedl <markus@openbsd.org>
@@ -44,9 +44,12 @@ struct geodesc_softc {
int geodesc_match(struct device *, void *, void *);
void geodesc_attach(struct device *, struct device *, void *);
-int geodesc_wdogctl_cb(void *, int);
void sc1100_sysreset(void);
+#ifndef SMALL_KERNEL
+int geodesc_wdogctl_cb(void *, int);
+#endif /* SMALL_KERNEL */
+
struct cfattach geodesc_ca = {
sizeof(struct geodesc_softc), geodesc_match, geodesc_attach
};
@@ -111,6 +114,7 @@ geodesc_attach(struct device *parent, struct device *self, void *aux)
printf(": iid %d revision %d wdstatus %b\n", iid, rev, sts, WDSTSBITS);
+#ifndef SMALL_KERNEL
/* setup and register watchdog */
bus_space_write_2(sc->sc_iot, sc->sc_ioh, GCB_WDTO, 0);
sts |= WDOVF_CLEAR;
@@ -120,6 +124,8 @@ geodesc_attach(struct device *parent, struct device *self, void *aux)
bus_space_write_2(sc->sc_iot, sc->sc_ioh, GCB_WDCNFG, cnfg);
wdog_register(sc, geodesc_wdogctl_cb);
+#endif /* SMALL_KERNEL */
+
#ifdef __HAVE_TIMECOUNTER
bus_space_write_4(sc->sc_iot, sc->sc_ioh, GCB_TSCNFG, TSC_ENABLE);
/* Hook into the kern_tc */
@@ -131,6 +137,7 @@ geodesc_attach(struct device *parent, struct device *self, void *aux)
cpuresetfn = sc1100_sysreset;
}
+#ifndef SMALL_KERNEL
int
geodesc_wdogctl_cb(void *self, int period)
{
@@ -141,6 +148,7 @@ geodesc_wdogctl_cb(void *self, int period)
bus_space_write_2(sc->sc_iot, sc->sc_ioh, GCB_WDTO, period * 64);
return (period);
}
+#endif /* SMALL_KERNEL */
#ifdef __HAVE_TIMECOUNTER
u_int