soc/intel/common: Add option to call EC _PTS/_WAK methods
Some embedded controllers expect to be sent a command when the OS calls the ACPI \_PTS and \_WAK methods. For example see the code in ec/google/wilco/acpi/platform.asl that tells the EC when the methods have been executed by the OS. Not all ECs may define these methods so this change requires also setting a Kconfig option to enable it. Change-Id: I6bf83509423c0fb07c4890986a189cf54afaed10 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/29487 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
parent
92332635bf
commit
0dd913510a
|
@ -58,6 +58,13 @@ config SOC_INTEL_COMMON_ACPI
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
||||||
|
config SOC_INTEL_COMMON_ACPI_EC_PTS_WAK
|
||||||
|
bool
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Set this option to have the platform level _PTS/_WAK methods call
|
||||||
|
methods provided by the Embedded Controller.
|
||||||
|
|
||||||
config SOC_INTEL_COMMON_NHLT
|
config SOC_INTEL_COMMON_NHLT
|
||||||
bool
|
bool
|
||||||
default n
|
default n
|
||||||
|
|
|
@ -33,6 +33,11 @@ Field (POST, ByteAcc, Lock, Preserve)
|
||||||
Method (_PTS, 1)
|
Method (_PTS, 1)
|
||||||
{
|
{
|
||||||
Store (POST_OS_ENTER_PTS, DBG0)
|
Store (POST_OS_ENTER_PTS, DBG0)
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_SOC_INTEL_COMMON_ACPI_EC_PTS_WAK)
|
||||||
|
/* Call EC _PTS handler */
|
||||||
|
\_SB.PCI0.LPCB.EC0.PTS (Arg0)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The _WAK method is called on system wakeup */
|
/* The _WAK method is called on system wakeup */
|
||||||
|
@ -40,5 +45,11 @@ Method (_PTS, 1)
|
||||||
Method (_WAK, 1)
|
Method (_WAK, 1)
|
||||||
{
|
{
|
||||||
Store (POST_OS_ENTER_WAKE, DBG0)
|
Store (POST_OS_ENTER_WAKE, DBG0)
|
||||||
|
|
||||||
|
#if IS_ENABLED(CONFIG_SOC_INTEL_COMMON_ACPI_EC_PTS_WAK)
|
||||||
|
/* Call EC _WAK handler */
|
||||||
|
\_SB.PCI0.LPCB.EC0.WAK (Arg0)
|
||||||
|
#endif
|
||||||
|
|
||||||
Return (Package(){0,0})
|
Return (Package(){0,0})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue