summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/cacheflush.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-10-16 23:33:53 +0800
committerBryan Wu <cooloney@kernel.org>2008-10-16 23:33:53 +0800
commit04be80ef0bab044e89ab04b84ccea14a5dc4543b (patch)
tree6ff7022694bcb9d24259c9d6ce8a2f369950d342 /arch/blackfin/include/asm/cacheflush.h
parenta92946bc6abad6494ac95ea1a8b7c224b15fa1f7 (diff)
downloadblackbird-op-linux-04be80ef0bab044e89ab04b84ccea14a5dc4543b.tar.gz
blackbird-op-linux-04be80ef0bab044e89ab04b84ccea14a5dc4543b.zip
Blackfin arch: move bfin_addr_dcachable() and friends into the cacheflush header where it belongs
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/include/asm/cacheflush.h')
-rw-r--r--arch/blackfin/include/asm/cacheflush.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/cacheflush.h b/arch/blackfin/include/asm/cacheflush.h
index 5ef9e35e9c3b..c2d5b6c9fb4d 100644
--- a/arch/blackfin/include/asm/cacheflush.h
+++ b/arch/blackfin/include/asm/cacheflush.h
@@ -85,4 +85,21 @@ do { memcpy(dst, src, len); \
# define flush_dcache_page(page) do { } while (0)
#endif
+extern unsigned long reserved_mem_dcache_on;
+extern unsigned long reserved_mem_icache_on;
+
+static inline int bfin_addr_dcachable(unsigned long addr)
+{
+#ifdef CONFIG_BFIN_DCACHE
+ if (addr < (_ramend - DMA_UNCACHED_REGION))
+ return 1;
+#endif
+
+ if (reserved_mem_dcache_on &&
+ addr >= _ramend && addr < physical_mem_end)
+ return 1;
+
+ return 0;
+}
+
#endif /* _BLACKFIN_ICACHEFLUSH_H */
OpenPOWER on IntegriCloud