soc/intel/common/acpi: Add dynamic method around sleep

Declare plaform level hook method before and after system sleep for
possible power management related usage.

BUG=N/A
TEST=pass with make what-jenkins-does

Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Change-Id: Ie63711748b6dbb99d34910824f2059464543e162
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32366
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Lijian Zhao 2019-04-19 16:57:46 -07:00 committed by Patrick Georgi
parent 31438f73c0
commit c5d734b3f9
1 changed files with 12 additions and 0 deletions

View File

@ -17,6 +17,9 @@
#include <include/console/post_codes.h>
External(\_SB.MPTS, MethodObj)
External(\_SB.MWAK, MethodObj)
/* Port 80 POST */
OperationRegion (POST, SystemIO, CONFIG_POST_IO_PORT, 1)
@ -38,6 +41,10 @@ Method (_PTS, 1)
/* Call EC _PTS handler */
\_SB.PCI0.LPCB.EC0.PTS (Arg0)
#endif
If (CondRefOf (\_SB.MPTS))
{
\_SB.MPTS (Arg0)
}
}
/* The _WAK method is called on system wakeup */
@ -46,6 +53,11 @@ Method (_WAK, 1)
{
Store (POST_OS_ENTER_WAKE, DBG0)
If (CondRefOf (\_SB.MWAK))
{
\_SB.MWAK (Arg0)
}
#if CONFIG(SOC_INTEL_COMMON_ACPI_EC_PTS_WAK)
/* Call EC _WAK handler */
\_SB.PCI0.LPCB.EC0.WAK (Arg0)