linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] DMA: PL330: Fix calculating burst_size
@ 2012-01-09  7:11 Kukjin Kim
  0 siblings, 0 replies; only message in thread
From: Kukjin Kim @ 2012-01-09  7:11 UTC (permalink / raw)
  To: linux-kernel, linux-samsung-soc
  Cc: 'Vinod Koul', 'Dan Williams',
	'Boojin Kim', 'Kukjin Kim'

From: Boojin Kim <boojin.kim@samsung.com>

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.

Signed-off-by: Boojin Kim <boojin.kim@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
---
 drivers/dma/pl330.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index d87d884..c3f7fcb 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -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;
 	}
-- 
1.7.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-09  7:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-09  7:11 [PATCH] DMA: PL330: Fix calculating burst_size Kukjin Kim

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).