summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2018-06-28 14:09:56 +0200
committerPatrick Georgi <pgeorgi@google.com>2018-07-30 18:59:20 +0000
commite67f626664a1c9c6f21fe903cb37a2a57992fbba (patch)
tree1497fa57e7e09c2c12210fc4986e627136e65d0b
parenta28eb8b2f4d4ecec312ebbc3995ae5949d3988f0 (diff)
mb/google/stout: Use new PMBASE API
Change-Id: Ibb13627bcd2ad023f7686b5ae0bd7331e09cf5b4 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/27283 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
-rw-r--r--src/mainboard/google/stout/ec.c6
-rw-r--r--src/mainboard/google/stout/mainboard_smi.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/mainboard/google/stout/ec.c b/src/mainboard/google/stout/ec.c
index a459d0cd7f..229f919a53 100644
--- a/src/mainboard/google/stout/ec.c
+++ b/src/mainboard/google/stout/ec.c
@@ -22,6 +22,7 @@
#include <device/device.h>
#include <device/pci.h>
#include <southbridge/intel/bd82x6x/pch.h>
+#include <southbridge/intel/common/pmbase.h>
#include <elog.h>
#include "ec.h"
@@ -64,7 +65,6 @@ void stout_ec_init(void)
void stout_ec_finalize_smm(void)
{
u8 ec_reg, critical_shutdown = 0;
- u32 pm1_cnt;
/*
* Check EC for error conditions.
@@ -115,9 +115,7 @@ void stout_ec_finalize_smm(void)
printk(BIOS_ERR, "EC critical_shutdown");
/* 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));
}
}
#endif //__SMM__
diff --git a/src/mainboard/google/stout/mainboard_smi.c b/src/mainboard/google/stout/mainboard_smi.c
index e25c576ba1..6a516455a1 100644
--- a/src/mainboard/google/stout/mainboard_smi.c
+++ b/src/mainboard/google/stout/mainboard_smi.c
@@ -19,6 +19,7 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h>
+#include <southbridge/intel/common/pmbase.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <cpu/intel/model_206ax/model_206ax.h>
@@ -29,15 +30,12 @@
static u8 mainboard_smi_ec(void)
{
u8 cmd = ec_it8518_get_event();
- u32 pm1_cnt;
switch (cmd) {
case EC_SMI_LID_CLOSED:
printk(BIOS_DEBUG, "LID CLOSED, SHUTDOWN\n");
/* 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;
}