aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/events/evgpeblk.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-12-30 13:55:32 -0500
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 2872be2b9be5..488503ffcd3e 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)
830 ACPI_GPE_REGISTER_WIDTH; 830 ACPI_GPE_REGISTER_WIDTH;
831 this_register->enable_address.bit_width = 831 this_register->enable_address.bit_width =
832 ACPI_GPE_REGISTER_WIDTH; 832 ACPI_GPE_REGISTER_WIDTH;
833 this_register->status_address.bit_offset = 833 this_register->status_address.bit_offset = 0;
834 ACPI_GPE_REGISTER_WIDTH; 834 this_register->enable_address.bit_offset = 0;
835 this_register->enable_address.bit_offset =
836 ACPI_GPE_REGISTER_WIDTH;
837 835
838 /* Init the event_info for each GPE within this register */ 836 /* Init the event_info for each GPE within this register */
839 837
@@ -846,18 +844,14 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
846 844
847 /* Disable all GPEs within this register */ 845 /* Disable all GPEs within this register */
848 846
849 status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, 0x00, 847 status = acpi_write(0x00, &this_register->enable_address);
850 &this_register->
851 enable_address);
852 if (ACPI_FAILURE(status)) { 848 if (ACPI_FAILURE(status)) {
853 goto error_exit; 849 goto error_exit;
854 } 850 }
855 851
856 /* Clear any pending GPE events within this register */ 852 /* Clear any pending GPE events within this register */
857 853
858 status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, 0xFF, 854 status = acpi_write(0xFF, &this_register->status_address);
859 &this_register->
860 status_address);
861 if (ACPI_FAILURE(status)) { 855 if (ACPI_FAILURE(status)) {
862 goto error_exit; 856 goto error_exit;
863 } 857 }