summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/hwgpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/hwgpe.c')
-rw-r--r--sys/contrib/dev/acpica/hwgpe.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/contrib/dev/acpica/hwgpe.c b/sys/contrib/dev/acpica/hwgpe.c
index 591c524..d7498e5 100644
--- a/sys/contrib/dev/acpica/hwgpe.c
+++ b/sys/contrib/dev/acpica/hwgpe.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
- * $Revision: 1.71 $
+ * $Revision: 1.75 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -188,16 +188,20 @@ AcpiHwClearGpe (
ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
ACPI_STATUS Status;
+ UINT8 RegisterBit;
ACPI_FUNCTION_ENTRY ();
+ RegisterBit = (UINT8)
+ (1 << (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));
+
/*
* Write a one to the appropriate bit in the status register to
* clear this GPE.
*/
- Status = AcpiHwLowLevelWrite (8, GpeEventInfo->RegisterBit,
+ Status = AcpiHwLowLevelWrite (8, RegisterBit,
&GpeEventInfo->RegisterInfo->StatusAddress);
return (Status);
@@ -243,7 +247,8 @@ AcpiHwGetGpeStatus (
/* Get the register bitmask for this GPE */
- RegisterBit = GpeEventInfo->RegisterBit;
+ RegisterBit = (UINT8)
+ (1 << (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));
/* GPE currently enabled? (enabled for runtime?) */
@@ -476,7 +481,7 @@ AcpiHwDisableAllGpes (
ACPI_STATUS Status;
- ACPI_FUNCTION_TRACE ("HwDisableAllGpes");
+ ACPI_FUNCTION_TRACE (HwDisableAllGpes);
Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock);
@@ -504,7 +509,7 @@ AcpiHwEnableAllRuntimeGpes (
ACPI_STATUS Status;
- ACPI_FUNCTION_TRACE ("HwEnableAllRuntimeGpes");
+ ACPI_FUNCTION_TRACE (HwEnableAllRuntimeGpes);
Status = AcpiEvWalkGpeList (AcpiHwEnableRuntimeGpeBlock);
@@ -531,7 +536,7 @@ AcpiHwEnableAllWakeupGpes (
ACPI_STATUS Status;
- ACPI_FUNCTION_TRACE ("HwEnableAllWakeupGpes");
+ ACPI_FUNCTION_TRACE (HwEnableAllWakeupGpes);
Status = AcpiEvWalkGpeList (AcpiHwEnableWakeupGpeBlock);
OpenPOWER on IntegriCloud