summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/hwregs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/hwregs.c')
-rw-r--r--sys/contrib/dev/acpica/hwregs.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/sys/contrib/dev/acpica/hwregs.c b/sys/contrib/dev/acpica/hwregs.c
index 164a44f..8f3cd18 100644
--- a/sys/contrib/dev/acpica/hwregs.c
+++ b/sys/contrib/dev/acpica/hwregs.c
@@ -3,7 +3,7 @@
*
* Module Name: hwregs - Read/write access functions for the various ACPI
* control and status registers.
- * $Revision: 134 $
+ * $Revision: 142 $
*
******************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -140,9 +140,9 @@
ACPI_STATUS
AcpiHwClearAcpiStatus (void)
{
- NATIVE_UINT_MAX32 i;
- NATIVE_UINT GpeBlock;
+ ACPI_NATIVE_UINT i;
ACPI_STATUS Status;
+ ACPI_GPE_BLOCK_INFO *GpeBlock;
ACPI_FUNCTION_TRACE ("HwClearAcpiStatus");
@@ -178,19 +178,22 @@ AcpiHwClearAcpiStatus (void)
}
}
- /* Clear the GPE Bits */
+ /* Clear the GPE Bits in all GPE registers in all GPE blocks */
- for (GpeBlock = 0; GpeBlock < ACPI_MAX_GPE_BLOCKS; GpeBlock++)
+ GpeBlock = AcpiGbl_GpeBlockListHead;
+ while (GpeBlock)
{
- for (i = 0; i < AcpiGbl_GpeBlockInfo[GpeBlock].RegisterCount; i++)
+ for (i = 0; i < GpeBlock->RegisterCount; i++)
{
Status = AcpiHwLowLevelWrite (8, 0xFF,
- AcpiGbl_GpeBlockInfo[GpeBlock].BlockAddress, i);
+ &GpeBlock->RegisterInfo[i].StatusAddress, (UINT32) i);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
}
}
+
+ GpeBlock = GpeBlock->Next;
}
UnlockAndExit:
@@ -239,10 +242,13 @@ AcpiGetSleepTypeData (
/*
* Evaluate the namespace object containing the values for this state
*/
- Status = AcpiNsEvaluateByName ((NATIVE_CHAR *) AcpiGbl_DbSleepStates[SleepState],
+ Status = AcpiNsEvaluateByName ((char *) AcpiGbl_DbSleepStates[SleepState],
NULL, &ObjDesc);
if (ACPI_FAILURE (Status))
{
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s while evaluating SleepState [%s]\n",
+ AcpiFormatException (Status), AcpiGbl_DbSleepStates[SleepState]));
+
return_ACPI_STATUS (Status);
}
@@ -291,8 +297,8 @@ AcpiGetSleepTypeData (
if (ACPI_FAILURE (Status))
{
- ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Bad Sleep object %p type %s\n",
- ObjDesc, AcpiUtGetObjectTypeName (ObjDesc)));
+ ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "While evaluating SleepState [%s], bad Sleep object %p type %s\n",
+ AcpiGbl_DbSleepStates[SleepState], ObjDesc, AcpiUtGetObjectTypeName (ObjDesc)));
}
AcpiUtRemoveReference (ObjDesc);
@@ -467,7 +473,7 @@ AcpiSetRegister (
/*
* Status Registers are different from the rest. Clear by
- * writing 1, writing 0 has no effect. So, the only relevent
+ * writing 1, writing 0 has no effect. So, the only relevant
* information is the single bit we're interested in, all others should
* be written as 0 so they will be left unchanged
*/
OpenPOWER on IntegriCloud