[coreboot-gerrit] New patch to review for coreboot: soc/intel/quark: Clear SMI and wake events
Leroy P Leahy (leroy.p.leahy@intel.com)
gerrit at coreboot.org
Mon May 23 01:52:25 CEST 2016
Leroy P Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14945
-gerrit
commit 3439a0e25e5482c5e53e8b27db4f13da160c6add
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date: Sun May 22 11:52:28 2016 -0700
soc/intel/quark: Clear SMI and wake events
Migrate the clearing of the SMI interrupts and wake events from FSP into
coreboot.
TEST=Build and run on Galileo Gen2
Change-Id: Ia369801da87a16bc00fb2c05475831ebe8a315f8
Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
src/soc/intel/quark/romstage/romstage.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/soc/intel/quark/romstage/romstage.c b/src/soc/intel/quark/romstage/romstage.c
index 4ed5863..491fd14 100644
--- a/src/soc/intel/quark/romstage/romstage.c
+++ b/src/soc/intel/quark/romstage/romstage.c
@@ -30,6 +30,13 @@
#include <soc/romstage.h>
#include <soc/reg_access.h>
+static const struct reg_script clear_smi_and_wake_events[] = {
+ /* Clear any SMI or wake events */
+ REG_LEG_GPIO_OR(R_QNC_GPE0BLK_GPE0S, B_QNC_GPE0BLK_GPE0S_ALL),
+ REG_LEG_GPIO_OR(R_QNC_GPE0BLK_SMIS, B_QNC_GPE0BLK_SMIS_ALL),
+ REG_SCRIPT_END
+};
+
static const struct reg_script legacy_gpio_init[] = {
/* Temporarily enable the legacy GPIO controller */
REG_PCI_WRITE32(R_QNC_LPC_GBA_BASE, IO_ADDRESS_VALID
@@ -70,6 +77,10 @@ struct chipset_power_state *fill_power_state(void)
ps->prev_sleep_state = 0;
printk(BIOS_DEBUG, "prev_sleep_state %d\n", ps->prev_sleep_state);
+
+ /* Clear SMI and wake events */
+ if (ps->prev_sleep_state != 3)
+ reg_script_run_on_dev(LPC_BDF, clear_smi_and_wake_events);
return ps;
}
More information about the coreboot-gerrit
mailing list