summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2010-08-27 16:26:35 +0000
committerderaadt <deraadt@openbsd.org>2010-08-27 16:26:35 +0000
commitbb611424d28968169c7d9fe3f441f5b50adc38fb (patch)
tree19a5ef722ad74cc60de371c9ae7e223eb8b6ea5a
parentStop calling xxx_power() from xxx_resume(); instead do it the other way around. (diff)
downloadwireguard-openbsd-bb611424d28968169c7d9fe3f441f5b50adc38fb.tar.xz
wireguard-openbsd-bb611424d28968169c7d9fe3f441f5b50adc38fb.zip
Delete #if'd out powerhook code which is just unfinished scaffolding
-rw-r--r--sys/dev/pci/auixp.c73
-rw-r--r--sys/dev/pci/auixpvar.h6
2 files changed, 2 insertions, 77 deletions
diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c
index 151c37ece71..95950c25b9a 100644
--- a/sys/dev/pci/auixp.c
+++ b/sys/dev/pci/auixp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auixp.c,v 1.26 2010/08/27 05:04:12 deraadt Exp $ */
+/* $OpenBSD: auixp.c,v 1.27 2010/08/27 16:26:35 deraadt Exp $ */
/* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
/*
@@ -136,15 +136,6 @@ int auixp_freemem(struct auixp_softc *, struct auixp_dma *);
paddr_t auixp_mappage(void *, void *, off_t, int);
void auixp_get_default_params(void *, int, struct audio_params *);
-
-/* power management (do we support that already?) */
-#if 0
-void auixp_powerhook(int, void *);
-int auixp_suspend(struct auixp_softc *);
-int auixp_resume(struct auixp_softc *);
-#endif
-
-
/* Supporting subroutines */
int auixp_init(struct auixp_softc *);
void auixp_autodetect_codecs(struct auixp_softc *);
@@ -1251,7 +1242,6 @@ auixp_attach(struct device *parent, struct device *self, void *aux)
pci_chipset_tag_t pc;
pci_intr_handle_t ih;
const char *intrstr;
- int len;
sc = (struct auixp_softc *)self;
pa = (struct pci_attach_args *)aux;
@@ -1317,27 +1307,6 @@ auixp_attach(struct device *parent, struct device *self, void *aux)
return;
}
- /* XXX set up power hooks; not implemented yet XXX */
-
- len = 1; /* shut up gcc */
-#ifdef notyet
- /* create suspend save area */
- len = sizeof(u_int16_t) * (ESA_REV_B_CODE_MEMORY_LENGTH
- + ESA_REV_B_DATA_MEMORY_LENGTH + 1);
- sc->savemem = (u_int16_t *)malloc(len, M_DEVBUF, M_NOWAIT | M_ZERO);
- if (sc->savemem == NULL) {
- printf("%s: unable to allocate suspend buffer\n",
- sc->sc_dev.dv_xname);
- return;
- }
-
- sc->powerhook = powerhook_establish(auixp_powerhook, sc);
- if (sc->powerhook == NULL)
- printf("%s: WARNING: unable to establish powerhook\n",
- sc->sc_dev.dv_xname);
-
-#endif
-
/*
* delay further configuration of codecs and audio after interrupts
* are enabled.
@@ -1456,10 +1425,6 @@ auixp_detach(struct device *self, int flags)
pci_intr_disestablish(sc->sc_pct, sc->sc_ih);
if (sc->sc_ios)
bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_ios);
-
- if (sc->savemem)
- free(sc->savemem, M_DEVBUF);
-
return 0;
}
@@ -1844,39 +1809,3 @@ auixp_init(struct auixp_softc *sc)
return 0;
}
-
-#if 0
-void
-auixp_powerhook(int why, void *hdl)
-{
- struct auixp_softc *sc;
-
- sc = (struct auixp_softc *)hdl;
- switch (why) {
- case PWR_SUSPEND:
- auixp_suspend(sc);
- break;
- case PWR_RESUME:
- auixp_resume(sc);
-/* XXX fix me XXX */
- (sc->codec_if->vtbl->restore_ports)(sc->codec_if);
- break;
- }
-}
-
-int
-auixp_suspend(struct auixp_softc *sc)
-{
-
- /* XXX no power functions yet XXX */
- return 0;
-}
-
-int
-auixp_resume(struct auixp_softc *sc)
-{
-
- /* XXX no power functions yet XXX */
- return 0;
-}
-#endif /* 0 */
diff --git a/sys/dev/pci/auixpvar.h b/sys/dev/pci/auixpvar.h
index 348ece9d050..b369de54501 100644
--- a/sys/dev/pci/auixpvar.h
+++ b/sys/dev/pci/auixpvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: auixpvar.h,v 1.1 2005/08/07 20:08:45 mickey Exp $ */
+/* $OpenBSD: auixpvar.h,v 1.2 2010/08/27 16:26:35 deraadt Exp $ */
/* $NetBSD: auixpvar.h,v 1.3 2005/01/12 15:54:34 kent Exp $*/
/*
@@ -114,8 +114,4 @@ struct auixp_softc {
/* last set audio parameters */
struct audio_params sc_play_params;
struct audio_params sc_rec_params;
-
- /* suspend/resume */
- void *powerhook;
- u_int16_t *savemem;
};