CRIS v32: Add prototypes for cache flushing
authorJesper Nilsson <jesper.nilsson@axis.com>
Fri, 30 Nov 2007 09:11:43 +0000 (10:11 +0100)
committerJesper Nilsson <jesper.nilsson@axis.com>
Fri, 8 Feb 2008 10:06:24 +0000 (11:06 +0100)
We need these to work around some cache bugs in CRISv32 chips.

include/asm-cris/arch-v32/cache.h

index 80b236b15319b6a1ea506949f429ceb332e6122d..b3d752dfe15b438e6f081a47435c8088fbb9ea47 100644 (file)
@@ -1,8 +1,19 @@
 #ifndef _ASM_CRIS_ARCH_CACHE_H
 #define _ASM_CRIS_ARCH_CACHE_H
 
+#include <asm/arch/hwregs/dma.h>
+
 /* A cache-line is 32 bytes. */
 #define L1_CACHE_BYTES 32
 #define L1_CACHE_SHIFT 5
 
+void flush_dma_list(dma_descr_data *descr);
+void flush_dma_descr(dma_descr_data *descr, int flush_buf);
+
+#define flush_dma_context(c) \
+  flush_dma_list(phys_to_virt((c)->saved_data));
+
+void cris_flush_cache_range(void *buf, unsigned long len);
+void cris_flush_cache(void);
+
 #endif /* _ASM_CRIS_ARCH_CACHE_H */