Commit 6bd03e7b authored by Cliff Cai's avatar Cliff Cai Committed by Greg Kroah-Hartman

USB: musb: clear the Blackfin interrupt pending bits early in the ISR

If we clear the interrupt pending bits at the end, we sometimes return too
fast and have the same interrupt assert itself.  There is no way in a
Blackfin system to force a sync of this state, so the hardware manual
instructs people to clear interrupt flags early in their ISR.
Signed-off-by: default avatarCliff Cai <cliff.cai@analog.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarAnand Gadiyar <gadiyar@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2002e768
...@@ -259,6 +259,11 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data) ...@@ -259,6 +259,11 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data)
if (!int_hsdma) if (!int_hsdma)
goto done; goto done;
#ifdef CONFIG_BLACKFIN
/* Clear DMA interrupt flags */
musb_writeb(mbase, MUSB_HSDMA_INTR, int_hsdma);
#endif
for (bchannel = 0; bchannel < MUSB_HSDMA_CHANNELS; bchannel++) { for (bchannel = 0; bchannel < MUSB_HSDMA_CHANNELS; bchannel++) {
if (int_hsdma & (1 << bchannel)) { if (int_hsdma & (1 << bchannel)) {
musb_channel = (struct musb_dma_channel *) musb_channel = (struct musb_dma_channel *)
...@@ -324,11 +329,6 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data) ...@@ -324,11 +329,6 @@ static irqreturn_t dma_controller_irq(int irq, void *private_data)
} }
} }
#ifdef CONFIG_BLACKFIN
/* Clear DMA interrup flags */
musb_writeb(mbase, MUSB_HSDMA_INTR, int_hsdma);
#endif
retval = IRQ_HANDLED; retval = IRQ_HANDLED;
done: done:
spin_unlock_irqrestore(&musb->lock, flags); spin_unlock_irqrestore(&musb->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment