diff options
author | Jonathan Bell <jonathan@raspberrypi.org> | 2015-06-30 12:35:39 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-07-20 11:01:52 +0200 |
commit | 714b1dd8f72e39ef4bc0f38f7f341bb1d57d98bf (patch) | |
tree | d60063bd16f3e5d298b84925d26121ecb24aa691 /drivers/pinctrl/freescale/pinctrl-imx50.c | |
parent | c10372e615b8f790d30cbfcf59e43908ca42bf1a (diff) | |
download | linux-714b1dd8f72e39ef4bc0f38f7f341bb1d57d98bf.tar.gz |
pinctrl: bcm2835: Clear the event latch register when disabling interrupts
It's possible to hit a race condition if interrupts are generated on a GPIO
pin when the IRQ line in question is being disabled.
If the interrupt is freed, bcm2835_gpio_irq_disable() is called which
disables the event generation sources (edge, level). If an event occurred
between the last disabling of hard IRQs and the write to the event
source registers, a bit would be set in the GPIO event detect register
(GPEDSn) which goes unacknowledged by bcm2835_gpio_irq_handler()
so Linux complains loudly.
There is no per-GPIO mask register, so when disabling GPIO interrupts
write 1 to the relevant bit in GPEDSn to clear out any stale events.
Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/freescale/pinctrl-imx50.c')
0 files changed, 0 insertions, 0 deletions