Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 168413
b: refs/heads/master
c: 9b08284
h: refs/heads/master
i:
  168411: 5ebbd80
v: v3
  • Loading branch information
Jassi Brar authored and Ben Dooks committed Nov 9, 2009
1 parent 6779bd7 commit 98ab463
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7507f39c57d4a285aea11c379fbc65c2b3f375ef
refs/heads/master: 9b08284bf22f438baa2d6b68015ff17ddb431a61
29 changes: 28 additions & 1 deletion trunk/arch/arm/plat-s3c64xx/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ static irqreturn_t s3c64xx_dma_irq(int irq, void *pw)
errstat = readl(dmac->regs + PL080_ERR_STATUS);

for (offs = 0, bit = 1; offs < 8; offs++, bit <<= 1) {
struct s3c64xx_dma_buff *buff;

if (!(errstat & bit) && !(tcstat & bit))
continue;
Expand All @@ -591,7 +592,33 @@ static irqreturn_t s3c64xx_dma_irq(int irq, void *pw)
if (errstat & bit)
writel(bit, dmac->regs + PL080_ERR_CLEAR);

s3c64xx_dma_bufffdone(chan, chan->curr, res);
/* 'next' points to the buffer that is next to the
* currently active buffer.
* For CIRCULAR queues, 'next' will be same as 'curr'
* when 'end' is the active buffer.
*/
buff = chan->curr;
while (buff && buff != chan->next
&& buff->next != chan->next)
buff = buff->next;

if (!buff)
BUG();

if (buff == chan->next)
buff = chan->end;

s3c64xx_dma_bufffdone(chan, buff, res);

/* Update 'next' */
buff = chan->next;
if (chan->next == chan->end) {
chan->next = chan->curr;
if (!(chan->flags & S3C2410_DMAF_CIRCULAR))
chan->end = NULL;
} else {
chan->next = buff->next;
}
}

return IRQ_HANDLED;
Expand Down

0 comments on commit 98ab463

Please sign in to comment.