summaryrefslogtreecommitdiff
path: root/drivers/media/platform/coda/coda-bit.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2019-05-03 01:00:45 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-05-28 19:23:15 +0300
commit2b4116290c20707bd92b7afe9f03b32cb9f76167 (patch)
treed3f2336ec137f53810a7c0f038e26b4ac77e6084 /drivers/media/platform/coda/coda-bit.c
parent1405bc55e617e3e03339dc2d23423b84d9bd039d (diff)
downloadlinux-2b4116290c20707bd92b7afe9f03b32cb9f76167.tar.xz
media: coda: Clear the interrupt reason
This commit clears the interrupt reason (INT_REASON) register on the interrupt handler. Without this clearing, the CODA hardware has been observed to get completely stalled on CODA980 variants, requiring a pretty deep hardware reset. The datasheet specifies that the INT_REASON register is set by the CODA hardware, and should be cleared by the host. While the CODA versions that are currently supported by this driver don't seem to need this change, it's a really small change, so it seems a wise thing to do to avoid hitting some rare race-condition in the hardware. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/coda/coda-bit.c')
-rw-r--r--drivers/media/platform/coda/coda-bit.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index 19055c6488cc..a5b2891392b8 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -2341,6 +2341,7 @@ irqreturn_t coda_irq_handler(int irq, void *data)
/* read status register to attend the IRQ */
coda_read(dev, CODA_REG_BIT_INT_STATUS);
+ coda_write(dev, 0, CODA_REG_BIT_INT_REASON);
coda_write(dev, CODA_REG_BIT_INT_CLEAR_SET,
CODA_REG_BIT_INT_CLEAR);