diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2017-07-24 16:24:14 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-07-25 14:04:08 -0700 |
commit | d483c289a91c84f8f2af3a8618383f5f738d02e1 (patch) | |
tree | e5097a3552d93be1ed659b1ede7b5daef3cc5a8c | |
parent | ce12536c6926a1ae9bbb3cc2f8dfb69e4c66ceda (diff) | |
download | chrome-ec-d483c289a91c84f8f2af3a8618383f5f738d02e1.tar.gz |
npcx: gpio: Clear GPIO interrupt if no ISR is available
If we have no ISR for an enabled GPIO interrupt (eg. for a UART GPIO
interrupt that wakes from low-power idle) then clear it, to avoid
interrupt storm.
BUG=b:63958831
BRANCH=eve
TEST=Verify we can repeatedly wake from low-power idle on eve by hitting
'enter' on the EC console.
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Change-Id: I6a01cae33e3bf1a3b5b42c0389c4613dc1cb9b7d
Reviewed-on: https://chromium-review.googlesource.com/584011
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Mulin Chao <mlchao@nuvoton.com>
-rw-r--r-- | chip/npcx/gpio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chip/npcx/gpio.c b/chip/npcx/gpio.c index 01d47850ae..47bc6bc59a 100644 --- a/chip/npcx/gpio.c +++ b/chip/npcx/gpio.c @@ -487,6 +487,10 @@ static void gpio_interrupt(struct npcx_wui wui_int) wui_mask &= ~pin_mask; } } + + if (wui_mask) + /* No ISR for this interrupt, just clear it */ + NPCX_WKPCL(table, group) = wui_mask; } /** |