* [PATCH] dmaengine: pl330: fix to support the brust mode
@ 2016-02-24 3:52 Caesar Wang
2016-02-24 17:09 ` Dinh Nguyen
2016-02-24 17:09 ` Dinh Nguyen
0 siblings, 2 replies; 3+ messages in thread
From: Caesar Wang @ 2016-02-24 3:52 UTC (permalink / raw)
To: dinguyen, vinod.koul
Cc: dan.j.williams, linux-kernel, dmaengine, heiko, dianders,
sonnyrao, al.kochet, shawn.lin, linux-rockchip, boojin.kim,
Caesar Wang
This patch fixes the brust mode that will break DMA uart on SoCFPGA.
In some cases, some SoCS didn't support the multi-brust
even if the devices who use the pl330 claim support the maxbrust.
Fixes: commit 848e977
"dmaengine: pl330: support burst mode for dev-to-mem and mem-to-dev transmit"
Reported-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
drivers/dma/pl330.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 1b0453b..372b435 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1161,7 +1161,7 @@ static inline int _ldst_devtomem(struct pl330_dmac *pl330, unsigned dry_run,
if (pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP)
cond = BURST;
else
- cond = (pxs->desc->rqcfg.brst_len == 1) ? SINGLE : BURST;
+ cond = SINGLE;
while (cyc--) {
off += _emit_WFP(dry_run, &buf[off], cond, pxs->desc->peri);
@@ -1186,8 +1186,7 @@ static inline int _ldst_memtodev(struct pl330_dmac *pl330,
if (pl330->quirks & PL330_QUIRK_BROKEN_NO_FLUSHP)
cond = BURST;
else
- cond = (pxs->desc->rqcfg.brst_len == 1) ? SINGLE : BURST;
-
+ cond = SINGLE;
while (cyc--) {
off += _emit_WFP(dry_run, &buf[off], cond, pxs->desc->peri);
@@ -2598,7 +2597,7 @@ static struct dma_async_tx_descriptor *pl330_prep_dma_cyclic(
desc->rqtype = direction;
desc->rqcfg.brst_size = pch->burst_sz;
- desc->rqcfg.brst_len = pch->burst_len;
+ desc->rqcfg.brst_len = 1;
desc->bytes_requested = period_len;
fill_px(&desc->px, dst, src, period_len);
@@ -2743,7 +2742,7 @@ pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl,
}
desc->rqcfg.brst_size = pch->burst_sz;
- desc->rqcfg.brst_len = pch->burst_len;
+ desc->rqcfg.brst_len = 1;
desc->rqtype = direction;
desc->bytes_requested = sg_dma_len(sg);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: pl330: fix to support the brust mode
2016-02-24 3:52 [PATCH] dmaengine: pl330: fix to support the brust mode Caesar Wang
@ 2016-02-24 17:09 ` Dinh Nguyen
2016-02-24 17:09 ` Dinh Nguyen
1 sibling, 0 replies; 3+ messages in thread
From: Dinh Nguyen @ 2016-02-24 17:09 UTC (permalink / raw)
To: Caesar Wang, vinod.koul
Cc: dan.j.williams, linux-kernel, dmaengine, heiko, dianders,
sonnyrao, al.kochet, shawn.lin, linux-rockchip, boojin.kim
Just a small nit:
On 02/23/2016 09:52 PM, Caesar Wang wrote:
> This patch fixes the brust mode that will break DMA uart on SoCFPGA.
>
> In some cases, some SoCS didn't support the multi-brust
> even if the devices who use the pl330 claim support the maxbrust.
>
s/brust/burst
s/maxbrust/burst
> Fixes: commit 848e977
> "dmaengine: pl330: support burst mode for dev-to-mem and mem-to-dev transmit"
>
> Reported-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
> ---
Tested on SoCFPGA:
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Thanks,
Dinh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: pl330: fix to support the brust mode
2016-02-24 3:52 [PATCH] dmaengine: pl330: fix to support the brust mode Caesar Wang
2016-02-24 17:09 ` Dinh Nguyen
@ 2016-02-24 17:09 ` Dinh Nguyen
1 sibling, 0 replies; 3+ messages in thread
From: Dinh Nguyen @ 2016-02-24 17:09 UTC (permalink / raw)
To: Caesar Wang, vinod.koul
Cc: dan.j.williams, linux-kernel, dmaengine, heiko, dianders,
sonnyrao, al.kochet, shawn.lin, linux-rockchip, boojin.kim
Just a small nit:
On 02/23/2016 09:52 PM, Caesar Wang wrote:
> This patch fixes the brust mode that will break DMA uart on SoCFPGA.
>
> In some cases, some SoCS didn't support the multi-brust
> even if the devices who use the pl330 claim support the maxbrust.
>
s/brust/burst
s/maxbrust/maxburst
> Fixes: commit 848e977
> "dmaengine: pl330: support burst mode for dev-to-mem and mem-to-dev transmit"
>
> Reported-by: Dinh Nguyen <dinguyen@opensource.altera.com>
> Signed-off-by: Caesar Wang <wxt@rock-chips.com>
> ---
Tested on SoCFPGA:
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Thanks,
Dinh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-24 17:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 3:52 [PATCH] dmaengine: pl330: fix to support the brust mode Caesar Wang
2016-02-24 17:09 ` Dinh Nguyen
2016-02-24 17:09 ` Dinh Nguyen
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).