aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/events/evgpeblk.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-12-31 02:55:32 +0800
committerLen Brown <len.brown@intel.com>2008-12-31 01:12:56 -0500
commitecfbbc7b46f74ca48b9f42132739114c9e70f8e4 (patch)
tree99ff958735f35d812cf25075cc19d4c0f5c0ecb1 /drivers/acpi/events/evgpeblk.c
parent385c4d98d851bc94ad4f351fe25fe49b70b9cf78 (diff)
ACPICA: New: acpi_read and acpi_write public interfaces
Changed the acpi_hw_low_level_read and acpi_hw_low_level_write functions to the public acpi_read and acpi_write to allow direct access to ACPI registers. Removed the "width" parameter since the width can be obtained from the input GAS structure. Updated the FADT initialization to setup the GAS structures with the proper widths. Some widths are still hardcoded because many FADTs have incorrect register lengths. 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>
Diffstat (limited to 'drivers/acpi/events/evgpeblk.c')
-rw-r--r--drivers/acpi/events/evgpeblk.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index 2872be2b9be..488503ffcd3 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -830,10 +830,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
ACPI_GPE_REGISTER_WIDTH;
this_register->enable_address.bit_width =
ACPI_GPE_REGISTER_WIDTH;
- this_register->status_address.bit_offset =
- ACPI_GPE_REGISTER_WIDTH;
- this_register->enable_address.bit_offset =
- ACPI_GPE_REGISTER_WIDTH;
+ this_register->status_address.bit_offset = 0;
+ this_register->enable_address.bit_offset = 0;
/* Init the event_info for each GPE within this register */
@@ -846,18 +844,14 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
/* Disable all GPEs within this register */
- status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, 0x00,
- &this_register->
- enable_address);
+ status = acpi_write(0x00, &this_register->enable_address);
if (ACPI_FAILURE(status)) {
goto error_exit;
}
/* Clear any pending GPE events within this register */
- status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, 0xFF,
- &this_register->
- status_address);
+ status = acpi_write(0xFF, &this_register->status_address);
if (ACPI_FAILURE(status)) {
goto error_exit;
}