]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ACPICA: Rename ACPI bit register access functions
authorBob Moore <robert.moore@intel.com>
Mon, 23 Feb 2009 07:02:07 +0000 (15:02 +0800)
committerLen Brown <len.brown@intel.com>
Thu, 26 Mar 2009 20:38:31 +0000 (16:38 -0400)
Rename acpi_get_register and acpi_set_register to clarify the
purpose of these functions. New names are acpi_read_bit_register
and acpi_write_bit_register.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/acpica/evevent.c
drivers/acpi/acpica/evmisc.c
drivers/acpi/acpica/evxfevnt.c
drivers/acpi/acpica/hwacpi.c
drivers/acpi/acpica/hwsleep.c
drivers/acpi/acpica/hwxface.c
drivers/acpi/processor_idle.c
drivers/acpi/sleep.c
include/acpi/acpixf.h

index 803edd9e3f6a65f853b31232b07d5719a787c7a2..246f8775ec13336a10cbe181500574ca99e72017 100644 (file)
@@ -204,8 +204,8 @@ static acpi_status acpi_ev_fixed_event_initialize(void)
 
                if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) {
                        status =
-                           acpi_set_register(acpi_gbl_fixed_event_info[i].
-                                             enable_register_id, 0);
+                           acpi_write_bit_register(acpi_gbl_fixed_event_info
+                                                   [i].enable_register_id, 0);
                        if (ACPI_FAILURE(status)) {
                                return (status);
                        }
@@ -288,16 +288,16 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
 
        /* Clear the status bit */
 
-       (void)acpi_set_register(acpi_gbl_fixed_event_info[event].
-                               status_register_id, 1);
+       (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
+                                     status_register_id, 1);
 
        /*
         * Make sure we've got a handler. If not, report an error. The event is
         * disabled to prevent further interrupts.
         */
        if (NULL == acpi_gbl_fixed_event_handlers[event].handler) {
-               (void)acpi_set_register(acpi_gbl_fixed_event_info[event].
-                                       enable_register_id, 0);
+               (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
+                                             enable_register_id, 0);
 
                ACPI_ERROR((AE_INFO,
                            "No installed handler for fixed event [%08X]",
index 5f893057bcc617909cb08294089e6f0e98f9dc53..0e9e12b2f2bbb9503463327db77942cac2cbd2fb 100644 (file)
@@ -534,8 +534,8 @@ acpi_status acpi_ev_release_global_lock(void)
                 */
                if (pending) {
                        status =
-                           acpi_set_register(ACPI_BITREG_GLOBAL_LOCK_RELEASE,
-                                             1);
+                           acpi_write_bit_register
+                           (ACPI_BITREG_GLOBAL_LOCK_RELEASE, 1);
                }
 
                ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
index 35485e4b60a67df4d5a09e8cd8aa1e2cbe3b1000..484c9793ca065f2d39b48a6d99e95f7992b1700f 100644 (file)
@@ -172,8 +172,8 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
         * register bit)
         */
        status =
-           acpi_set_register(acpi_gbl_fixed_event_info[event].
-                             enable_register_id, 1);
+           acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
+                                   enable_register_id, 1);
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
@@ -181,8 +181,8 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
        /* Make sure that the hardware responded */
 
        status =
-           acpi_get_register(acpi_gbl_fixed_event_info[event].
-                             enable_register_id, &value);
+           acpi_read_bit_register(acpi_gbl_fixed_event_info[event].
+                                  enable_register_id, &value);
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
@@ -354,15 +354,15 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
         * register bit)
         */
        status =
-           acpi_set_register(acpi_gbl_fixed_event_info[event].
-                             enable_register_id, 0);
+           acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
+                                   enable_register_id, 0);
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
 
        status =
-           acpi_get_register(acpi_gbl_fixed_event_info[event].
-                             enable_register_id, &value);
+           acpi_read_bit_register(acpi_gbl_fixed_event_info[event].
+                                  enable_register_id, &value);
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
@@ -407,8 +407,8 @@ acpi_status acpi_clear_event(u32 event)
         * register bit)
         */
        status =
