[coreboot-gerrit] Change in coreboot[master]: soc/intel/common: Call EC _PTS/_WAK methods if defined

Duncan Laurie (Code Review) gerrit at coreboot.org
Tue Nov 6 00:43:47 CET 2018


Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/29487


Change subject: soc/intel/common: Call EC _PTS/_WAK methods if defined
......................................................................

soc/intel/common: Call EC _PTS/_WAK methods if defined

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 uses CondRefOf
to check if the EC method exists, and if so will call it, providing
the same argument that was passed to the system level methods.

Change-Id: I6bf83509423c0fb07c4890986a189cf54afaed10
Signed-off-by: Duncan Laurie <dlaurie at google.com>
---
M src/soc/intel/common/acpi/platform.asl
1 file changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/87/29487/1

diff --git a/src/soc/intel/common/acpi/platform.asl b/src/soc/intel/common/acpi/platform.asl
index 1d0294b..6647f77 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)
+
+	/* Call EC _PTS handler if present */
+	If (CondRefOf (\_SB.PCI0.LPCB.EC0.PTS)) {
+		\_SB.PCI0.LPCB.EC0.PTS (Arg0)
+	}
 }
 
 /* The _WAK method is called on system wakeup */
@@ -40,5 +45,11 @@
 Method (_WAK, 1)
 {
 	Store (POST_OS_ENTER_WAKE, DBG0)
+
+	/* Call EC _PTS handler if present */
+	If (CondRefOf (\_SB.PCI0.LPCB.EC0.WAK)) {
+		\_SB.PCI0.LPCB.EC0.WAK (Arg0)
+	}
+
 	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: newchange
Gerrit-Change-Id: I6bf83509423c0fb07c4890986a189cf54afaed10
Gerrit-Change-Number: 29487
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie at chromium.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181105/d6a0c311/attachment-0001.html>


More information about the coreboot-gerrit mailing list