summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-09-20 02:45:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-09-20 02:45:47 +0000
commitd3375625f7d9c2ed7cca76063f07949369e51d00 (patch)
tree1fbb6f8fd0e3c7610f1b53bbd9e1558cc539449b /sys/arch/i386
parenteb15b6be29e6e09d209226b59034313b4c8180d6 (diff)
Need an activate function to get to sub-devices. Write it by hand since
we expect some specific register restoration will be needed here later too. ok pirofti
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/pci/glxpcib.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/sys/arch/i386/pci/glxpcib.c b/sys/arch/i386/pci/glxpcib.c
index 157ee0d7aea..333c54b0acb 100644
--- a/sys/arch/i386/pci/glxpcib.c
+++ b/sys/arch/i386/pci/glxpcib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: glxpcib.c,v 1.9 2010/04/20 22:05:41 tedu Exp $ */
+/* $OpenBSD: glxpcib.c,v 1.10 2010/09/20 02:45:46 deraadt Exp $ */
/*
* Copyright (c) 2007 Marc Balmer <mbalmer@openbsd.org>
@@ -141,9 +141,11 @@ struct cfdriver glxpcib_cd = {
int glxpcib_match(struct device *, void *, void *);
void glxpcib_attach(struct device *, struct device *, void *);
+int glxpcib_activate(struct device *, int);
struct cfattach glxpcib_ca = {
- sizeof(struct glxpcib_softc), glxpcib_match, glxpcib_attach
+ sizeof(struct glxpcib_softc), glxpcib_match, glxpcib_attach,
+ NULL, glxpcib_activate
};
/* from arch/<*>/pci/pcib.c */
@@ -253,6 +255,25 @@ glxpcib_attach(struct device *parent, struct device *self, void *aux)
#endif
}
+int
+glxpcib_activate(struct device *self, int act)
+{
+ int rv = 0;
+
+ switch (act) {
+ case DVACT_QUIESCE:
+ rv = config_activate_children(self, act);
+ break;
+ case DVACT_SUSPEND:
+ rv = config_activate_children(self, act);
+ break;
+ case DVACT_RESUME:
+ rv = config_activate_children(self, act);
+ break;
+ }
+ return (rv);
+}
+
u_int
glxpcib_get_timecount(struct timecounter *tc)
{