aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hardware/hwsleep.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-10-10 01:00:45 -0400
committerLen Brown <len.brown@intel.com>2007-10-10 01:00:45 -0400
commit00a2b433557f10736e8a02de619b3e9052556c12 (patch)
treedec892a10006763f7b7c3818a0099bb7730793da /drivers/acpi/hardware/hwsleep.c
parentde85871a9a53c00cae4c3a70849b5eaad0eb38b2 (diff)
parent2d571b33cf7efd6a894e765e3cb45587ec5b834a (diff)
Pull acpica into test branch
Diffstat (limited to 'drivers/acpi/hardware/hwsleep.c')
-rw-r--r--drivers/acpi/hardware/hwsleep.c30
1 files changed, 11 insertions, 19 deletions
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
index 8181afbd1d4d..81b248429703 100644
--- a/drivers/acpi/hardware/hwsleep.c
+++ b/drivers/acpi/hardware/hwsleep.c
@@ -309,8 +309,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
309 309
310 /* Get current value of PM1A control */ 310 /* Get current value of PM1A control */
311 311
312 status = acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK, 312 status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, &PM1Acontrol);
313 ACPI_REGISTER_PM1_CONTROL, &PM1Acontrol);
314 if (ACPI_FAILURE(status)) { 313 if (ACPI_FAILURE(status)) {
315 return_ACPI_STATUS(status); 314 return_ACPI_STATUS(status);
316 } 315 }
@@ -337,15 +336,13 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
337 336
338 /* Write #1: fill in SLP_TYP data */ 337 /* Write #1: fill in SLP_TYP data */
339 338
340 status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, 339 status = acpi_hw_register_write(ACPI_REGISTER_PM1A_CONTROL,
341 ACPI_REGISTER_PM1A_CONTROL,
342 PM1Acontrol); 340 PM1Acontrol);
343 if (ACPI_FAILURE(status)) { 341 if (ACPI_FAILURE(status)) {
344 return_ACPI_STATUS(status); 342 return_ACPI_STATUS(status);
345 } 343 }
346 344
347 status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, 345 status = acpi_hw_register_write(ACPI_REGISTER_PM1B_CONTROL,
348 ACPI_REGISTER_PM1B_CONTROL,
349 PM1Bcontrol); 346 PM1Bcontrol);
350 if (ACPI_FAILURE(status)) { 347 if (ACPI_FAILURE(status)) {
351 return_ACPI_STATUS(status); 348 return_ACPI_STATUS(status);
@@ -360,15 +357,13 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
360 357
361 ACPI_FLUSH_CPU_CACHE(); 358 ACPI_FLUSH_CPU_CACHE();
362 359
363 status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, 360 status = acpi_hw_register_write(ACPI_REGISTER_PM1A_CONTROL,
364 ACPI_REGISTER_PM1A_CONTROL,
365 PM1Acontrol); 361 PM1Acontrol);
366 if (ACPI_FAILURE(status)) { 362 if (ACPI_FAILURE(status)) {
367 return_ACPI_STATUS(status); 363 return_ACPI_STATUS(status);
368 } 364 }
369 365
370 status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, 366 status = acpi_hw_register_write(ACPI_REGISTER_PM1B_CONTROL,
371 ACPI_REGISTER_PM1B_CONTROL,
372 PM1Bcontrol); 367 PM1Bcontrol);
373 if (ACPI_FAILURE(status)) { 368 if (ACPI_FAILURE(status)) {
374 return_ACPI_STATUS(status); 369 return_ACPI_STATUS(status);
@@ -388,8 +383,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
388 */ 383 */
389 acpi_os_stall(10000000); 384 acpi_os_stall(10000000);
390 385
391 status = acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, 386 status = acpi_hw_register_write(ACPI_REGISTER_PM1_CONTROL,
392 ACPI_REGISTER_PM1_CONTROL,
393 sleep_enable_reg_info-> 387 sleep_enable_reg_info->
394 access_bit_mask); 388 access_bit_mask);
395 if (ACPI_FAILURE(status)) { 389 if (ACPI_FAILURE(status)) {
@@ -400,7 +394,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
400 /* Wait until we enter sleep state */ 394 /* Wait until we enter sleep state */
401 395
402 do { 396 do {
403 status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value); 397 status = acpi_get_register_unlocked(ACPI_BITREG_WAKE_STATUS,
398 &in_value);
404 if (ACPI_FAILURE(status)) { 399 if (ACPI_FAILURE(status)) {
405 return_ACPI_STATUS(status); 400 return_ACPI_STATUS(status);
406 } 401 }
@@ -516,8 +511,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
516 511
517 /* Get current value of PM1A control */ 512 /* Get current value of PM1A control */
518 513
519 status = acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK, 514 status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL,
520 ACPI_REGISTER_PM1_CONTROL,
521 &PM1Acontrol); 515 &PM1Acontrol);
522 if (ACPI_SUCCESS(status)) { 516 if (ACPI_SUCCESS(status)) {
523 517
@@ -539,11 +533,9 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
539 533
540 /* Just ignore any errors */ 534 /* Just ignore any errors */
541 535
542 (void)acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, 536 (void)acpi_hw_register_write(ACPI_REGISTER_PM1A_CONTROL,
543 ACPI_REGISTER_PM1A_CONTROL,
544 PM1Acontrol); 537 PM1Acontrol);
545 (void)acpi_hw_register_write(ACPI_MTX_DO_NOT_LOCK, 538 (void)acpi_hw_register_write(ACPI_REGISTER_PM1B_CONTROL,
546 ACPI_REGISTER_PM1B_CONTROL,
547 PM1Bcontrol); 539 PM1Bcontrol);
548 } 540 }
549 } 541 }