Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1342560 > unrolled thread

[PATCH v2] dmaengine: pl330: fix to support the burst mode

Started byCaesar Wang <wxt@rock-chips.com>
First post2016-02-25 02:10 +0100
Last post2016-03-01 04:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2] dmaengine: pl330: fix to support the burst mode Caesar Wang <wxt@rock-chips.com> - 2016-02-25 02:10 +0100
    Re: [PATCH v2] dmaengine: pl330: fix to support the burst mode Vinod Koul <vinod.koul@intel.com> - 2016-03-01 04:40 +0100

#1342560 — [PATCH v2] dmaengine: pl330: fix to support the burst mode

FromCaesar Wang <wxt@rock-chips.com>
Date2016-02-25 02:10 +0100
Subject[PATCH v2] dmaengine: pl330: fix to support the burst mode
Message-ID<r5SBk-4Cr-15@gated-at.bofh.it>
This patch fixes the burst mode that will break DMA uart on SoCFPGA.

In some cases, some SoCS didn't support the multi-burst
even if the devices who use the pl330 claim support the 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-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>

---

Changes in v2:
- s/brust/burst
- add Dinh and Bartlomiej test tags.

 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

[toc] | [next] | [standalone]


#1346345

FromVinod Koul <vinod.koul@intel.com>
Date2016-03-01 04:40 +0100
Message-ID<r7Jke-3EW-7@gated-at.bofh.it>
In reply to#1342560
On Thu, Feb 25, 2016 at 09:00:53AM +0800, Caesar Wang wrote:
> This patch fixes the burst mode that will break DMA uart on SoCFPGA.
> 
> In some cases, some SoCS didn't support the multi-burst
> even if the devices who use the pl330 claim support the maxburst.

Applied now and merged topic/pl330 back to -next

Thanks
-- 
~Vinod

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web