Skip to contentSkip to conversation

dmaengine: pl330: fix to support the brust mode

PATCH Superseded Caesar Wang 2 participants 3 messages Feb 24, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: pl330: fix to support the brust mode

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"

---

 drivers/dma/pl330.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/dma/pl330.c +4 -5
index 1b0453b..372b435 100644
@@ -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);
 	}
Signature · 1 line
1.9.1
Tested-by on v1 1/1
#1 lore raw

Just a small nit:

Quoted 5 lines · 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.

s/brust/burst
s/maxbrust/burst

Quoted 6 lines
Fixes commit 848e977

"dmaengine: pl330: support burst mode for dev-to-mem and mem-to-dev transmit"

---

Tested on SoCFPGA:

Thanks,
Dinh

Tested-by on v1 1/1
#2 lore raw
In reply to Caesar Wang

Just a small nit:

Quoted 5 lines · 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.

s/brust/burst
s/maxbrust/maxburst

Quoted 6 lines
Fixes commit 848e977

"dmaengine: pl330: support burst mode for dev-to-mem and mem-to-dev transmit"

---

Tested on SoCFPGA:

Thanks,
Dinh