Rename ACPI bit register access functions.

Rename AcpiGetRegister and AcpiSetRegister to clarify the purpose
of these functions. New names are AcpiReadBitRegister and
AcpiWriteBitRegister.
This commit is contained in:
Robert Moore 2009-02-10 09:00:12 -08:00
parent d258fbe313
commit 89cce9695d
7 changed files with 46 additions and 41 deletions

View File

@ -306,7 +306,7 @@ AcpiEvFixedEventInitialize (
if (AcpiGbl_FixedEventInfo[i].EnableRegisterId != 0xFF)
{
Status = AcpiSetRegister (
Status = AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[i].EnableRegisterId, 0);
if (ACPI_FAILURE (Status))
{
@ -399,7 +399,8 @@ AcpiEvFixedEventDispatch (
/* Clear the status bit */
(void) AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].StatusRegisterId, 1);
(void) AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[Event].StatusRegisterId, 1);
/*
* Make sure we've got a handler. If not, report an error. The event is
@ -407,7 +408,8 @@ AcpiEvFixedEventDispatch (
*/
if (NULL == AcpiGbl_FixedEventHandlers[Event].Handler)
{
(void) AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 0);
(void) AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 0);
ACPI_ERROR ((AE_INFO,
"No installed handler for fixed event [%08X]",
@ -419,7 +421,7 @@ AcpiEvFixedEventDispatch (
/* Invoke the Fixed Event handler */
return ((AcpiGbl_FixedEventHandlers[Event].Handler)(
AcpiGbl_FixedEventHandlers[Event].Context));
AcpiGbl_FixedEventHandlers[Event].Context));
}

View File

@ -639,7 +639,7 @@ AcpiEvReleaseGlobalLock (
*/
if (Pending)
{
Status = AcpiSetRegister (
Status = AcpiWriteBitRegister (
ACPI_BITREG_GLOBAL_LOCK_RELEASE, 1);
}

View File

@ -275,7 +275,8 @@ AcpiEnableEvent (
* Enable the requested fixed event (by writing a one to the enable
* register bit)
*/
Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 1);
Status = AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -283,8 +284,8 @@ AcpiEnableEvent (
/* Make sure that the hardware responded */
Status = AcpiGetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
&Value);
Status = AcpiReadBitRegister (
AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &Value);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -515,14 +516,15 @@ AcpiDisableEvent (
* Disable the requested fixed event (by writing a zero to the enable
* register bit)
*/
Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 0);
Status = AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 0);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
Status = AcpiGetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
&Value);
Status = AcpiReadBitRegister (
AcpiGbl_FixedEventInfo[Event].EnableRegisterId, &Value);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -574,7 +576,8 @@ AcpiClearEvent (
* Clear the requested fixed event (By writing a one to the status
* register bit)
*/
Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].StatusRegisterId, 1);
Status = AcpiWriteBitRegister (
AcpiGbl_FixedEventInfo[Event].StatusRegisterId, 1);
return_ACPI_STATUS (Status);
}
@ -681,8 +684,8 @@ AcpiGetEventStatus (
/* Get the status of the requested fixed event */
Status = AcpiGetRegister (AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
EventStatus);
Status = AcpiReadBitRegister (
AcpiGbl_FixedEventInfo[Event].StatusRegisterId, EventStatus);
return_ACPI_STATUS (Status);
}

View File

