From b81dc021b3e3311e46f9e81de4f09855536e8147 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Tue, 20 Mar 2012 18:17:33 +0000 Subject: Import ACPICA 20120320. --- source/components/hardware/hwsleep.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'source/components/hardware/hwsleep.c') diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c index 0d311435555a..1953ff846e80 100644 --- a/source/components/hardware/hwsleep.c +++ b/source/components/hardware/hwsleep.c @@ -55,6 +55,7 @@ * FUNCTION: AcpiHwLegacySleep * * PARAMETERS: SleepState - Which sleep state to enter + * Flags - ACPI_EXECUTE_GTS to run optional method * * RETURN: Status * @@ -65,7 +66,8 @@ ACPI_STATUS AcpiHwLegacySleep ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo; ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo; @@ -128,9 +130,12 @@ AcpiHwLegacySleep ( return_ACPI_STATUS (Status); } - /* Execute the _GTS method (Going To Sleep) */ + /* Optionally execute _GTS (Going To Sleep) */ - AcpiHwExecuteSleepMethod (METHOD_NAME__GTS, SleepState); + if (Flags & ACPI_EXECUTE_GTS) + { + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__GTS, SleepState); + } /* Get current value of PM1A control */ @@ -228,6 +233,7 @@ AcpiHwLegacySleep ( * FUNCTION: AcpiHwLegacyWakePrep * * PARAMETERS: SleepState - Which sleep state we just exited + * Flags - ACPI_EXECUTE_BFS to run optional method * * RETURN: Status * @@ -239,7 +245,8 @@ AcpiHwLegacySleep ( ACPI_STATUS AcpiHwLegacyWakePrep ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_STATUS Status; ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo; @@ -289,7 +296,12 @@ AcpiHwLegacyWakePrep ( } } - AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState); + /* Optionally execute _BFS (Back From Sleep) */ + + if (Flags & ACPI_EXECUTE_BFS) + { + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__BFS, SleepState); + } return_ACPI_STATUS (Status); } @@ -299,6 +311,7 @@ AcpiHwLegacyWakePrep ( * FUNCTION: AcpiHwLegacyWake * * PARAMETERS: SleepState - Which sleep state we just exited + * Flags - Reserved, set to zero * * RETURN: Status * @@ -309,7 +322,8 @@ AcpiHwLegacyWakePrep ( ACPI_STATUS AcpiHwLegacyWake ( - UINT8 SleepState) + UINT8 SleepState, + UINT8 Flags) { ACPI_STATUS Status; @@ -320,7 +334,7 @@ AcpiHwLegacyWake ( /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */ AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID; - AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WAKING); /* * GPEs must be enabled before _WAK is called as GPEs @@ -346,7 +360,7 @@ AcpiHwLegacyWake ( * Now we can execute _WAK, etc. Some machines require that the GPEs * are enabled before the wake methods are executed. */ - AcpiHwExecuteSleepMethod (METHOD_NAME__WAK, SleepState); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__WAK, SleepState); /* * Some BIOS code assumes that WAK_STS will be cleared on resume @@ -377,7 +391,7 @@ AcpiHwLegacyWake ( return_ACPI_STATUS (Status); } - AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING); + AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING); return_ACPI_STATUS (Status); } -- cgit v1.2.3