summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/dma.h
diff options
context:
space:
mode:
authorRussell King2015-07-24 10:10:55 +0200
committerRussell King2015-08-01 23:25:04 +0200
commit1234e3fda9aa24b2d650bbcd9ef09d5f6a12dc86 (patch)
treead30b68bfd5c594499e9670dab32d4f2a2eb8a6d /arch/arm/mm/dma.h
parentARM: 8407/1: switch_to: Remove finish_arch_switch (diff)
downloadkernel-qcow2-linux-1234e3fda9aa24b2d650bbcd9ef09d5f6a12dc86.tar.gz
kernel-qcow2-linux-1234e3fda9aa24b2d650bbcd9ef09d5f6a12dc86.tar.xz
kernel-qcow2-linux-1234e3fda9aa24b2d650bbcd9ef09d5f6a12dc86.zip
ARM: reduce visibility of dmac_* functions
The dmac_* functions are private to the ARM DMA API implementation, and should not be used by drivers. In order to discourage their use, remove their prototypes and macros from asm/*.h. We have to leave dmac_flush_range() behind as Exynos and MSM IOMMU code use these; once these sites are fixed, this can be moved also. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/dma.h')
-rw-r--r--arch/arm/mm/dma.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mm/dma.h b/arch/arm/mm/dma.h
new file mode 100644
index 000000000000..70ea6852f94e
--- /dev/null
+++ b/arch/arm/mm/dma.h
@@ -0,0 +1,32 @@
+#ifndef DMA_H
+#define DMA_H
+
+#include <asm/glue-cache.h>
+
+#ifndef MULTI_CACHE
+#define dmac_map_area __glue(_CACHE,_dma_map_area)
+#define dmac_unmap_area __glue(_CACHE,_dma_unmap_area)
+
+/*
+ * These are private to the dma-mapping API. Do not use directly.
+ * Their sole purpose is to ensure that data held in the cache
+ * is visible to DMA, or data written by DMA to system memory is
+ * visible to the CPU.
+ */
+extern void dmac_map_area(const void *, size_t, int);
+extern void dmac_unmap_area(const void *, size_t, int);
+
+#else
+
+/*
+ * These are private to the dma-mapping API. Do not use directly.
+ * Their sole purpose is to ensure that data held in the cache
+ * is visible to DMA, or data written by DMA to system memory is
+ * visible to the CPU.
+ */
+#define dmac_map_area cpu_cache.dma_map_area
+#define dmac_unmap_area cpu_cache.dma_unmap_area
+
+#endif
+
+#endif