summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
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/sparc64/dev
parent77392a36ec6c525667e826c787c431b014f99298 (diff)
Convert watchdog(4) devices to use autoconf(9) framework.
ok deraadt, tests on glxpcib and ok mpi
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/lom.c3
-rw-r--r--sys/arch/sparc64/dev/pmc.c17
2 files changed, 17 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/lom.c b/sys/arch/sparc64/dev/lom.c
index 883b90df077..e55a501b9a6 100644
--- a/sys/arch/sparc64/dev/lom.c
+++ b/sys/arch/sparc64/dev/lom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lom.c,v 1.24 2013/05/30 16:15:01 deraadt Exp $ */
+/* $OpenBSD: lom.c,v 1.25 2014/12/10 12:27:57 mikeb Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -368,6 +368,7 @@ lom_activate(struct device *self, int act)
switch (act) {
case DVACT_POWERDOWN:
+ wdog_shutdown(self);
lom_shutdown(self);
break;
}
diff --git a/sys/arch/sparc64/dev/pmc.c b/sys/arch/sparc64/dev/pmc.c
index 77bd9f0ed68..5f0c19496e9 100644
--- a/sys/arch/sparc64/dev/pmc.c
+++ b/sys/arch/sparc64/dev/pmc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmc.c,v 1.3 2012/10/17 22:32:01 deraadt Exp $ */
+/* $OpenBSD: pmc.c,v 1.4 2014/12/10 12:27:57 mikeb Exp $ */
/*
* Copyright (c) 2007 Mark Kettenis
@@ -50,10 +50,11 @@ struct pmc_softc {
int pmc_match(struct device *, void *, void *);
void pmc_attach(struct device *, struct device *, void *);
+int pmc_activate(struct device *, int);
int pmc_wdog_cb(void *, int);
struct cfattach pmc_ca = {
- sizeof(struct pmc_softc), pmc_match, pmc_attach
+ sizeof(struct pmc_softc), pmc_match, pmc_attach, NULL, pmc_activate
};
struct cfdriver pmc_cd = {
@@ -103,6 +104,18 @@ pmc_attach(struct device *parent, struct device *self, void *aux)
}
int
+pmc_activate(struct device *self, int act)
+{
+ switch (act) {
+ case DVACT_POWERDOWN:
+ wdog_shutdown(self);
+ break;
+ }
+
+ return (0);
+}
+
+int
pmc_wdog_cb(void *arg, int period)
{
struct pmc_softc *sc = arg;