diff options
author | Zhangfei Gao <zhangfei.gao@linaro.org> | 2013-04-17 10:56:49 +0800 |
---|---|---|
committer | Zhangfei Gao <zhangfei.gao@linaro.org> | 2013-04-19 13:05:00 +0800 |
commit | eb0fb550694d08b7898dcbc34db8810af7587a92 (patch) | |
tree | 19ad81a03fe88825b4e1214068349d486d3c0053 | |
parent | e223966a50e705c2e9aadcf9e77f4de931758906 (diff) |
dmaengine: k3dma clear interrupt with INT_STAT
INT_TC1 value will be changed even irq is masked
Missing irq will happen if clear intertupt with INT_TC1 value
Instead, using INT_STAT value, which is masked value
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Kai Yang <jean.yangkai@huawei.com>
-rw-r--r-- | drivers/dma/k3dma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c index 84ddea449ef4..3e38891cb07d 100644 --- a/drivers/dma/k3dma.c +++ b/drivers/dma/k3dma.c @@ -178,7 +178,7 @@ static irqreturn_t k3_dma_int_handler(int irq, void *dev_id) u32 tc1 = readl_relaxed(d->base + INT_TC1); u32 err1 = readl_relaxed(d->base + INT_ERR1); u32 err2 = readl_relaxed(d->base + INT_ERR2); - u32 i, irq_num = 0; + u32 i, irq_chan = 0; while (stat) { i = __ffs(stat); @@ -187,17 +187,17 @@ static irqreturn_t k3_dma_int_handler(int irq, void *dev_id) p = &d->phy[i]; p->ds_done = p->ds_run; vchan_cookie_complete(&p->ds_run->vd); - irq_num++; + irq_chan |= BIT(i); } if (unlikely((err1 & BIT(i)) || (err2 & BIT(i)))) dev_warn(d->slave.dev, "DMA ERR\n"); } - writel_relaxed(tc1, d->base + INT_TC1_RAW); + writel_relaxed(irq_chan, d->base + INT_TC1_RAW); writel_relaxed(err1, d->base + INT_ERR1_RAW); writel_relaxed(err2, d->base + INT_ERR2_RAW); - if (irq_num) { + if (irq_chan) { tasklet_schedule(&d->task); return IRQ_HANDLED; } else |