summaryrefslogtreecommitdiff
path: root/sys/arch/beagle
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-09-07 16:21:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-09-07 16:21:48 +0000
commit0909b33ee356b8b24e8cfd8ef9abfcce75eac449 (patch)
tree60b4dbc9eaed4dfda443b0bf3fa9ec06a75b03ad /sys/arch/beagle
parent06c96fb315950bff13bd7a73d355ebdc21e85191 (diff)
remove the powerhook code. All architectures now use the ca_activate tree
traversal code to suspend/resume ok oga kettenis blambert
Diffstat (limited to 'sys/arch/beagle')
-rw-r--r--sys/arch/beagle/dev/omap_com.c6
-rw-r--r--sys/arch/beagle/dev/omdisplay.c14
-rw-r--r--sys/arch/beagle/dev/omehci.c27
-rw-r--r--sys/arch/beagle/dev/omohci.c19
4 files changed, 6 insertions, 60 deletions
diff --git a/sys/arch/beagle/dev/omap_com.c b/sys/arch/beagle/dev/omap_com.c
index c189293f524..5a83d057ed8 100644
--- a/sys/arch/beagle/dev/omap_com.c
+++ b/sys/arch/beagle/dev/omap_com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omap_com.c,v 1.3 2010/08/30 21:32:20 deraadt Exp $ */
+/* $OpenBSD: omap_com.c,v 1.4 2010/09/07 16:21:37 deraadt Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
* All rights reserved.
@@ -116,10 +116,6 @@ omapuart_attach(struct device *parent, struct device *self, void *aux)
(void)intc_intr_establish(aa->aa_intr, IPL_TTY, comintr,
sc, sc->sc_dev.dv_xname);
-
-#if 0
- (void)powerhook_establish(&omapuart_powerhook, sc);
-#endif
}
int
diff --git a/sys/arch/beagle/dev/omdisplay.c b/sys/arch/beagle/dev/omdisplay.c
index 85cdfdcca56..bf321881a60 100644
--- a/sys/arch/beagle/dev/omdisplay.c
+++ b/sys/arch/beagle/dev/omdisplay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omdisplay.c,v 1.4 2010/08/30 21:32:20 deraadt Exp $ */
+/* $OpenBSD: omdisplay.c,v 1.5 2010/09/07 16:21:37 deraadt Exp $ */
/*
* Copyright (c) 2007 Dale Rahn <drahn@openbsd.org>
*
@@ -416,8 +416,6 @@ struct omdisplay_softc {
int sc_nscreens;
LIST_HEAD(,omdisplay_screen) sc_screens;
- void *sc_ph; /* powerhook */
-
struct omdisplay_panel_data *sc_geometry;
struct omdisplay_screen *sc_active;
};
@@ -441,7 +439,6 @@ void omdisplay_set_backlight(int on);
void omdisplay_blank(int blank);
void omdisplay_suspend(struct omdisplay_softc *sc);
void omdisplay_resume(struct omdisplay_softc *sc);
-void omdisplay_powerhook(int why, void *v);
void omdisplay_initialize(struct omdisplay_softc *sc,
struct omdisplay_panel_data *geom);
void omdisplay_setup_rasops(struct omdisplay_softc *sc,
@@ -573,9 +570,6 @@ omdisplay_attach(struct device *parent, struct device *self, void *args)
(void)config_found(self, &wsaa, wsemuldisplaydevprint);
/* backlight? */
-
- /* powerhook? */
- sc->sc_ph = powerhook_establish(omdisplay_powerhook, sc);
}
@@ -884,12 +878,6 @@ omdisplay_activate(struct device *self, int act)
}
void
-omdisplay_powerhook(int why, void *v)
-{
- return omdisplay_activate(v, why);
-}
-
-void
omdisplay_initialize(struct omdisplay_softc *sc,
struct omdisplay_panel_data *geom)
{
diff --git a/sys/arch/beagle/dev/omehci.c b/sys/arch/beagle/dev/omehci.c
index a4c2cd58bd0..98f81147f76 100644
--- a/sys/arch/beagle/dev/omehci.c
+++ b/sys/arch/beagle/dev/omehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omehci.c,v 1.3 2010/08/30 21:32:20 deraadt Exp $ */
+/* $OpenBSD: omehci.c,v 1.4 2010/09/07 16:21:37 deraadt Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -41,7 +41,6 @@ int omehci_match(struct device *, void *, void *);
void omehci_attach(struct device *, struct device *, void *);
int omehci_detach(struct device *, int);
int omehci_activate(struct device *, int);
-void omehci_powerhook(int, void *);
struct omehci_softc {
ehci_softc_t sc;
@@ -137,11 +136,6 @@ omehci_attach(struct device *parent, struct device *self, void *aux)
return;
}
-#if 0
- sc->sc.sc_powerhook = powerhook_establish(omehci_powerhook, sc);
- if (sc->sc.sc_powerhook == NULL)
- printf("%s: cannot establish powerhook\n", devname);
-#endif
sc->sc.sc_shutdownhook = shutdownhook_establish(ehci_shutdown, &sc->sc);
sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus,
@@ -158,13 +152,6 @@ omehci_detach(struct device *self, int flags)
if (rv)
return (rv);
-#if 0
- if (sc->sc.sc_powerhook != NULL) {
- powerhook_disestablish(sc->sc.sc_powerhook);
- sc->sc.sc_powerhook = NULL;
- }
-#endif
-
if (sc->sc_ih != NULL) {
intc_intr_disestablish(sc->sc_ih);
sc->sc_ih = NULL;
@@ -192,7 +179,7 @@ omehci_activate(struct device *self, int act)
case DVACT_SUSPEND:
sc->sc.sc_bus.use_polling++;
#if 0
- ohci_powerhook(act, &sc->sc);
+ ohci_activate(&sc->sc, act);
prcm_disableclock(PRCM_CLK_EN_USB);
#endif
sc->sc.sc_bus.use_polling--;
@@ -202,7 +189,7 @@ omehci_activate(struct device *self, int act)
prcm_enableclock(PRCM_CLK_EN_USB);
#if 0
omehci_enable(sc);
- ohci_powerhook(act, &sc->sc);
+ ohci_activate(&sc->sc, act);
#endif
sc->sc.sc_bus.use_polling--;
break;
@@ -212,14 +199,6 @@ omehci_activate(struct device *self, int act)
#if 0
void
-omehci_powerhook(int why, void *arg)
-{
- omehci_activate(arg, why);
-}
-#endif
-
-#if 0
-void
omehci_enable(struct omehci_softc *sc)
{
u_int32_t hr;
diff --git a/sys/arch/beagle/dev/omohci.c b/sys/arch/beagle/dev/omohci.c
index 843f74778e7..94f0ce998e4 100644
--- a/sys/arch/beagle/dev/omohci.c
+++ b/sys/arch/beagle/dev/omohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: omohci.c,v 1.3 2010/08/30 21:32:20 deraadt Exp $ */
+/* $OpenBSD: omohci.c,v 1.4 2010/09/07 16:21:37 deraadt Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -96,7 +96,6 @@ int omohci_match(struct device *, void *, void *);
void omohci_attach(struct device *, struct device *, void *);
int omohci_detach(struct device *, int);
int omohci_activate(struct device *, int);
-void omohci_powerhook(int, void *);
struct omohci_softc {
ohci_softc_t sc;
@@ -225,11 +224,6 @@ omohci_attach(struct device *parent, struct device *self, void *aux)
return;
}
- sc->sc.sc_powerhook = powerhook_establish(omohci_powerhook, sc);
- if (sc->sc.sc_powerhook == NULL)
- printf("%s: cannot establish powerhook\n",
- sc->sc.sc_bus.bdev.dv_xname);
-
sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus,
usbctlprint);
}
@@ -244,11 +238,6 @@ omohci_detach(struct device *self, int flags)
if (rv)
return (rv);
- if (sc->sc.sc_powerhook != NULL) {
- powerhook_disestablish(sc->sc.sc_powerhook);
- sc->sc.sc_powerhook = NULL;
- }
-
if (sc->sc_ih0 != NULL) {
intc_intr_disestablish(sc->sc_ih0);
intc_intr_disestablish(sc->sc_ih1);
@@ -308,12 +297,6 @@ omohci_activate(struct device *self, int act)
return 0;
}
-int
-omohci_powerhook(int why, void *arg)
-{
- omohci_activate(arg, why);
-}
-
void
omohci_enable(struct omohci_softc *sc)
{