Message ID | 20190425183546.16244-6-ezequiel@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Assorted CODA fixes | expand |
On Thu, 2019-04-25 at 15:35 -0300, Ezequiel Garcia wrote: > 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. > > Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> regards Philipp
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index bddd2f5c8c2b..a653aaa3ca15 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -2301,6 +2301,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);
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. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> --- drivers/media/platform/coda/coda-bit.c | 1 + 1 file changed, 1 insertion(+)