Revision b85bfa246efd24ea3fdb5ee949c28e3110c6d299 authored by Daniel Kurtz on 22 September 2018, 19:58:26 UTC, committed by Linus Walleij on 25 September 2018, 10:39:19 UTC
From the AMD BKDG, if WAKE_INT_MASTER_REG.MaskStsEn is set, a software write to the debounce registers of *any* gpio will block wake/interrupt status generation for *all* gpios for a length of time that depends on WAKE_INT_MASTER_REG.MaskStsLength[11:0]. During this period the Interrupt Delivery bit (INTERRUPT_ENABLE) will read as 0. In commit 4c1de0414a1340 ("pinctrl/amd: poll InterruptEnable bits in enable_irq") we tried to fix this same "gpio Interrupts are blocked immediately after writing debounce registers" problem, but incorrectly assumed it only affected the gpio whose debounce was being configured and not ALL gpios. To solve this for all gpios, we move the polling loop from amd_gpio_irq_enable() to amd_gpio_irq_set_type(), while holding the gpio spinlock. This ensures that another gpio operation (e.g. amd_gpio_irq_unmask()) can read a temporarily disabled IRQ and incorrectly disable it while trying to modify some other register bits. Fixes: 4c1de0414a1340 pinctrl/amd: poll InterruptEnable bits in enable_irq Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 6bf4ca7
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 1.0 KB |
Makefile | -rw-r--r-- | 669 bytes |
dsa.c | -rw-r--r-- | 7.0 KB |
dsa2.c | -rw-r--r-- | 16.4 KB |
dsa_priv.h | -rw-r--r-- | 6.0 KB |
legacy.c | -rw-r--r-- | 15.9 KB |
master.c | -rw-r--r-- | 5.1 KB |
port.c | -rw-r--r-- | 9.9 KB |
slave.c | -rw-r--r-- | 38.0 KB |
switch.c | -rw-r--r-- | 7.6 KB |
tag_brcm.c | -rw-r--r-- | 5.2 KB |
tag_dsa.c | -rw-r--r-- | 3.6 KB |
tag_edsa.c | -rw-r--r-- | 4.2 KB |
tag_ksz.c | -rw-r--r-- | 2.9 KB |
tag_lan9303.c | -rw-r--r-- | 4.4 KB |
tag_mtk.c | -rw-r--r-- | 3.0 KB |
tag_qca.c | -rw-r--r-- | 2.9 KB |
tag_trailer.c | -rw-r--r-- | 2.1 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...