diff options
author | Mike Smith <msmith@FreeBSD.org> | 2001-10-04 23:12:13 +0000 |
---|---|---|
committer | Mike Smith <msmith@FreeBSD.org> | 2001-10-04 23:12:13 +0000 |
commit | 584be850dfe72a391cecf4d3e4b7351ba82e8e46 (patch) | |
tree | 3c5d09bf67f1ee0a9b4f77e77f3a31bdd33a253f /sys/contrib/dev/acpica/evxfevnt.c | |
parent | 7fb2c1c6169b76180d4ee5c3147edf4da2fdd083 (diff) | |
download | src-584be850dfe72a391cecf4d3e4b7351ba82e8e46.tar.gz src-584be850dfe72a391cecf4d3e4b7351ba82e8e46.zip |
Import of the Intel ACPI CA 20010920 snapshot.
Notes
Notes:
svn path=/vendor-sys/acpica/dist/; revision=84491
Diffstat (limited to 'sys/contrib/dev/acpica/evxfevnt.c')
-rw-r--r-- | sys/contrib/dev/acpica/evxfevnt.c | 72 |
1 files changed, 26 insertions, 46 deletions
diff --git a/sys/contrib/dev/acpica/evxfevnt.c b/sys/contrib/dev/acpica/evxfevnt.c index 68adc2db0fe5..9abf4eb54509 100644 --- a/sys/contrib/dev/acpica/evxfevnt.c +++ b/sys/contrib/dev/acpica/evxfevnt.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: evxfevnt - External Interfaces, ACPI event disable/enable - * $Revision: 36 $ + * $Revision: 38 $ * *****************************************************************************/ @@ -202,14 +202,6 @@ AcpiDisable (void) FUNCTION_TRACE ("AcpiDisable"); - /* Ensure that ACPI has been initialized */ - - ACPI_IS_INITIALIZATION_COMPLETE (Status); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* Restore original mode */ Status = AcpiHwSetMode (AcpiGbl_OriginalMode); @@ -234,6 +226,7 @@ AcpiDisable (void) * * PARAMETERS: Event - The fixed event or GPE to be enabled * Type - The type of event + * Flags - Just enable, or also wake enable? * * RETURN: Status * @@ -244,7 +237,8 @@ AcpiDisable (void) ACPI_STATUS AcpiEnableEvent ( UINT32 Event, - UINT32 Type) + UINT32 Type, + UINT32 Flags) { ACPI_STATUS Status = AE_OK; UINT32 RegisterId; @@ -253,14 +247,6 @@ AcpiEnableEvent ( FUNCTION_TRACE ("AcpiEnableEvent"); - /* Ensure that ACPI has been initialized */ - - ACPI_IS_INITIALIZATION_COMPLETE (Status); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* The Type must be either Fixed AcpiEvent or GPE */ switch (Type) @@ -326,7 +312,15 @@ AcpiEnableEvent ( /* Enable the requested GPE number */ - AcpiHwEnableGpe (Event); + if (Flags & ACPI_EVENT_ENABLE) + { + AcpiHwEnableGpe (Event); + } + if (Flags & ACPI_EVENT_WAKE_ENABLE) + { + AcpiHwEnableGpeForWakeup (Event); + } + break; @@ -345,7 +339,8 @@ AcpiEnableEvent ( * FUNCTION: AcpiDisableEvent * * PARAMETERS: Event - The fixed event or GPE to be enabled - * Type - The type of event + * Type - The type of event, fixed or general purpose + * Flags - Wake disable vs. non-wake disable * * RETURN: Status * @@ -356,7 +351,8 @@ AcpiEnableEvent ( ACPI_STATUS AcpiDisableEvent ( UINT32 Event, - UINT32 Type) + UINT32 Type, + UINT32 Flags) { ACPI_STATUS Status = AE_OK; UINT32 RegisterId; @@ -365,14 +361,6 @@ AcpiDisableEvent ( FUNCTION_TRACE ("AcpiDisableEvent"); - /* Ensure that ACPI has been initialized */ - - ACPI_IS_INITIALIZATION_COMPLETE (Status); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* The Type must be either Fixed AcpiEvent or GPE */ switch (Type) @@ -437,7 +425,15 @@ AcpiDisableEvent ( /* Disable the requested GPE number */ - AcpiHwDisableGpe (Event); + if (Flags & ACPI_EVENT_DISABLE) + { + AcpiHwDisableGpe (Event); + } + if (Flags & ACPI_EVENT_WAKE_DISABLE) + { + AcpiHwDisableGpeForWakeup (Event); + } + break; @@ -474,14 +470,6 @@ AcpiClearEvent ( FUNCTION_TRACE ("AcpiClearEvent"); - /* Ensure that ACPI has been initialized */ - - ACPI_IS_INITIALIZATION_COMPLETE (Status); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* The Type must be either Fixed AcpiEvent or GPE */ switch (Type) @@ -579,14 +567,6 @@ AcpiGetEventStatus ( FUNCTION_TRACE ("AcpiGetEventStatus"); - /* Ensure that ACPI has been initialized */ - - ACPI_IS_INITIALIZATION_COMPLETE (Status); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - if (!EventStatus) { return_ACPI_STATUS (AE_BAD_PARAMETER); |