[coreboot-gerrit] New patch to review for coreboot: 5bc50c8 lenovo/x230: Enable wake on LID.
Vladimir Serbinenko (phcoder@gmail.com)
gerrit at coreboot.org
Fri Aug 8 00:00:56 CEST 2014
Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6526
-gerrit
commit 5bc50c8eeb57cd062c573488a9bf02efe0073c59
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date: Fri Aug 8 00:00:20 2014 +0200
lenovo/x230: Enable wake on LID.
Change-Id: Ifc7208400b0bdfa2b9b70773bd24e9f9df7f8048
Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
src/mainboard/lenovo/x230/devicetree.cb | 1 +
src/mainboard/lenovo/x230/smihandler.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/src/mainboard/lenovo/x230/devicetree.cb b/src/mainboard/lenovo/x230/devicetree.cb
index 1a93ad8..2043dd9 100644
--- a/src/mainboard/lenovo/x230/devicetree.cb
+++ b/src/mainboard/lenovo/x230/devicetree.cb
@@ -60,6 +60,7 @@ chip northbridge/intel/sandybridge
register "alt_gp_smi_en" = "0x0000"
register "gpi1_routing" = "2"
register "gpi8_routing" = "2"
+ register "gpi13_routing" = "2"
# Enable SATA ports 0 (HDD bay) & 1 (dock) & 2 (msata)
register "sata_port_map" = "0x7"
diff --git a/src/mainboard/lenovo/x230/smihandler.c b/src/mainboard/lenovo/x230/smihandler.c
index bbe08e2..497f77b 100644
--- a/src/mainboard/lenovo/x230/smihandler.c
+++ b/src/mainboard/lenovo/x230/smihandler.c
@@ -173,3 +173,14 @@ int mainboard_smi_apmc(u8 data)
}
return 0;
}
+
+void mainboard_smi_sleep(u8 slp_typ)
+{
+ if (slp_typ == 3) {
+ u16 pmbase = pci_read_config16(PCI_DEV(0, 0x1f, 0), 0x40) & 0xfffc;
+ u8 ec_wake = ec_read(0x32);
+ /* If EC wake events are enabled, enable wake on EC WAKE GPE. */
+ if (ec_wake & 4)
+ outl(inl(pmbase + GPE0_EN) | (1 << 29), pmbase + GPE0_EN);
+ }
+}
More information about the coreboot-gerrit
mailing list