aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/dma-mapping.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index eff954852c2b..856ee1bdee57 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -227,13 +227,22 @@ extern dma_addr_t dma_map_single(struct device *,void *, size_t, enum dma_data_d
227 * can regain ownership by calling dma_unmap_page() or 227 * can regain ownership by calling dma_unmap_page() or
228 * dma_sync_single_for_cpu(). 228 * dma_sync_single_for_cpu().
229 */ 229 */
230#ifndef CONFIG_DMABOUNCE
230static inline dma_addr_t 231static inline dma_addr_t
231dma_map_page(struct device *dev, struct page *page, 232dma_map_page(struct device *dev, struct page *page,
232 unsigned long offset, size_t size, 233 unsigned long offset, size_t size,
233 enum dma_data_direction dir) 234 enum dma_data_direction dir)
234{ 235{
235 return dma_map_single(dev, page_address(page) + offset, size, dir); 236 if (!arch_is_coherent())
237 dma_cache_maint(page_address(page) + offset, size, dir);
238
239 return page_to_dma(dev, page) + offset;
236} 240}
241#else
242extern dma_addr_t dma_map_page(struct device *dev, struct page *page,
243 unsigned long offset, size_t size,
244 enum dma_data_direction dir);
245#endif
237 246
238/** 247/**
239 * dma_unmap_single - unmap a single buffer previously mapped 248 * dma_unmap_single - unmap a single buffer previously mapped