diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2007-07-12 00:18:08 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-07-12 00:18:08 -0400 |
commit | b07af760c9bd8e87c3aa9275298566379ec4e9c1 (patch) | |
tree | 98e80da3a2d9640ffce7b6356a1759887da3bdeb /arch/blackfin | |
parent | 157cc5aad94fb7025c41a60788c1bfb5299010aa (diff) |
Blackfin arch: fix bug set dma_address properly in dma_map_sg
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/dma-mapping.c | 11 |
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 | } |