summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/io.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-03 16:57:24 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-03 16:57:24 +0000
commitaf7e00d6f82e2d2a46cb7390bb447e8ec2d118a2 (patch)
tree60e611dfbd4b4fdf8acf5533096cf4c40c233e50 /include/asm-mips/io.h
parentf9bbe9da79dbc8557c74efeb158b431cd67ace52 (diff)
Cache fixes, part #1.
Diffstat (limited to 'include/asm-mips/io.h')
-rw-r--r--include/asm-mips/io.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asm-mips/io.h b/include/asm-mips/io.h
index 09e3dad1e..2319c27c9 100644
--- a/include/asm-mips/io.h
+++ b/include/asm-mips/io.h
@@ -372,4 +372,21 @@ __OUTS(w,l,4)
__inslc((port),(addr),(count)) : \
__insl((port),(addr),(count)))
+/*
+ * The caches on some architectures aren't dma-coherent and have need to
+ * handle this in software. There are two types of operations that
+ * can be applied to dma buffers.
+ *
+ * - dma_cache_wback_inv(start, size) makes caches and coherent by
+ * writing the content of the caches back to memory, if necessary.
+ * The function also invalidates the affected part of the caches as
+ * necessary before DMA transfers from outside to memory.
+ * - dma_cache_inv(start, size) invalidates the affected parts of the
+ * caches. Dirty lines of the caches may be written back or simply
+ * be discarded. This operation is necessary before dma operations
+ * to the memory.
+ */
+extern void (*dma_cache_wback_inv)(unsigned long start, unsigned long size);
+extern void (*dma_cache_inv)(unsigned long start, unsigned long size);
+
#endif /* __ASM_MIPS_IO_H */