提交 f860122c 编写于 作者: C Christoph Hellwig

nds32: implement the unmap_sg DMA operation

This matches the implementation of the more commonly used unmap_single
routines and the sync_sg_for_cpu method which should provide equivalent
cache maintainance.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NGreentime Hu <greentime@andestech.com>
Tested-by: NGreentime Hu <greentime@andestech.com>
上级 4ac1c68e
......@@ -458,6 +458,12 @@ static void nds32_dma_unmap_sg(struct device *dev, struct scatterlist *sg,
int nhwentries, enum dma_data_direction dir,
unsigned long attrs)
{
int i;
for (i = 0; i < nhwentries; i++, sg++) {
nds32_dma_sync_single_for_cpu(dev, sg_dma_address(sg),
sg->length, dir);
}
}
struct dma_map_ops nds32_dma_ops = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册