Commit 9358a201 authored by Andy Grover's avatar Andy Grover

ACPI: S3 fixes (Ole Rohne)

parent 7eb7c27a
...@@ -250,7 +250,7 @@ acpi_enter_sleep_state ( ...@@ -250,7 +250,7 @@ acpi_enter_sleep_state (
/* Get current value of PM1A control */ /* Get current value of PM1A control */
status = acpi_hw_register_read (ACPI_MTX_LOCK, ACPI_REGISTER_PM1_CONTROL, &PM1Acontrol); status = acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_CONTROL, &PM1Acontrol);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
...@@ -268,12 +268,12 @@ acpi_enter_sleep_state ( ...@@ -268,12 +268,12 @@ acpi_enter_sleep_state (
/* Write #1: fill in SLP_TYP data */ /* Write #1: fill in SLP_TYP data */
status = acpi_hw_register_write (ACPI_MTX_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol); status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
status = acpi_hw_register_write (ACPI_MTX_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol); status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
...@@ -287,12 +287,12 @@ acpi_enter_sleep_state ( ...@@ -287,12 +287,12 @@ acpi_enter_sleep_state (
ACPI_FLUSH_CPU_CACHE (); ACPI_FLUSH_CPU_CACHE ();
status = acpi_hw_register_write (ACPI_MTX_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol); status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
status = acpi_hw_register_write (ACPI_MTX_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol); status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
...@@ -308,7 +308,7 @@ acpi_enter_sleep_state ( ...@@ -308,7 +308,7 @@ acpi_enter_sleep_state (
*/ */
acpi_os_stall (10000000); acpi_os_stall (10000000);
status = acpi_hw_register_write (ACPI_MTX_LOCK, ACPI_REGISTER_PM1_CONTROL, status = acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_CONTROL,
sleep_enable_reg_info->access_bit_mask); sleep_enable_reg_info->access_bit_mask);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
...@@ -318,7 +318,7 @@ acpi_enter_sleep_state ( ...@@ -318,7 +318,7 @@ acpi_enter_sleep_state (
/* Wait until we enter sleep state */ /* Wait until we enter sleep state */
do { do {
status = acpi_get_register (ACPI_BITREG_WAKE_STATUS, &in_value, ACPI_MTX_LOCK); status = acpi_get_register (ACPI_BITREG_WAKE_STATUS, &in_value, ACPI_MTX_DO_NOT_LOCK);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
...@@ -327,7 +327,7 @@ acpi_enter_sleep_state ( ...@@ -327,7 +327,7 @@ acpi_enter_sleep_state (
} while (!in_value); } while (!in_value);
status = acpi_set_register (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_LOCK); status = acpi_set_register (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_DO_NOT_LOCK);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
...@@ -359,7 +359,7 @@ acpi_enter_sleep_state_s4bios ( ...@@ -359,7 +359,7 @@ acpi_enter_sleep_state_s4bios (
ACPI_FUNCTION_TRACE ("acpi_enter_sleep_state_s4bios"); ACPI_FUNCTION_TRACE ("acpi_enter_sleep_state_s4bios");
acpi_set_register (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_LOCK); acpi_set_register (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
acpi_hw_clear_acpi_status(); acpi_hw_clear_acpi_status();
acpi_hw_disable_non_wakeup_gpes(); acpi_hw_disable_non_wakeup_gpes();
...@@ -370,7 +370,7 @@ acpi_enter_sleep_state_s4bios ( ...@@ -370,7 +370,7 @@ acpi_enter_sleep_state_s4bios (
do { do {
acpi_os_stall(1000); acpi_os_stall(1000);
status = acpi_get_register (ACPI_BITREG_WAKE_STATUS, &in_value, ACPI_MTX_LOCK); status = acpi_get_register (ACPI_BITREG_WAKE_STATUS, &in_value, ACPI_MTX_DO_NOT_LOCK);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
......
...@@ -237,12 +237,12 @@ acpi_suspend ( ...@@ -237,12 +237,12 @@ acpi_suspend (
acpi_set_firmware_waking_vector((acpi_physical_address) acpi_wakeup_address); acpi_set_firmware_waking_vector((acpi_physical_address) acpi_wakeup_address);
} }
acpi_enter_sleep_state_prep(state);
status = acpi_system_save_state(state); status = acpi_system_save_state(state);
if (!ACPI_SUCCESS(status)) if (!ACPI_SUCCESS(status))
return status; return status;
acpi_enter_sleep_state_prep(state);
/* disable interrupts and flush caches */ /* disable interrupts and flush caches */
ACPI_DISABLE_IRQS(); ACPI_DISABLE_IRQS();
ACPI_FLUSH_CPU_CACHE(); ACPI_FLUSH_CPU_CACHE();
...@@ -254,8 +254,8 @@ acpi_suspend ( ...@@ -254,8 +254,8 @@ acpi_suspend (
* mode. So, we run these unconditionaly to make sure we have a usable system * mode. So, we run these unconditionaly to make sure we have a usable system
* no matter what. * no matter what.
*/ */
acpi_system_restore_state(state);
acpi_leave_sleep_state(state); acpi_leave_sleep_state(state);
acpi_system_restore_state(state);
/* make sure interrupts are enabled */ /* make sure interrupts are enabled */
ACPI_ENABLE_IRQS(); ACPI_ENABLE_IRQS();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment