]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: zynqmp: Clear alarm interrupt status before interrupt enable
authorSrinivas Neeli <srinivas.neeli@xilinx.com>
Wed, 12 Feb 2020 10:24:39 +0000 (15:54 +0530)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 12 Feb 2020 11:21:42 +0000 (12:21 +0100)
commit7f35b50450a54c1878289d734c86a6793024cbcc
tree14f9a96b17e082ce1667a337757a00acb8fdd56c
parentf24f65e6d91cdbaaac764cd47ffd4ea0285405b4
rtc: zynqmp: Clear alarm interrupt status before interrupt enable

Fix multiple occurring interrupts for alarm interrupt. RTC module doesn't
clear the alarm interrupt status bit immediately after the interrupt is
triggered.This is due to the sticky nature of the alarm interrupt status
register. The alarm interrupt status register can be cleared only after
the second counter outruns the set alarm value. To fix multiple spurious
interrupts, disable alarm interrupt in the handler and clear the status
bit before enabling the alarm interrupt.

Fixes: 751d2b594dfc ("rtc: add xilinx zynqmp rtc driver")
Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com>
Acked-by: Michal Simek <michal.simek@xilinx.com>
Link: https://lore.kernel.org/r/1581503079-387-1-git-send-email-srinivas.neeli@xilinx.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-zynqmp.c