[coreboot-gerrit] New patch to review for coreboot: google/reef: Mainboard gpi handler function
Shaunak Saha (shaunak.saha@intel.com)
gerrit at coreboot.org
Mon Jul 25 07:56:33 CEST 2016
Shaunak Saha (shaunak.saha at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15834
-gerrit
commit 45eee7b8d0cadf12b189bf71174fc7ccb8db0ab5
Author: Shaunak Saha <shaunak.saha at intel.com>
Date: Sun Jul 24 22:54:13 2016 -0700
google/reef: Mainboard gpi handler function
This patch add mainboard_smi_gpi_handler which handles the
SMI event. This can happen in situations like lidclose and
system goes to shutdown.
BUG=chrome-os-partner:54977
Change-Id: I8ff6001e48dcbbd4cee5097e759352d8fea6189b
Signed-off-by: Shaunak Saha <shaunak.saha at intel.com>
---
src/mainboard/google/reef/ec.h | 3 +++
src/mainboard/google/reef/smihandler.c | 8 ++++++++
2 files changed, 11 insertions(+)
diff --git a/src/mainboard/google/reef/ec.h b/src/mainboard/google/reef/ec.h
index f76c5a8..c39c55f 100644
--- a/src/mainboard/google/reef/ec.h
+++ b/src/mainboard/google/reef/ec.h
@@ -24,6 +24,9 @@
*/
#define EC_SCI_GPI GPE0_DW1_11
+/* EC SMI */
+#define EC_SMI_GPI GPE0_DW2_17
+
/*
* On lidopen/lidclose GPIO_22 from North Community gets toggled and
* is used in _PRW to wake up device from sleep. GPIO_22 maps to
diff --git a/src/mainboard/google/reef/smihandler.c b/src/mainboard/google/reef/smihandler.c
index 05d363f..863d1c3 100644
--- a/src/mainboard/google/reef/smihandler.c
+++ b/src/mainboard/google/reef/smihandler.c
@@ -18,8 +18,16 @@
#include <cpu/x86/smm.h>
#include <ec/google/chromeec/smm.h>
#include <soc/pm.h>
+#include <soc/smm.h>
+#include <soc/gpe.h>
#include "ec.h"
+void mainboard_smi_gpi_handler(const struct gpi_status *sts)
+{
+ if (gpi_status_get(sts, EC_SMI_GPI))
+ chromeec_smi_process_events();
+}
+
void mainboard_smi_sleep(u8 slp_typ)
{
if (slp_typ == ACPI_S3)
More information about the coreboot-gerrit
mailing list