Skip to contentSkip to conversation

DMA: PL330: Fix calculating burst_size

PATCH New Kukjin Kim 1 participant 1 message Jan 9, 2012

Subsystems (2)
lore
Share & tools
lore

Kukjin Kim

author
#0 lore raw

PATCH 1/1 DMA: PL330: Fix calculating burst_size

From: Boojin Kim <[email protected]>

The burst size of PL330 DMAC should be aligned with source address, destination address and size. If not, PL330 DMAC HW generates transmit or data mismatch error. This patch adds the condition that checks the align of source and destination address for burst size.

---
 drivers/dma/pl330.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/pl330.c +1 -1
index d87d884..c3f7fcb 100644
@@ -2553,7 +2553,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,
 	burst = pi->pcfg.data_bus_width / 8;
 
 	while (burst > 1) {
-		if (!(len % burst))
+		if (!(len % burst) && !(dst % burst) && !(src % burst))
 			break;
 		burst /= 2;
 	}
Signature · 1 line
1.7.1