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.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/sys/contrib/dev/acpica/hwregs.c b/sys/contrib/dev/acpica/hwregs.c
index e4a55d3..6997d29 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: 149 $
+ * $Revision: 152 $
*
******************************************************************************/
@@ -389,7 +389,7 @@ AcpiGetRegister (
*ReturnValue = RegisterValue;
- ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read value %8.8X register %X\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read value %8.8X register %X\n",
RegisterValue, BitRegInfo->ParentRegister));
}
@@ -455,9 +455,9 @@ AcpiSetRegister (
/*
* Decode the Register ID
- * Register id = Register block id | bit id
+ * Register ID = [Register block ID] | [bit ID]
*
- * Check bit id to fine locate Register offset.
+ * Check bit ID to fine locate Register offset.
* Check Mask to determine Register offset, and then read-write.
*/
switch (BitRegInfo->ParentRegister)
@@ -466,9 +466,9 @@ AcpiSetRegister (
/*
* Status Registers are different from the rest. Clear by
- * writing 1, writing 0 has no effect. So, the only relevant
+ * writing 1, and 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
+ * be written as 0 so they will be left unchanged.
*/
Value = ACPI_REGISTER_PREPARE_BITS (Value,
BitRegInfo->BitPosition, BitRegInfo->AccessBitMask);
@@ -494,9 +494,9 @@ AcpiSetRegister (
case ACPI_REGISTER_PM1_CONTROL:
/*
- * Read the PM1 Control register.
+ * Write the PM1 Control register.
* Note that at this level, the fact that there are actually TWO
- * registers (A and B - and that B may not exist) is abstracted.
+ * registers (A and B - and B may not exist) is abstracted.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "PM1 control: Read %X\n", RegisterValue));
@@ -504,7 +504,7 @@ AcpiSetRegister (
BitRegInfo->AccessBitMask, Value);
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_CONTROL, (UINT16) RegisterValue);
+ ACPI_REGISTER_PM1_CONTROL, (UINT16) RegisterValue);
break;
@@ -519,16 +519,14 @@ AcpiSetRegister (
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "PM2 control: Read %X from %8.8X%8.8X\n",
RegisterValue,
- ACPI_HIDWORD (ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address)),
- ACPI_LODWORD (ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address))));
+ ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address))));
ACPI_REGISTER_INSERT_VALUE (RegisterValue, BitRegInfo->BitPosition,
BitRegInfo->AccessBitMask, Value);
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %4.4X to %8.8X%8.8X\n",
RegisterValue,
- ACPI_HIDWORD (ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address)),
- ACPI_LODWORD (ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address))));
+ ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address))));
Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
ACPI_REGISTER_PM2_CONTROL, (UINT8) (RegisterValue));
@@ -842,7 +840,7 @@ AcpiHwLowLevelRead (
/*
* Three address spaces supported:
- * Memory, Io, or PCI config.
+ * Memory, IO, or PCI_Config.
*/
switch (Reg->AddressSpaceId)
{
@@ -881,9 +879,8 @@ AcpiHwLowLevelRead (
}
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Read: %8.8X width %2d from %8.8X%8.8X (%s)\n",
- *Value, Width,
- ACPI_HIDWORD (ACPI_GET_ADDRESS (Reg->Address)),
- ACPI_LODWORD (ACPI_GET_ADDRESS (Reg->Address)),
+ *Value, Width,
+ ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Reg->Address)),
AcpiUtGetRegionName (Reg->AddressSpaceId)));
return (Status);
@@ -928,9 +925,10 @@ AcpiHwLowLevelWrite (
{
return (AE_OK);
}
+
/*
* Three address spaces supported:
- * Memory, Io, or PCI config.
+ * Memory, IO, or PCI_Config.
*/
switch (Reg->AddressSpaceId)
{
@@ -969,9 +967,8 @@ AcpiHwLowLevelWrite (
}
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n",
- Value, Width,
- ACPI_HIDWORD (ACPI_GET_ADDRESS (Reg->Address)),
- ACPI_LODWORD (ACPI_GET_ADDRESS (Reg->Address)),
+ Value, Width,
+ ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Reg->Address)),
AcpiUtGetRegionName (Reg->AddressSpaceId)));
return (Status);
OpenPOWER on IntegriCloud