diff options
Diffstat (limited to 'drivers/acpi/hardware/hwgpe.c')
-rw-r--r-- | drivers/acpi/hardware/hwgpe.c | 49 |
1 files changed, 19 insertions, 30 deletions
diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c index 5ab7cac6fbb9..09aaeaac3d0b 100644 --- a/drivers/acpi/hardware/hwgpe.c +++ b/drivers/acpi/hardware/hwgpe.c | |||
@@ -81,8 +81,7 @@ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
81 | 81 | ||
82 | /* Get current value of the enable register that contains this GPE */ | 82 | /* Get current value of the enable register that contains this GPE */ |
83 | 83 | ||
84 | status = acpi_hw_low_level_read(ACPI_GPE_REGISTER_WIDTH, &enable_mask, | 84 | status = acpi_read(&enable_mask, &gpe_register_info->enable_address); |
85 | &gpe_register_info->enable_address); | ||
86 | if (ACPI_FAILURE(status)) { | 85 | if (ACPI_FAILURE(status)) { |
87 | return (status); | 86 | return (status); |
88 | } | 87 | } |
@@ -96,9 +95,7 @@ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) | |||
96 | 95 | ||
97 | /* Write the updated enable mask */ | 96 | /* Write the updated enable mask */ |
98 | 97 | ||
99 | status = acpi_hw_low_level_write(ACPI_GPE_REGISTER_WIDTH, enable_mask, | 98 | status = acpi_write(enable_mask, &gpe_register_info->enable_address); |
100 | &gpe_register_info->enable_address); | ||
101 | |||
102 | return (status); | 99 | return (status); |
103 | } | 100 | } |
104 | 101 | ||
@@ -133,8 +130,8 @@ acpi_hw_write_gpe_enable_reg(struct acpi_gpe_event_info * gpe_event_info) | |||
133 | 130 | ||
134 | /* Write the entire GPE (runtime) enable register */ | 131 | /* Write the entire GPE (runtime) enable register */ |
135 | 132 | ||
136 | status = acpi_hw_low_level_write(8, gpe_register_info->enable_for_run, | 133 | status = acpi_write(gpe_register_info->enable_for_run, |
137 | &gpe_register_info->enable_address); | 134 | &gpe_register_info->enable_address); |
138 | 135 | ||
139 | return (status); | 136 | return (status); |
140 | } | 137 | } |
@@ -167,9 +164,8 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info) | |||
167 | * Write a one to the appropriate bit in the status register to | 164 | * Write a one to the appropriate bit in the status register to |
168 | * clear this GPE. | 165 | * clear this GPE. |
169 | */ | 166 | */ |
170 | status = acpi_hw_low_level_write(8, register_bit, | 167 | status = acpi_write(register_bit, |
171 | &gpe_event_info->register_info-> | 168 | &gpe_event_info->register_info->status_address); |
172 | status_address); | ||
173 | 169 | ||
174 | return (status); | 170 | return (status); |
175 | } | 171 | } |
@@ -228,9 +224,7 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info, | |||
228 | 224 | ||
229 | /* GPE currently active (status bit == 1)? */ | 225 | /* GPE currently active (status bit == 1)? */ |
230 | 226 | ||
231 | status = | 227 | status = acpi_read(&in_byte, &gpe_register_info->status_address); |
232 | acpi_hw_low_level_read(8, &in_byte, | ||
233 | &gpe_register_info->status_address); | ||
234 | if (ACPI_FAILURE(status)) { | 228 | if (ACPI_FAILURE(status)) { |
235 | goto unlock_and_exit; | 229 | goto unlock_and_exit; |
236 | } | 230 | } |
@@ -273,9 +267,9 @@ acpi_hw_disable_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
273 | 267 | ||
274 | /* Disable all GPEs in this register */ | 268 | /* Disable all GPEs in this register */ |
275 | 269 | ||
276 | status = acpi_hw_low_level_write(8, 0x00, | 270 | status = |
277 | &gpe_block->register_info[i]. | 271 | acpi_write(0x00, |
278 | enable_address); | 272 | &gpe_block->register_info[i].enable_address); |
279 | if (ACPI_FAILURE(status)) { | 273 | if (ACPI_FAILURE(status)) { |
280 | return (status); | 274 | return (status); |
281 | } | 275 | } |
@@ -310,9 +304,9 @@ acpi_hw_clear_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
310 | 304 | ||
311 | /* Clear status on all GPEs in this register */ | 305 | /* Clear status on all GPEs in this register */ |
312 | 306 | ||
313 | status = acpi_hw_low_level_write(8, 0xFF, | 307 | status = |
314 | &gpe_block->register_info[i]. | 308 | acpi_write(0xFF, |
315 | status_address); | 309 | &gpe_block->register_info[i].status_address); |
316 | if (ACPI_FAILURE(status)) { | 310 | if (ACPI_FAILURE(status)) { |
317 | return (status); | 311 | return (status); |
318 | } | 312 | } |
@@ -353,12 +347,9 @@ acpi_hw_enable_runtime_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
353 | 347 | ||
354 | /* Enable all "runtime" GPEs in this register */ | 348 | /* Enable all "runtime" GPEs in this register */ |
355 | 349 | ||
356 | status = | 350 | status = acpi_write(gpe_block->register_info[i].enable_for_run, |
357 | acpi_hw_low_level_write(8, | 351 | &gpe_block->register_info[i]. |
358 | gpe_block->register_info[i]. | 352 | enable_address); |
359 | enable_for_run, | ||
360 | &gpe_block->register_info[i]. | ||
361 | enable_address); | ||
362 | if (ACPI_FAILURE(status)) { | 353 | if (ACPI_FAILURE(status)) { |
363 | return (status); | 354 | return (status); |
364 | } | 355 | } |
@@ -398,11 +389,9 @@ acpi_hw_enable_wakeup_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info, | |||
398 | 389 | ||
399 | /* Enable all "wake" GPEs in this register */ | 390 | /* Enable all "wake" GPEs in this register */ |
400 | 391 | ||
401 | status = acpi_hw_low_level_write(8, | 392 | status = acpi_write(gpe_block->register_info[i].enable_for_wake, |
402 | gpe_block->register_info[i]. | 393 | &gpe_block->register_info[i]. |
403 | enable_for_wake, | 394 | enable_address); |
404 | &gpe_block->register_info[i]. | ||
405 | enable_address); | ||
406 | if (ACPI_FAILURE(status)) { | 395 | if (ACPI_FAILURE(status)) { |
407 | return (status); | 396 | return (status); |
408 | } | 397 | } |