Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/acpi ACPICA 20100331:



details:   https://anonhg.NetBSD.org/src/rev/0f96340bc023
branches:  trunk
changeset: 755456:0f96340bc023
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Sun Jun 06 18:40:51 2010 +0000

description:
ACPICA 20100331:

        Completed a major update for the GPE support in order to improve
        support for shared GPEs and to simplify both host OS and ACPICA
        code. Added a reference count mechanism to support shared GPEs that
        require multiple device drivers.  Several external interfaces have
        changed. One external interface has been removed. One new external
        interface was added. Most of the GPE external interfaces now use the
        GPE spinlock instead of the events mutex (and the Flags parameter
        for many GPE interfaces has been removed.) See the updated ACPICA
        Programmer Reference for details. Matthew Garrett, Bob Moore, Rafael
        Wysocki. ACPICA BZ 831.

        Changed:
            AcpiEnableGpe, AcpiDisableGpe, AcpiClearGpe, AcpiGetGpeStatus
        Removed:
            AcpiSetGpeType
        New:
            AcpiSetGpe

diffstat:

 sys/dev/acpi/acpi_ec.c      |  25 +++++++++----------------
 sys/dev/acpi/acpi_wakedev.c |  14 ++++++--------
 2 files changed, 15 insertions(+), 24 deletions(-)

diffs (123 lines):

diff -r b11e905dc933 -r 0f96340bc023 sys/dev/acpi/acpi_ec.c
--- a/sys/dev/acpi/acpi_ec.c    Sun Jun 06 18:34:45 2010 +0000
+++ b/sys/dev/acpi/acpi_ec.c    Sun Jun 06 18:40:51 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_ec.c,v 1.65 2010/04/14 19:27:28 jruoho Exp $      */
+/*     $NetBSD: acpi_ec.c,v 1.66 2010/06/06 18:40:51 jruoho Exp $      */
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -59,7 +59,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.65 2010/04/14 19:27:28 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_ec.c,v 1.66 2010/06/06 18:40:51 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/callout.h>
@@ -366,14 +366,7 @@
                goto post_csr_map;
        }
 
-       rv = AcpiSetGpeType(sc->sc_gpeh, sc->sc_gpebit, ACPI_GPE_TYPE_RUNTIME);
-       if (rv != AE_OK) {
-               aprint_error_dev(self, "unable to set GPE type: %s\n",
-                   AcpiFormatException(rv));
-               goto post_csr_map;
-       }
-
-       rv = AcpiEnableGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_ISR);
+       rv = AcpiEnableGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_GPE_TYPE_RUNTIME);
        if (rv != AE_OK) {
                aprint_error_dev(self, "unable to enable GPE: %s\n",
                    AcpiFormatException(rv));
@@ -582,7 +575,7 @@
                }
                if (sc->sc_state != EC_STATE_FREE) {
                        mutex_exit(&sc->sc_mtx);
-                       AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_NOT_ISR);
+                       AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit);
                        acpiec_unlock(dv);
                        aprint_error_dev(dv, "command timed out, state %d\n",
                            sc->sc_state);
@@ -590,7 +583,7 @@
                }
        } else if (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
                mutex_exit(&sc->sc_mtx);
-               AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_NOT_ISR);
+               AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit);
                acpiec_unlock(dv);
                aprint_error_dev(dv, "command takes over %d sec...\n", EC_CMD_TIMEOUT);
                return AE_ERROR;
@@ -631,7 +624,7 @@
                }
                if (sc->sc_state != EC_STATE_FREE) {
                        mutex_exit(&sc->sc_mtx);
-                       AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_NOT_ISR);
+                       AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit);
                        acpiec_unlock(dv);
                        aprint_error_dev(dv, "command timed out, state %d\n",
                            sc->sc_state);
@@ -639,7 +632,7 @@
                }
        } else if (cv_timedwait(&sc->sc_cv, &sc->sc_mtx, EC_CMD_TIMEOUT * hz)) {
                mutex_exit(&sc->sc_mtx);
-               AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_NOT_ISR);
+               AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit);
                acpiec_unlock(dv);
                aprint_error_dev(dv, "command takes over %d sec...\n", EC_CMD_TIMEOUT);
                return AE_ERROR;
@@ -849,7 +842,7 @@
        device_t dv = arg;
        struct acpiec_softc *sc = device_private(dv);
 
-       AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_NOT_ISR);
+       AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit);
 
        mutex_enter(&sc->sc_mtx);
        acpiec_gpe_state_machine(dv);
@@ -862,7 +855,7 @@
        device_t dv = arg;
        struct acpiec_softc *sc = device_private(dv);
 
-       AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit, ACPI_ISR);
+       AcpiClearGpe(sc->sc_gpeh, sc->sc_gpebit);
 
        mutex_enter(&sc->sc_mtx);
        acpiec_gpe_state_machine(dv);
diff -r b11e905dc933 -r 0f96340bc023 sys/dev/acpi/acpi_wakedev.c
--- a/sys/dev/acpi/acpi_wakedev.c       Sun Jun 06 18:34:45 2010 +0000
+++ b/sys/dev/acpi/acpi_wakedev.c       Sun Jun 06 18:40:51 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_wakedev.c,v 1.14 2010/06/05 15:47:59 jruoho Exp $ */
+/* $NetBSD: acpi_wakedev.c,v 1.15 2010/06/06 18:40:51 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2009, 2010 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.14 2010/06/05 15:47:59 jruoho Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakedev.c,v 1.15 2010/06/06 18:40:51 jruoho Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -271,12 +271,10 @@
        /*
         * Set or unset a GPE as both runtime and wake.
         */
-       if (enable == 0)
-               (void)AcpiDisableGpe(hdl, val, ACPI_NOT_ISR);
-       else {
-               (void)AcpiSetGpeType(hdl, val, ACPI_GPE_TYPE_WAKE_RUN);
-               (void)AcpiEnableGpe(hdl, val, ACPI_NOT_ISR);
-       }
+       if (enable != 0)
+               (void)AcpiEnableGpe(hdl, val, ACPI_GPE_TYPE_WAKE_RUN);
+       else
+               (void)AcpiDisableGpe(hdl, val, ACPI_GPE_TYPE_WAKE_RUN);
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO, "wake GPE %s for %s\n",
                (enable != 0) ? "enabled" : "disabled", ad->ad_name));



Home | Main Index | Thread Index | Old Index