[coreboot-gerrit] New patch to review for coreboot: de9f250 chromeec: Add ACPI device for PD MCU and handle related EC host event

Marc Jones (marc.jones@se-eng.com) gerrit at coreboot.org
Tue Mar 24 21:36:20 CET 2015


Marc Jones (marc.jones at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8968

-gerrit

commit de9f25080798f3acb7040ab753124d170d366c56
Author: Shawn Nematbakhsh <shawnn at chromium.org>
Date:   Thu Aug 28 11:33:41 2014 -0700

    chromeec: Add ACPI device for PD MCU and handle related EC host event
    
    Add ACPI device for PD MCU, if present. Call Notify routine when the
    corresponding EC host event is received.
    
    BUG=chrome-os-partner:31361
    TEST=Manual on Samus. Enable EC_ENABLE_PD_MCU_DEVICE, unmask PD MCU host
    event, and verify ACPI Notify routine is called when host event is sent
    from EC.
    BRANCH=None.
    
    Original-Change-Id: I6db61031e434d7ecb211802a4caeaba051e22a28
    Original-Signed-off-by: Shawn Nematbakhsh <shawnn at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/214809
    Original-Reviewed-by: Duncan Laurie <dlaurie at chromium.org>
    Original-Reviewed-by: Alec Berg <alecaberg at chromium.org>
    (cherry picked from commit 226b349e40ed8eacce20d0a8063877382f707c69)
    Signed-off-by: Marc Jones <marc.jones at se-eng.com>
    
    Change-Id: Iecff6c06f1b37651ff61e36d6085d397d66f861c
---
 src/ec/google/chromeec/acpi/ec.asl   | 13 +++++++++++++
 src/ec/google/chromeec/acpi/pd.asl   | 25 +++++++++++++++++++++++++
 src/ec/google/chromeec/ec_commands.h |  1 +
 3 files changed, 39 insertions(+)

diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index 2760f19..734d223 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -303,6 +303,15 @@ Device (EC0)
 		}
 	}
 
+#ifdef EC_ENABLE_PD_MCU_DEVICE
+	// PD event
+	Method (_Q16, 0, NotSerialized)
+	{
+		Store ("EC: GOT PD EVENT", Debug)
+		Notify (ECPD, 0x80)
+	}
+#endif
+
 	/*
 	 * Dynamic Platform Thermal Framework support
 	 */
@@ -435,4 +444,8 @@ Device (EC0)
 #ifdef EC_ENABLE_ALS_DEVICE
 	#include "als.asl"
 #endif
+
+#ifdef EC_ENABLE_PD_MCU_DEVICE
+	#include "pd.asl"
+#endif
 }
diff --git a/src/ec/google/chromeec/acpi/pd.asl b/src/ec/google/chromeec/acpi/pd.asl
new file mode 100644
index 0000000..a1acc2c
--- /dev/null
+++ b/src/ec/google/chromeec/acpi/pd.asl
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Google Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+Device (ECPD)
+{
+	Name (_HID, "GOOG0003")
+	Name (_UID, 1)
+	Name (_DDN, "EC PD Device")
+}
diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h
index bf7aa6b..f8884f3 100644
--- a/src/ec/google/chromeec/ec_commands.h
+++ b/src/ec/google/chromeec/ec_commands.h
@@ -253,6 +253,7 @@ enum host_event_code {
 	EC_HOST_EVENT_HANG_DETECT = 20,
 	/* Hang detect logic detected a hang and warm rebooted the AP */
 	EC_HOST_EVENT_HANG_REBOOT = 21,
+	EC_HOST_EVENT_PD_MCU = 22,
 
 	/*
 	 * The high bit of the event mask is not used as a host event code.  If



More information about the coreboot-gerrit mailing list