[coreboot-gerrit] Change in coreboot[master]: soc/intel/common: Add option to call EC _PTS/_WAK methods

Duncan Laurie (Code Review) gerrit at coreboot.org
Tue Nov 13 03:40:38 CET 2018


Duncan Laurie has submitted this change and it was merged. ( https://review.coreboot.org/29487 )

Change subject: soc/intel/common: Add option to call EC _PTS/_WAK methods
......................................................................

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 at google.com>
Reviewed-on: https://review.coreboot.org/29487
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Furquan Shaikh <furquan at google.com>
---
M src/soc/intel/common/Kconfig
M src/soc/intel/common/acpi/platform.asl
2 files changed, 18 insertions(+), 0 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Furquan Shaikh: Looks good to me, approved



diff --git a/src/soc/intel/common/Kconfig b/src/soc/intel/common/Kconfig
index 42043d7..44d9f23 100644
--- a/src/soc/intel/common/Kconfig
+++ b/src/soc/intel/common/Kconfig
@@ -58,6 +58,13 @@
 	bool
 	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
 	bool
 	default n
diff --git a/src/soc/intel/common/acpi/platform.asl b/src/soc/intel/common/acpi/platform.asl
index 1d0294b..01913b5 100644
--- a/src/soc/intel/common/acpi/platform.asl
+++ b/src/soc/intel/common/acpi/platform.asl
@@ -33,6 +33,11 @@
 Method (_PTS, 1)
 {
 	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 */
@@ -40,5 +45,11 @@
 Method (_WAK, 1)
 {
 	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})
 }

-- 
To view, visit https://review.coreboot.org/29487
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I6bf83509423c0fb07c4890986a189cf54afaed10
Gerrit-Change-Number: 29487
Gerrit-PatchSet: 6
Gerrit-Owner: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Martin Roth <martinroth at google.com>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki at gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-CC: Patrick Georgi <pgeorgi at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181113/20617611/attachment.html>


More information about the coreboot-gerrit mailing list