summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2014-12-10 12:27:58 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2014-12-10 12:27:58 +0000
commit9ce9e30960b2e6222a244e6166aea039ac6e9239 (patch)
tree212abc4dfaf05d91acce75be7ded7a8eac5e95e7 /sys/arch/sgi
parent77392a36ec6c525667e826c787c431b014f99298 (diff)
Convert watchdog(4) devices to use autoconf(9) framework.
ok deraadt, tests on glxpcib and ok mpi
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/localbus/imc.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/sys/arch/sgi/localbus/imc.c b/sys/arch/sgi/localbus/imc.c
index 13820743776..367b9277e87 100644
--- a/sys/arch/sgi/localbus/imc.c
+++ b/sys/arch/sgi/localbus/imc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imc.c,v 1.18 2014/10/08 05:22:48 deraadt Exp $ */
+/* $OpenBSD: imc.c,v 1.19 2014/12/10 12:27:56 mikeb Exp $ */
/* $NetBSD: imc.c,v 1.32 2011/07/01 18:53:46 dyoung Exp $ */
/*
@@ -75,10 +75,11 @@
int imc_match(struct device *, void *, void *);
void imc_attach(struct device *, struct device *, void *);
+int imc_activate(struct device *, int);
int imc_print(void *, const char *);
const struct cfattach imc_ca = {
- sizeof(struct device), imc_match, imc_attach
+ sizeof(struct device), imc_match, imc_attach, NULL, imc_activate
};
struct cfdriver imc_cd = {
@@ -699,6 +700,23 @@ imc_attach(struct device *parent, struct device *self, void *aux)
}
int
+imc_activate(struct device *self, int act)
+{
+ int rv = 0;
+
+ switch (act) {
+ case DVACT_POWERDOWN:
+#ifndef SMALL_KERNEL
+ wdog_shutdown(self);
+#endif
+ rv = config_activate_children(self, act);
+ break;
+ }
+
+ return (rv);
+}
+
+int
imc_print(void *aux, const char *name)
{
struct imc_attach_args *iaa = aux;