aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/dma-mapping.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/blackfin/kernel/dma-mapping.c b/arch/blackfin/kernel/dma-mapping.c
index bda57ec88151..ea48d5b13f11 100644
--- a/arch/blackfin/kernel/dma-mapping.c
+++ b/arch/blackfin/kernel/dma-mapping.c
@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
159 159
160 BUG_ON(direction == DMA_NONE); 160 BUG_ON(direction == DMA_NONE);
161 161
162 for (i = 0; i < nents; i++) 162 for (i = 0; i < nents; i++, sg++) {
163 invalidate_dcache_range(sg_dma_address(&sg[i]), 163 sg->dma_address = page_address(sg->page) + sg->offset;
164 sg_dma_address(&sg[i]) + 164
165 sg_dma_len(&sg[i])); 165 invalidate_dcache_range(sg_dma_address(sg),
166 sg_dma_address(sg) +
167 sg_dma_len(sg));
168 }
166 169
167 return nents; 170 return nents;
168} 171}