diff mbox

dma: tegra: use sg_dma_address() for getting dma buffer address

Message ID 1340377870-10035-1-git-send-email-ldewangan@nvidia.com
State Not Applicable, archived
Headers show

Commit Message

Laxman Dewangan June 22, 2012, 3:11 p.m. UTC
Use the sg_dma_address() to get the segment buffer address for
DMA transfer in place of sg_phys() which returns the physical
address of an sg entry.
The sg_dma_address() returns the correct buffer memory address
for DMA transfer.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/dma/tegra20-apb-dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Stephen Warren June 22, 2012, 5:12 p.m. UTC | #1
On 06/22/2012 09:11 AM, Laxman Dewangan wrote:
> Use the sg_dma_address() to get the segment buffer address for
> DMA transfer in place of sg_phys() which returns the physical
> address of an sg entry.
> The sg_dma_address() returns the correct buffer memory address
> for DMA transfer.

It's what everyone else is doing, so:
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Vinod Koul June 27, 2012, 1:32 p.m. UTC | #2
On Fri, 2012-06-22 at 11:12 -0600, Stephen Warren wrote:
> On 06/22/2012 09:11 AM, Laxman Dewangan wrote:
> > Use the sg_dma_address() to get the segment buffer address for
> > DMA transfer in place of sg_phys() which returns the physical
> > address of an sg entry.
> > The sg_dma_address() returns the correct buffer memory address
> > for DMA transfer.
> 
> It's what everyone else is doing, so:
And this is the right thing to do. 
> Acked-by: Stephen Warren <swarren@wwwdotorg.org>

Applied, thanks
diff mbox

Patch

diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 2e4c187..a46a21c 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -929,7 +929,7 @@  static struct dma_async_tx_descriptor *tegra_dma_prep_slave_sg(
 	for_each_sg(sgl, sg, sg_len, i) {
 		u32 len, mem;
 
-		mem = sg_phys(sg);
+		mem = sg_dma_address(sg);
 		len = sg_dma_len(sg);
 
 		if ((len & 3) || (mem & 3) ||