@ -260,7 +260,7 @@ AcpiHwGetMode (
return_UINT32 (ACPI_SYS_MODE_ACPI);
}
Status = AcpiGetRegister (ACPI_BITREG_SCI_ENABLE, &Value);
Status = AcpiReadBitRegister (ACPI_BITREG_SCI_ENABLE, &Value);
if (ACPI_FAILURE (Status))
{
return_UINT32 (ACPI_SYS_MODE_LEGACY);

View File

@ -329,7 +329,7 @@ AcpiEnterSleepState (
/* Clear wake status */
Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1);
Status = AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -347,7 +347,7 @@ AcpiEnterSleepState (
{
/* Disable BM arbitration */
Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 1);
Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -463,7 +463,7 @@ AcpiEnterSleepState (
do
{
Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
Status = AcpiReadBitRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -503,7 +503,7 @@ AcpiEnterSleepStateS4bios (
ACPI_FUNCTION_TRACE (AcpiEnterSleepStateS4bios);
Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1);
Status = AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -539,7 +539,7 @@ AcpiEnterSleepStateS4bios (
do {
AcpiOsStall(1000);
Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
Status = AcpiReadBitRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@ -669,15 +669,15 @@ AcpiLeaveSleepState (
/* Enable power button */
(void) AcpiSetRegister(
(void) AcpiWriteBitRegister(
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].EnableRegisterId, 1);
(void) AcpiSetRegister(
(void) AcpiWriteBitRegister(
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId, 1);
/* Enable BM arbitration */
Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0);
Status = AcpiWriteBitRegister (ACPI_BITREG_ARB_DISABLE, 0);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);

View File

@ -347,7 +347,7 @@ ACPI_EXPORT_SYMBOL (AcpiWrite)
/*******************************************************************************
*
* FUNCTION: AcpiGetRegister
* FUNCTION: AcpiReadBitRegister
*
* PARAMETERS: RegisterId - ID of ACPI Bit Register to access
* ReturnValue - Value that was read from the register,
@ -371,7 +371,7 @@ ACPI_EXPORT_SYMBOL (AcpiWrite)
******************************************************************************/
ACPI_STATUS
AcpiGetRegister (
AcpiReadBitRegister (
UINT32 RegisterId,
UINT32 *ReturnValue)
{
@ -380,7 +380,7 @@ AcpiGetRegister (
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE (AcpiGetRegister);
ACPI_FUNCTION_TRACE (AcpiReadBitRegister);
/* Get the info structure corresponding to the requested ACPI Register */
@ -412,12 +412,12 @@ AcpiGetRegister (
return_ACPI_STATUS (Status);
}
ACPI_EXPORT_SYMBOL (AcpiGetRegister)
ACPI_EXPORT_SYMBOL (AcpiReadBitRegister)
/*******************************************************************************
*
* FUNCTION: AcpiSetRegister
* FUNCTION: AcpiWriteBitRegister
*
* PARAMETERS: RegisterId - ID of ACPI Bit Register to access
* Value - Value to write to the register, in bit
@ -435,7 +435,7 @@ ACPI_EXPORT_SYMBOL (AcpiGetRegister)
******************************************************************************/
ACPI_STATUS
AcpiSetRegister (
AcpiWriteBitRegister (
UINT32 RegisterId,
UINT32 Value)
{
@ -445,7 +445,7 @@ AcpiSetRegister (
ACPI_CPU_FLAGS LockFlags;
ACPI_FUNCTION_TRACE_U32 (AcpiSetRegister, RegisterId);
ACPI_FUNCTION_TRACE_U32 (AcpiWriteBitRegister, RegisterId);
/* Get the info structure corresponding to the requested ACPI Register */
@ -569,7 +569,7 @@ UnlockAndExit:
return_ACPI_STATUS (Status);
}
ACPI_EXPORT_SYMBOL (AcpiSetRegister)
ACPI_EXPORT_SYMBOL (AcpiWriteBitRegister)
/*******************************************************************************

View File

@ -563,16 +563,6 @@ ACPI_STATUS
AcpiReset (
void);
ACPI_STATUS
AcpiGetRegister (
UINT32 RegisterId,
UINT32 *ReturnValue);
ACPI_STATUS
AcpiSetRegister (
UINT32 RegisterId,
UINT32 Value);
ACPI_STATUS
AcpiRead (
UINT32 *Value,
@ -583,6 +573,16 @@ AcpiWrite (
UINT32 Value,
ACPI_GENERIC_ADDRESS *Reg);
ACPI_STATUS
AcpiReadBitRegister (
UINT32 RegisterId,
UINT32 *ReturnValue);
ACPI_STATUS
AcpiWriteBitRegister (
UINT32 RegisterId,
UINT32 Value);
ACPI_STATUS
AcpiGetSleepTypeData (
UINT8 SleepState,