-           acpi_set_register(acpi_gbl_fixed_event_info[event].
-                             status_register_id, 1);
+           acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
+                                   status_register_id, 1);
 
        return_ACPI_STATUS(status);
 }
@@ -495,7 +495,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
        /* Get the status of the requested fixed event */
 
        status =
-           acpi_get_register(acpi_gbl_fixed_event_info[event].
+           acpi_read_bit_register(acpi_gbl_fixed_event_info[event].
                              enable_register_id, &value);
        if (ACPI_FAILURE(status))
                return_ACPI_STATUS(status);
@@ -503,7 +503,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
        *event_status = value;
 
        status =
-           acpi_get_register(acpi_gbl_fixed_event_info[event].
+           acpi_read_bit_register(acpi_gbl_fixed_event_info[event].
                              status_register_id, &value);
        if (ACPI_FAILURE(status))
                return_ACPI_STATUS(status);
index a9d4fea4167f37833e2ef2a855d4748fdd644217..8902db8c670f6f7ce1f7ac4ddac67b4dea67b832 100644 (file)
@@ -172,7 +172,7 @@ u32 acpi_hw_get_mode(void)
                return_UINT32(ACPI_SYS_MODE_ACPI);
        }
 
-       status = acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value);
+       status = acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &value);
        if (ACPI_FAILURE(status)) {
                return_UINT32(ACPI_SYS_MODE_LEGACY);
        }
index 677ccb6bceea511370472c7ca795a139836767d0..78d62b8a5c319e8cdb1700bed7b6edff0a7e5de8 100644 (file)
@@ -250,7 +250,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
 
        /* Clear wake status */
 
-       status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);
+       status = acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1);
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
@@ -365,7 +365,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
        /* Wait until we enter sleep state */
 
        do {
-               status = acpi_get_register(ACPI_BITREG_WAKE_STATUS,
+               status = acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS,
                                                    &in_value);
                if (ACPI_FAILURE(status)) {
                        return_ACPI_STATUS(status);
@@ -399,7 +399,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
 
        ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios);
 
-       status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);
+       status = acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1);
        if (ACPI_FAILURE(status)) {
                return_ACPI_STATUS(status);
        }
@@ -431,7 +431,8 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
 
        do {
                acpi_os_stall(1000);
-               status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value);
+               status =
+                   acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS, &in_value);
                if (ACPI_FAILURE(status)) {
                        return_ACPI_STATUS(status);
                }
@@ -592,18 +593,18 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
         * it to determine whether the system is rebooting or resuming. Clear
         * it for compatibility.
         */
-       acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);
+       acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1);
 
        acpi_gbl_system_awake_and_running = TRUE;
 
        /* Enable power button */
 
        (void)
-           acpi_set_register(acpi_gbl_fixed_event_info
+           acpi_write_bit_register(acpi_gbl_fixed_event_info
                              [ACPI_EVENT_POWER_BUTTON].enable_register_id, 1);
 
        (void)
-           acpi_set_register(acpi_gbl_fixed_event_info
+           acpi_write_bit_register(acpi_gbl_fixed_event_info
                              [ACPI_EVENT_POWER_BUTTON].status_register_id, 1);
 
        arg.integer.value = ACPI_SST_WORKING;
index c8100199634b4bdc3cae55120ac42ae9c98ab99d..529251c7f911d20071a2394774aa5088862da798 100644 (file)
@@ -242,7 +242,7 @@ ACPI_EXPORT_SYMBOL(acpi_write)
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_get_register
+ * FUNCTION:    acpi_read_bit_register
  *
  * PARAMETERS:  register_id     - ID of ACPI Bit Register to access
  *              return_value    - Value that was read from the register,
@@ -264,13 +264,13 @@ ACPI_EXPORT_SYMBOL(acpi_write)
  *       it make much sense to actually read this field.)
  *
  ******************************************************************************/
-acpi_status acpi_get_register(u32 register_id, u32 *return_value)
+acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value)
 {
        u32 register_value = 0;
        struct acpi_bit_register_info *bit_reg_info;
        acpi_status status;
 
-       ACPI_FUNCTION_TRACE(acpi_get_register);
+       ACPI_FUNCTION_TRACE(acpi_read_bit_register);
 
        /* Get the info structure corresponding to the requested ACPI Register */
 
@@ -302,11 +302,11 @@ acpi_status acpi_get_register(u32 register_id, u32 *return_value)
        return_ACPI_STATUS(status);
 }
 
