[coreboot-gerrit] New patch to review for coreboot: 93dd819 chromeec: Add event methods for EC requested throttle

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Dec 3 23:55:54 CET 2013


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4415

-gerrit

commit 93dd81953f80ae5bd0bb636ca594d99d7f3fde2c
Author: Duncan Laurie <dlaurie at chromium.org>
Date:   Wed Jul 31 15:30:41 2013 -0700

    chromeec: Add event methods for EC requested throttle
    
    Two new events possible from the EC for starting and stopping throttle.
    
    These are handled in a per-board method that is defined under the
    thermal zone.  This is not quite where I wanted it but the scoping
    rules in ACPI don't let me have a defined external object in the
    same scope.
    
    Change-Id: I766f07b4365b29df3daa8e45e88f7c38c645c287
    Signed-off-by: Duncan Laurie <dlaurie at chromium.org>
    Reviewed-on: https://gerrit.chromium.org/gerrit/63988
    Reviewed-by: Aaron Durbin <adurbin at chromium.org>
---
 src/ec/google/chromeec/acpi/ec.asl   | 21 +++++++++++++++++++++
 src/ec/google/chromeec/ec_commands.h |  5 +++++
 2 files changed, 26 insertions(+)

diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 24519c2..31ef905 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -23,6 +23,9 @@
  * re-evaluate their _PPC and _CST tables.
  */
 
+// Mainboard specific throttle handler
+External (\_TZ.THRT, MethodObj)
+
 Device (EC0)
 {
 	Name (_HID, EISAID ("PNP0C09"))
@@ -226,6 +229,24 @@ Device (EC0)
 		Store ("EC: KEY PRESSED", Debug)
 	}
 
+	// Throttle Start
+	Method (_Q12, 0, NotSerialized)
+	{
+		Store ("EC: THROTTLE START", Debug)
+		If (CondRefOf (\_TZ.THRT, Local0)) {
+			\_TZ.THRT (1)
+		}
+	}
+
+	// Throttle Stop
+	Method (_Q13, 0, NotSerialized)
+	{
+		Store ("EC: THROTTLE STOP", Debug)
+		If (CondRefOf (\_TZ.THRT, Local0)) {
+			\_TZ.THRT (0)
+		}
+	}
+
 	#include "ac.asl"
 	#include "battery.asl"
 }
diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h
index baf16d3..d4992a1 100644
--- a/src/ec/google/chromeec/ec_commands.h
+++ b/src/ec/google/chromeec/ec_commands.h
@@ -239,6 +239,11 @@ enum host_event_code {
 	/* Shutdown due to battery level too low */
 	EC_HOST_EVENT_BATTERY_SHUTDOWN = 17,
 
+        /* Suggest that the AP throttle itself */
+        EC_HOST_EVENT_THROTTLE_START = 18,
+        /* Suggest that the AP resume normal speed */
+        EC_HOST_EVENT_THROTTLE_STOP = 19,
+
 	/*
 	 * The high bit of the event mask is not used as a host event code.  If
 	 * it reads back as set, then the entire event mask should be



More information about the coreboot-gerrit mailing list