]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/commitdiff
dma: tegra: use sg_dma_address() for getting dma buffer address
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 22 Jun 2012 15:11:10 +0000 (20:41 +0530)
committerVinod Koul <vinod.koul@linux.intel.com>
Wed, 27 Jun 2012 13:31:52 +0000 (19:01 +0530)
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>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/tegra20-apb-dma.c

index 134ea7cfc795c1de9630879a47b38c1c7c81a8b7..6d7d5d383cb1a318dbe0abd6dc124714ce6db871 100644 (file)
@@ -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) ||