Commit 2862559e authored by Ilya Yanok's avatar Ilya Yanok Committed by Grant Likely

powerpc/512x: fix the hanged dma transfer issue

Current code clears interrupt active status _after_ submitting new
transfers. This leaves a possibility of clearing the interrupt for this
new transfer (if it is triggered fast enough) and thus lose this
interrupt. We want to clear interrupt active status _before_ new
transfers is submitted and for current channel only.
Signed-off-by: default avatarIlya Yanok <yanok@emcraft.com>
Acked-by: default avatarWolfgang Denk <wd@denx.de>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 6504cf34
...@@ -276,6 +276,9 @@ static void mpc_dma_irq_process(struct mpc_dma *mdma, u32 is, u32 es, int off) ...@@ -276,6 +276,9 @@ static void mpc_dma_irq_process(struct mpc_dma *mdma, u32 is, u32 es, int off)
spin_lock(&mchan->lock); spin_lock(&mchan->lock);
out_8(&mdma->regs->dmacint, ch + off);
out_8(&mdma->regs->dmacerr, ch + off);
/* Check error status */ /* Check error status */
if (es & (1 << ch)) if (es & (1 << ch))
list_for_each_entry(mdesc, &mchan->active, node) list_for_each_entry(mdesc, &mchan->active, node)
...@@ -309,12 +312,6 @@ static irqreturn_t mpc_dma_irq(int irq, void *data) ...@@ -309,12 +312,6 @@ static irqreturn_t mpc_dma_irq(int irq, void *data)
mpc_dma_irq_process(mdma, in_be32(&mdma->regs->dmaintl), mpc_dma_irq_process(mdma, in_be32(&mdma->regs->dmaintl),
in_be32(&mdma->regs->dmaerrl), 0); in_be32(&mdma->regs->dmaerrl), 0);
/* Ack interrupt on all channels */
out_be32(&mdma->regs->dmainth, 0xFFFFFFFF);
out_be32(&mdma->regs->dmaintl, 0xFFFFFFFF);
out_be32(&mdma->regs->dmaerrh, 0xFFFFFFFF);
out_be32(&mdma->regs->dmaerrl, 0xFFFFFFFF);
/* Schedule tasklet */ /* Schedule tasklet */
tasklet_schedule(&mdma->tasklet); tasklet_schedule(&mdma->tasklet);
......
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