Module Name:    src
Committed By:   jruoho
Date:           Sun Jun  6 18:40:51 UTC 2010

Modified Files:
        src/sys/dev/acpi: acpi_ec.c acpi_wakedev.c

Log Message:
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


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/acpi/acpi_ec.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/acpi/acpi_wakedev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_ec.c
diff -u src/sys/dev/acpi/acpi_ec.c:1.65 src/sys/dev/acpi/acpi_ec.c:1.66
--- src/sys/dev/acpi/acpi_ec.c:1.65	Wed Apr 14 19:27:28 2010
+++ src/sys/dev/acpi/acpi_ec.c	Sun Jun  6 18:40:51 2010
@@ -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 <[email protected]>.
@@ -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);

Index: src/sys/dev/acpi/acpi_wakedev.c
diff -u src/sys/dev/acpi/acpi_wakedev.c:1.14 src/sys/dev/acpi/acpi_wakedev.c:1.15
--- src/sys/dev/acpi/acpi_wakedev.c:1.14	Sat Jun  5 15:47:59 2010
+++ src/sys/dev/acpi/acpi_wakedev.c	Sun Jun  6 18:40:51 2010
@@ -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 <[email protected]>
@@ -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));

Reply via email to