summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-10-29 07:52:34 +0100
committerVinod Koul <vinod.koul@intel.com>2013-11-28 09:16:00 +0100
commitb3000cd835a6116c0a7d0f8e3df5be26c2138d86 (patch)
tree8e659ec9aa45b5f0d0f980ef6793d3524f218d3e /drivers/dma
parentrcar-hpbdma: add max transfer size (diff)
downloadlinux-b3000cd835a6116c0a7d0f8e3df5be26c2138d86.tar.xz
linux-b3000cd835a6116c0a7d0f8e3df5be26c2138d86.zip
rcar-hpbdma: fixup channel busy check for double plane
The device busy check method is different between single and double planes. It will always return "busy" without this patch if channel used as double plane. Reviewed-by: Max Filippov <max.filippov@cogentembedded.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/sh/rcar-hpbdma.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
index 496180a6a5e5..83de1dbb7505 100644
--- a/drivers/dma/sh/rcar-hpbdma.c
+++ b/drivers/dma/sh/rcar-hpbdma.c
@@ -60,6 +60,7 @@
#define HPB_DMAE_DSTPR_DMSTP BIT(0)
/* DMA status register (DSTSR) bits */
+#define HPB_DMAE_DSTSR_DQSTS BIT(2)
#define HPB_DMAE_DSTSR_DMSTS BIT(0)
/* DMA common registers */
@@ -385,7 +386,10 @@ static bool hpb_dmae_channel_busy(struct shdma_chan *schan)
struct hpb_dmae_chan *chan = to_chan(schan);
u32 dstsr = ch_reg_read(chan, HPB_DMAE_DSTSR);
- return (dstsr & HPB_DMAE_DSTSR_DMSTS) == HPB_DMAE_DSTSR_DMSTS;
+ if (chan->xfer_mode == XFER_DOUBLE)
+ return dstsr & HPB_DMAE_DSTSR_DQSTS;
+ else
+ return dstsr & HPB_DMAE_DSTSR_DMSTS;
}
static int