Commit b07af760 authored by Sonic Zhang's avatar Sonic Zhang Committed by Bryan Wu

Blackfin arch: fix bug set dma_address properly in dma_map_sg

Signed-off-by: default avatarSonic Zhang <sonic.zhang@analog.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
parent 157cc5aa
...@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, ...@@ -159,10 +159,13 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
BUG_ON(direction == DMA_NONE); BUG_ON(direction == DMA_NONE);
for (i = 0; i < nents; i++) for (i = 0; i < nents; i++, sg++) {
invalidate_dcache_range(sg_dma_address(&sg[i]), sg->dma_address = page_address(sg->page) + sg->offset;
sg_dma_address(&sg[i]) +
sg_dma_len(&sg[i])); invalidate_dcache_range(sg_dma_address(sg),
sg_dma_address(sg) +
sg_dma_len(sg));
}
return nents; return nents;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment