mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kukjin Kim <kgene.kim@samsung.com>
To: linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org
Cc: "'Vinod Koul'" <vinod.koul@intel.com>,
	"'Dan Williams'" <dan.j.williams@intel.com>,
	"'Boojin Kim'" <boojin.kim@samsung.com>,
	"'Kukjin Kim'" <kgene.kim@samsung.com>
Subject: [PATCH] DMA: PL330: Fix calculating burst_size
Date: Mon, 09 Jan 2012 16:11:20 +0900	[thread overview]
Message-ID: <002901ccce9d$e4d84db0$ae88e910$%kim@samsung.com> (raw)

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



                 reply	other threads:[~2012-01-09  7:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002901ccce9d$e4d84db0$ae88e910$%kim@samsung.com' \
    --to=kgene.kim@samsung.com \
    --cc=boojin.kim@samsung.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®