diff options
Diffstat (limited to 'sys/dev/pci/ichwdt.c')
-rw-r--r-- | sys/dev/pci/ichwdt.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/pci/ichwdt.c b/sys/dev/pci/ichwdt.c index 2d690932bdc..ef03dc979ba 100644 --- a/sys/dev/pci/ichwdt.c +++ b/sys/dev/pci/ichwdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ichwdt.c,v 1.4 2012/10/17 22:32:01 deraadt Exp $ */ +/* $OpenBSD: ichwdt.c,v 1.5 2014/12/10 12:27:57 mikeb Exp $ */ /* * Copyright (c) 2004, 2005 Alexander Yurchenko <grange@openbsd.org> @@ -53,13 +53,16 @@ struct ichwdt_softc { int ichwdt_match(struct device *, void *, void *); void ichwdt_attach(struct device *, struct device *, void *); +int ichwdt_activate(struct device *, int); int ichwdt_cb(void *, int); struct cfattach ichwdt_ca = { sizeof(struct ichwdt_softc), ichwdt_match, - ichwdt_attach + ichwdt_attach, + NULL, + ichwdt_activate }; struct cfdriver ichwdt_cd = { @@ -140,6 +143,18 @@ ichwdt_attach(struct device *parent, struct device *self, void *aux) } int +ichwdt_activate(struct device *self, int act) +{ + switch (act) { + case DVACT_POWERDOWN: + wdog_shutdown(self); + break; + } + + return (0); +} + +int ichwdt_cb(void *arg, int period) { struct ichwdt_softc *sc = arg; |