[coreboot-gerrit] Change in coreboot[master]: mb/google/parrot: Use new common SMBASE API

Patrick Rudolph (Code Review) gerrit at coreboot.org
Fri Jun 29 10:46:29 CEST 2018


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27282


Change subject: mb/google/parrot: Use new common SMBASE API
......................................................................

mb/google/parrot: Use new common SMBASE API

Change-Id: Iee3a7cc3808ad7ec26464e54bf6144b70f426aa6
Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
---
M src/mainboard/google/parrot/smihandler.c
1 file changed, 3 insertions(+), 9 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/27282/1

diff --git a/src/mainboard/google/parrot/smihandler.c b/src/mainboard/google/parrot/smihandler.c
index 7681065..e30f78f 100644
--- a/src/mainboard/google/parrot/smihandler.c
+++ b/src/mainboard/google/parrot/smihandler.c
@@ -20,6 +20,7 @@
 #include <southbridge/intel/bd82x6x/pch.h>
 #include <southbridge/intel/bd82x6x/me.h>
 #include <southbridge/intel/common/pmutil.h>
+#include <southbridge/intel/common/pmbase.h>
 #include <northbridge/intel/sandybridge/sandybridge.h>
 #include <cpu/intel/model_206ax/model_206ax.h>
 #include <elog.h>
@@ -29,7 +30,6 @@
 static u8 mainboard_smi_ec(void)
 {
 	u8 src;
-	u32 pm1_cnt;
 #if IS_ENABLED(CONFIG_ELOG_GSMI)
 	static int battery_critical_logged;
 #endif
@@ -54,9 +54,7 @@
 		elog_add_event_byte(ELOG_TYPE_EC_EVENT, EC_EVENT_LID_CLOSED);
 #endif
 		/* Go to S5 */
-		pm1_cnt = inl(smm_get_pmbase() + PM1_CNT);
-		pm1_cnt |= (0xf << 10);
-		outl(pm1_cnt, smm_get_pmbase() + PM1_CNT);
+		write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10));
 		break;
 	}
 
@@ -65,8 +63,6 @@
 
 void mainboard_smi_gpi(u32 gpi_sts)
 {
-	u32 pm1_cnt;
-
 	printk(BIOS_DEBUG, "mainboard_smi_gpi: %x\n", gpi_sts);
 	if (gpi_sts & (1 << EC_SMI_GPI)) {
 		/* Process all pending events from EC */
@@ -79,9 +75,7 @@
 		elog_add_event_byte(ELOG_TYPE_EC_EVENT, EC_EVENT_LID_CLOSED);
 #endif
 		/* Go to S5 */
-		pm1_cnt = inl(smm_get_pmbase() + PM1_CNT);
-		pm1_cnt |= (0xf << 10);
-		outl(pm1_cnt, smm_get_pmbase() + PM1_CNT);
+		write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10));
 	}
 }
 

-- 
To view, visit https://review.coreboot.org/27282
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: Iee3a7cc3808ad7ec26464e54bf6144b70f426aa6
Gerrit-Change-Number: 27282
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph at 9elements.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180629/d9e5003f/attachment-0001.html>


More information about the coreboot-gerrit mailing list