Commit fbd5604d authored by Thomas Bogendoerfer's avatar Thomas Bogendoerfer Committed by Ralf Baechle

[MIPS] Make dma_map_sg handle sg elements which are longer than one page

Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 1fe5f2c4
...@@ -168,8 +168,9 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, ...@@ -168,8 +168,9 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
addr = (unsigned long) page_address(sg->page); addr = (unsigned long) page_address(sg->page);
if (!plat_device_is_coherent(dev) && addr) if (!plat_device_is_coherent(dev) && addr)
__dma_sync(addr + sg->offset, sg->length, direction); __dma_sync(addr + sg->offset, sg->length, direction);
sg->dma_address = plat_map_dma_mem_page(dev, sg->page) + sg->dma_address = plat_map_dma_mem(dev,
sg->offset; (void *)(addr + sg->offset),
sg->length);
} }
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