Skip to content

Commit

Permalink
rcar-hpbdma: fixup channel busy check for double plane
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kuninori Morimoto authored and Vinod Koul committed Nov 28, 2013
1 parent f1eab07 commit b3000cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/dma/sh/rcar-hpbdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b3000cd

Please sign in to comment.