-ACPI_EXPORT_SYMBOL(acpi_get_register)
+ACPI_EXPORT_SYMBOL(acpi_read_bit_register)
 
 /*******************************************************************************
  *
- * FUNCTION:    acpi_set_register
+ * FUNCTION:    acpi_write_bit_register
  *
  * PARAMETERS:  register_id     - ID of ACPI Bit Register to access
  *              Value           - Value to write to the register, in bit
@@ -322,14 +322,14 @@ ACPI_EXPORT_SYMBOL(acpi_get_register)
  *              PM2 Control.
  *
  ******************************************************************************/
-acpi_status acpi_set_register(u32 register_id, u32 value)
+acpi_status acpi_write_bit_register(u32 register_id, u32 value)
 {
        u32 register_value = 0;
        struct acpi_bit_register_info *bit_reg_info;
        acpi_status status;
        acpi_cpu_flags lock_flags;
 
-       ACPI_FUNCTION_TRACE_U32(acpi_set_register, register_id);
+       ACPI_FUNCTION_TRACE_U32(acpi_write_bit_register, register_id);
 
        /* Get the info structure corresponding to the requested ACPI Register */
 
@@ -459,7 +459,7 @@ acpi_status acpi_set_register(u32 register_id, u32 value)
        return_ACPI_STATUS(status);
 }
 
-ACPI_EXPORT_SYMBOL(acpi_set_register)
+ACPI_EXPORT_SYMBOL(acpi_write_bit_register)
 
 /*******************************************************************************
  *
index 6946047d00963658e79ec0619fee40517904917c..5c69e85c1e4da6c40c4afb834be951d64b9e192d 100644 (file)
@@ -630,7 +630,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
         * In either case, the proper way to
         * handle BM_RLD is to set it and leave it set.
         */
-       acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1);
+       acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, 1);
 
        return;
 }
@@ -800,9 +800,9 @@ static int acpi_idle_bm_check(void)
 {
        u32 bm_status = 0;
 
-       acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);
+       acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);
        if (bm_status)
-               acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, 1);
+               acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1);
        /*
         * PIIX4 Erratum #18: Note that BM_STS doesn't always reflect
         * the true state of bus mastering activity; forcing us to
@@ -1028,7 +1028,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
                c3_cpu_count++;
                /* Disable bus master arbitration when all CPUs are in C3 */
                if (c3_cpu_count == num_online_cpus())
-                       acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
+                       acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1);
                spin_unlock(&c3_lock);
        } else if (!pr->flags.bm_check) {
                ACPI_FLUSH_CPU_CACHE();
@@ -1041,7 +1041,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev,
        /* Re-enable bus master arbitration */
        if (pr->flags.bm_check && pr->flags.bm_control) {
                spin_lock(&c3_lock);
-               acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
+               acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0);
                c3_cpu_count--;
                spin_unlock(&c3_lock);
        }
index 00456fccfa38bedf69749c7dc587c2001920acc4..837ac7d5801bc722aba89c2340f0bd2cb72ec150 100644 (file)
@@ -248,7 +248,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
 
        /* If ACPI is not enabled by the BIOS, we need to enable it here. */
        if (set_sci_en_on_resume)
-               acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
+               acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
        else
                acpi_enable();
 
index 325d4b073aca620a0e3bd2692bdb239b06dbfab2..a5525a5518a9fbd4c475a2a62472a526d86db131 100644 (file)
@@ -345,9 +345,9 @@ acpi_resource_to_address64(struct acpi_resource *resource,
  */
 acpi_status acpi_reset(void);
 
-acpi_status acpi_get_register(u32 register_id, u32 * return_value);
+acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value);
 
-acpi_status acpi_set_register(u32 register_id, u32 value);
+acpi_status acpi_write_bit_register(u32 register_id, u32 value);
 
 acpi_status acpi_set_firmware_waking_vector(u32 physical_address);