summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/mec1322/lpc.c14
-rw-r--r--chip/npcx/lpc.c13
2 files changed, 18 insertions, 9 deletions
diff --git a/chip/mec1322/lpc.c b/chip/mec1322/lpc.c
index a53a02efad..e58d7138ff 100644
--- a/chip/mec1322/lpc.c
+++ b/chip/mec1322/lpc.c
@@ -294,11 +294,15 @@ DECLARE_HOOK(HOOK_CHIPSET_STARTUP, setup_lpc, HOOK_PRIO_FIRST);
static void lpc_resume(void)
{
- /* Mask all host events until the host unmasks them itself. */
- lpc_set_host_event_mask(LPC_HOST_EVENT_SMI, 0);
- lpc_set_host_event_mask(LPC_HOST_EVENT_SCI, 0);
- lpc_set_host_event_mask(LPC_HOST_EVENT_WAKE, 0);
-
+#ifdef CONFIG_POWER_S0IX
+ if (chipset_in_state(CHIPSET_STATE_SUSPEND | CHIPSET_STATE_ON))
+#endif
+ {
+ /* Mask all host events until the host unmasks them itself. */
+ lpc_set_host_event_mask(LPC_HOST_EVENT_SMI, 0);
+ lpc_set_host_event_mask(LPC_HOST_EVENT_SCI, 0);
+ lpc_set_host_event_mask(LPC_HOST_EVENT_WAKE, 0);
+ }
/* Store port 80 event so we know where resume happened */
port_80_write(PORT_80_EVENT_RESUME);
}
diff --git a/chip/npcx/lpc.c b/chip/npcx/lpc.c
index c86872e927..27cefcfce8 100644
--- a/chip/npcx/lpc.c
+++ b/chip/npcx/lpc.c
@@ -901,10 +901,15 @@ DECLARE_HOOK(HOOK_INIT, lpc_init, HOOK_PRIO_INIT_LPC);
static void lpc_resume(void)
{
- /* Mask all host events until the host unmasks them itself. */
- lpc_set_host_event_mask(LPC_HOST_EVENT_SMI, 0);
- lpc_set_host_event_mask(LPC_HOST_EVENT_SCI, 0);
- lpc_set_host_event_mask(LPC_HOST_EVENT_WAKE, 0);
+#ifdef CONFIG_POWER_S0IX
+ if (chipset_in_state(CHIPSET_STATE_SUSPEND | CHIPSET_STATE_ON))
+#endif
+ {
+ /* Mask all host events until the host unmasks them itself. */
+ lpc_set_host_event_mask(LPC_HOST_EVENT_SMI, 0);
+ lpc_set_host_event_mask(LPC_HOST_EVENT_SCI, 0);
+ lpc_set_host_event_mask(LPC_HOST_EVENT_WAKE, 0);
+ }
/* Store port 80 event so we know where resume happened */
port_80_write(PORT_80_EVENT_RESUME);