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>
This commit is contained in:
Patrick Rudolph 2018-06-28 14:09:56 +02:00 committed by Patrick Georgi
parent a28eb8b2f4
commit e67f626664
2 changed files with 4 additions and 8 deletions

View File

@ -22,6 +22,7 @@
#include <device/device.h> #include <device/device.h>
#include <device/pci.h> #include <device/pci.h>
#include <southbridge/intel/bd82x6x/pch.h> #include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/common/pmbase.h>
#include <elog.h> #include <elog.h>
#include "ec.h" #include "ec.h"
@ -64,7 +65,6 @@ void stout_ec_init(void)
void stout_ec_finalize_smm(void) void stout_ec_finalize_smm(void)
{ {
u8 ec_reg, critical_shutdown = 0; u8 ec_reg, critical_shutdown = 0;
u32 pm1_cnt;
/* /*
* Check EC for error conditions. * Check EC for error conditions.
@ -115,9 +115,7 @@ void stout_ec_finalize_smm(void)
printk(BIOS_ERR, "EC critical_shutdown"); printk(BIOS_ERR, "EC critical_shutdown");
/* Go to S5 */ /* Go to S5 */
pm1_cnt = inl(smm_get_pmbase() + PM1_CNT); write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10));
pm1_cnt |= (0xf << 10);
outl(pm1_cnt, smm_get_pmbase() + PM1_CNT);
} }
} }
#endif //__SMM__ #endif //__SMM__

View File

@ -19,6 +19,7 @@
#include <southbridge/intel/bd82x6x/nvs.h> #include <southbridge/intel/bd82x6x/nvs.h>
#include <southbridge/intel/bd82x6x/pch.h> #include <southbridge/intel/bd82x6x/pch.h>
#include <southbridge/intel/bd82x6x/me.h> #include <southbridge/intel/bd82x6x/me.h>
#include <southbridge/intel/common/pmbase.h>
#include <northbridge/intel/sandybridge/sandybridge.h> #include <northbridge/intel/sandybridge/sandybridge.h>
#include <cpu/intel/model_206ax/model_206ax.h> #include <cpu/intel/model_206ax/model_206ax.h>
@ -29,15 +30,12 @@
static u8 mainboard_smi_ec(void) static u8 mainboard_smi_ec(void)
{ {
u8 cmd = ec_it8518_get_event(); u8 cmd = ec_it8518_get_event();
u32 pm1_cnt;
switch (cmd) { switch (cmd) {
case EC_SMI_LID_CLOSED: case EC_SMI_LID_CLOSED:
printk(BIOS_DEBUG, "LID CLOSED, SHUTDOWN\n"); printk(BIOS_DEBUG, "LID CLOSED, SHUTDOWN\n");
/* Go to S5 */ /* Go to S5 */
pm1_cnt = inl(smm_get_pmbase() + PM1_CNT); write_pmbase32(PM1_CNT, read_pmbase32(PM1_CNT) | (0xf << 10));
pm1_cnt |= (0xf << 10);
outl(pm1_cnt, smm_get_pmbase() + PM1_CNT);
break; break;
} }