* [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane
@ 2013-10-17 10:51 Kuninori Morimoto
2013-10-17 13:23 ` Sergei Shtylyov
0 siblings, 1 reply; 3+ messages in thread
From: Kuninori Morimoto @ 2013-10-17 10:51 UTC (permalink / raw)
To: linux-sh
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.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
drivers/dma/sh/rcar-hpbdma.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
index 0518135..6fc37b4 100644
--- a/drivers/dma/sh/rcar-hpbdma.c
+++ b/drivers/dma/sh/rcar-hpbdma.c
@@ -388,7 +388,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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane
2013-10-17 10:51 [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane Kuninori Morimoto
@ 2013-10-17 13:23 ` Sergei Shtylyov
0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2013-10-17 13:23 UTC (permalink / raw)
To: linux-sh
Hello.
On 17-10-2013 14:51, Kuninori Morimoto wrote:
> 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.
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
> drivers/dma/sh/rcar-hpbdma.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
> index 0518135..6fc37b4 100644
> --- a/drivers/dma/sh/rcar-hpbdma.c
> +++ b/drivers/dma/sh/rcar-hpbdma.c
> @@ -388,7 +388,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;
This bit is not #define'd in the driver. Did you compile this?
WBR, Sergei
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane
2013-10-29 6:51 ` Kuninori Morimoto
@ 2013-10-29 6:52 ` Kuninori Morimoto
0 siblings, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2013-10-29 6:52 UTC (permalink / raw)
To: Koul, Vinod
Cc: Simon, Max Filippov, Magnus, linux-sh, Kuninori Morimoto,
linux-kernel
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>
---
drivers/dma/sh/rcar-hpbdma.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c
index 19af32d..3083d90 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 */
@@ -388,7 +389,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
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-29 6:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-17 10:51 [PATCH 3/3] rcar-hpbdma: fixup channel busy check for double plane Kuninori Morimoto
2013-10-17 13:23 ` Sergei Shtylyov
-- strict thread matches above, loose matches on Subject: below --
2013-10-17 10:50 [PATCH 0/3] rcar-hpbdma: fixup patches " Kuninori Morimoto
2013-10-29 6:51 ` Kuninori Morimoto
2013-10-29 6:52 ` [PATCH 3/3] rcar-hpbdma: fixup channel busy check " Kuninori Morimoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).