mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-04 06:53:21 +03:00
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26797 3c298f89-4303-0410-b956-a3cf2f4a3e73
22 lines
694 B
Diff
22 lines
694 B
Diff
--- a/arch/arm/include/asm/dma-mapping.h
|
|
+++ b/arch/arm/include/asm/dma-mapping.h
|
|
@@ -350,7 +350,8 @@ static inline dma_addr_t dma_map_page(st
|
|
static inline void dma_unmap_single(struct device *dev, dma_addr_t handle,
|
|
size_t size, enum dma_data_direction dir)
|
|
{
|
|
- /* nothing to do */
|
|
+ if (dir != DMA_TO_DEVICE)
|
|
+ dma_cache_maint(dma_to_virt(dev, handle), size, DMA_FROM_DEVICE);
|
|
}
|
|
#endif /* CONFIG_DMABOUNCE */
|
|
|
|
@@ -398,6 +399,8 @@ static inline void dma_sync_single_range
|
|
{
|
|
BUG_ON(!valid_dma_direction(dir));
|
|
|
|
+ if (dir != DMA_TO_DEVICE)
|
|
+ dma_cache_maint(dma_to_virt(dev, handle) + offset, size, DMA_FROM_DEVICE);
|
|
dmabounce_sync_for_cpu(dev, handle, offset, size, dir);
|
|
}
|
|
|