diff options
-rw-r--r-- | sys/dev/acpi/acpi.c | 26 | ||||
-rw-r--r-- | sys/dev/acpi/acpivar.h | 10 |
2 files changed, 5 insertions, 31 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 0ced1644dda..52fde7312bf 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.56 2006/10/12 16:38:21 jordan Exp $ */ +/* $OpenBSD: acpi.c,v 1.57 2006/10/15 15:22:17 jordan Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -39,7 +39,7 @@ #include <dev/acpi/dsdt.h> #ifdef ACPI_DEBUG -int acpi_debug = 11; +int acpi_debug = 16; #endif int acpi_enabled = 0; @@ -1198,7 +1198,6 @@ acpi_init_gpes(struct acpi_softc *sc) memset(sc->gpe_table, 0, sc->sc_lastgpe * sizeof(struct gpe_block)); ngpe = 0; - memset(sc->sc_gpes, 0, sizeof(sc->sc_gpes)); /* Clear GPE status */ for (idx=0; idx<sc->sc_lastgpe; idx+=8) { @@ -1207,7 +1206,6 @@ acpi_init_gpes(struct acpi_softc *sc) } for (idx=0; idx<sc->sc_lastgpe; idx++) { /* Search Level-sensitive GPES */ - sc->sc_gpes[ngpe].gpe_type = GPE_LEVEL; snprintf(name, sizeof(name), "\\_GPE._L%.2X", idx); gpe = aml_searchname(&aml_root, name); if (gpe != NULL) @@ -1215,34 +1213,17 @@ acpi_init_gpes(struct acpi_softc *sc) "level"); if (gpe == NULL) { /* Search Edge-sensitive GPES */ - sc->sc_gpes[ngpe].gpe_type = GPE_EDGE; snprintf(name, sizeof(name), "\\_GPE._E%.2X", idx); gpe = aml_searchname(&aml_root, name); if (gpe != NULL) acpi_set_gpehandler(sc, idx, acpi_gpe_edge, gpe, "edge"); } - if (gpe != NULL) { - sc->sc_gpes[ngpe].gpe_number = idx; - sc->sc_gpes[ngpe].gpe_handler = gpe; - dnprintf(20, "%s exists\n", name); - ngpe++; - } } sc->sc_maxgpe = ngpe; } void -acpi_enable_gpe(struct acpi_softc *sc, u_int32_t gpemask) -{ - u_int32_t mask; - dnprintf(10, "acpi_enable_gpe: mask 0x%08x\n", gpemask); - mask = acpi_read_pmreg(sc, ACPIREG_GPE0_EN, 0); - acpi_write_pmreg(sc, ACPIREG_GPE0_EN, 0, mask | gpemask); - dnprintf(10, "acpi_enable_gpe: GPE 0x%08x\n", mask | gpemask); -} - -void acpi_init_states(struct acpi_softc *sc) { struct aml_value res; @@ -1576,10 +1557,11 @@ acpi_isr_thread(void *arg) if (sc->gpe_table[gpe].handler) __acpi_enable_gpe(sc, gpe, 1); } - +#if 0 /* Enable EC interrupt */ if (sc->sc_ec != NULL) acpi_enable_gpe(sc, sc->sc_ec_gpemask); +#endif } while (thread->running) { diff --git a/sys/dev/acpi/acpivar.h b/sys/dev/acpi/acpivar.h index 80ad71f64b8..f3a8cb2057a 100644 --- a/sys/dev/acpi/acpivar.h +++ b/sys/dev/acpi/acpivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: acpivar.h,v 1.26 2006/06/30 04:16:15 jordan Exp $ */ +/* $OpenBSD: acpivar.h,v 1.27 2006/10/15 15:22:17 jordan Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * @@ -139,18 +139,11 @@ struct acpi_softc { int sc_powerbtn; int sc_sleepbtn; - u_int32_t sc_gpemask; struct { int slp_typa; int slp_typb; } sc_sleeptype[6]; - - struct { - int gpe_type; - int gpe_number; - struct aml_node *gpe_handler; - } sc_gpes[256]; int sc_maxgpe; int sc_lastgpe; @@ -168,7 +161,6 @@ struct acpi_softc { struct aml_node *sc_wak; int sc_state; struct acpiec_softc *sc_ec; /* XXX assume single EC */ - u_int32_t sc_ec_gpemask; }; #define GPE_NONE 0x00 |