coreboot-kgpe-d16/src
Daniel Kurtz b82afce18a soc/amd/stoneyridge/gpio: Configure debounce for irq gpios
FT4 has a strange property where whenever the debounce registers for any
one gpio are changed, the FT4 disables interrupt propagation for ALL
gpio irqs for ~4ms.

In other words, if an edge interrupt of one gpio happens exactly during
this debounce-irq-off window immediately following the configuration of
another gpio, the interrupt will be lost.

It is quite difficult to deal with this in the kernel, since during kernel
boot time, drivers & devices are probed asynchronously, meaning it may
happen that an already loaded driver may miss an interrupt when some
later driver is being probed and configuring its gpio interrupt.

To eliminate this possibility, we pre-configure the debounce registers in
ram stage for all gpios that will be used as irqs later by the kernel
using the same configuration as used by the kernel, as per this table:

 IRQ         Debounce
 Edge        Remove Glitch
 Level High  Preserve Low Glitch
 Level Low   Preserve High Glitch

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>

BUG=b:113880780
BRANCH=none
TEST=Reboot stress test grunt (>100 times); no messages in dmesg like:
  tpm tpm0: Timeout waiting for TPM ready

Change-Id: I94c7ecfb14e5bb209b3598e10287c80eb19da25b
Reviewed-on: https://review.coreboot.org/c/30921
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2019-01-16 18:20:36 +00:00
..
acpi
arch buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
commonlib buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
console buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
cpu buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
device device/pci_device: Do not break tree topology 2019-01-10 12:47:18 +00:00
drivers drivers/generic/adau7002: Add wakeup-delay-ms property 2019-01-16 18:17:23 +00:00
ec ec/chromeec: fix LPC read/write for MEC devices 2018-12-28 12:24:52 +00:00
include string.h: Add isprint() 2019-01-16 16:47:20 +00:00
lib buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
mainboard mb/google/kahlee/careena: Add 20ms delay to capture 2019-01-16 18:17:42 +00:00
northbridge nb/intel/sandybridge: Remove the C native graphic init 2019-01-16 16:45:26 +00:00
security buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
soc soc/amd/stoneyridge/gpio: Configure debounce for irq gpios 2019-01-16 18:20:36 +00:00
southbridge buildsystem: Promote rules.h to default include 2019-01-16 11:51:07 +00:00
superio src/superio/smsc/smscsuperio/superio.c: Add SCH5504 2019-01-15 09:35:31 +00:00
vendorcode vendorcode/intel/fsp1_0/broadwell_de: Use FSP from 3rdparty/fsp 2019-01-15 07:45:41 +00:00
Kconfig [RFC]util/checklist: Remove this functionality 2019-01-14 19:42:59 +00:00