Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/42877 )
Change subject: soc/amd/common/gpio: Clear interrupt and wake status when configuring pads ......................................................................
soc/amd/common/gpio: Clear interrupt and wake status when configuring pads
This change clears interrupt and wake status for a pad when configuring it. This ensures that stale interrupts/wake notifications are flushed out and do not cause spurious wakes in future suspends.
BUG=b:159944426
Change-Id: Ia4ebd975312a4136f1d0690d7af7372615e31f0f Signed-off-by: Furquan Shaikh furquan@google.com --- M src/soc/amd/common/block/gpio_banks/gpio.c 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/42877/1
diff --git a/src/soc/amd/common/block/gpio_banks/gpio.c b/src/soc/amd/common/block/gpio_banks/gpio.c index a8b11ba..396846d 100644 --- a/src/soc/amd/common/block/gpio_banks/gpio.c +++ b/src/soc/amd/common/block/gpio_banks/gpio.c @@ -201,6 +201,9 @@ iomux_read8(gpio); /* Flush posted write */
soc_gpio_hook(gpio, mux); + + /* Clear interrupt and wake status (write 1-to-clear bits) */ + control |= GPIO_INT_STATUS | GPIO_WAKE_STATUS; gpio_write32(gpio, control);
if (control_flags == 0)