From a45ba126d6ed553571e885331ce68d6a91a69f97 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 17 Oct 2016 13:49:14 -0700 Subject: [PATCH] npcx: lpc: Fix SMI generation The check for whether or not to send an SMI needs to check the same status bit that it is using to indicate that it is going to send an SMI. The SMIE bit is enabled in lpc_init() so it is always set. BUG=chrome-os-partner:58666 BRANCH=none TEST=shutdown with lid close event at developer screen Change-Id: I9a0f34025c4fa11175fca7be34224ec680bffbef Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/400033 Reviewed-by: Shawn N --- chip/npcx/lpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chip/npcx/lpc.c b/chip/npcx/lpc.c index 6b4a93193f..ef60ba56a8 100644 --- a/chip/npcx/lpc.c +++ b/chip/npcx/lpc.c @@ -321,7 +321,7 @@ static void update_host_event_status(void) lpc_task_disable_irq(); if (host_events & event_mask[LPC_HOST_EVENT_SMI]) { /* Only generate SMI for first event */ - if (!(NPCX_HIPMIE(PMC_ACPI) & NPCX_HIPMIE_SMIE)) + if (!(NPCX_HIPMST(PMC_ACPI) & NPCX_HIPMST_ST2)) need_smi = 1; SET_BIT(NPCX_HIPMST(PMC_ACPI), NPCX_HIPMST_ST2); } else