Patrick Rudolph has uploaded this change for review.

View Change

mb/google/parrot/smihandler: Use new PMBASE API

Change-Id: Ie95d9c04375e0125bae9bc01ae5caef423faf33e
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
---
M src/mainboard/google/parrot/smihandler.c
1 file changed, 3 insertions(+), 8 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/27679/1
diff --git a/src/mainboard/google/parrot/smihandler.c b/src/mainboard/google/parrot/smihandler.c
index 7681065..c8f4063 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>
@@ -54,9 +55,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 +64,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 +76,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 change 27679. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie95d9c04375e0125bae9bc01ae5caef423faf33e
Gerrit-Change-Number: 27679
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro@das-labor.org>