aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/cplbinit.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/include/asm/cplbinit.h')
-rw-r--r--arch/blackfin/include/asm/cplbinit.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/blackfin/include/asm/cplbinit.h b/arch/blackfin/include/asm/cplbinit.h
index 0eb1c1b685a7..d179b747ff03 100644
--- a/arch/blackfin/include/asm/cplbinit.h
+++ b/arch/blackfin/include/asm/cplbinit.h
@@ -90,6 +90,20 @@ extern u_long dpdt_swapcount_table[];
90extern unsigned long reserved_mem_dcache_on; 90extern unsigned long reserved_mem_dcache_on;
91extern unsigned long reserved_mem_icache_on; 91extern unsigned long reserved_mem_icache_on;
92 92
93extern void generate_cpl_tables(void); 93extern void generate_cplb_tables(void);
94
95static inline int bfin_addr_dcachable(unsigned long addr)
96{
97#ifdef CONFIG_BFIN_DCACHE
98 if (addr < (_ramend - DMA_UNCACHED_REGION))
99 return 1;
100#endif
101
102 if (reserved_mem_dcache_on &&
103 addr >= _ramend && addr < physical_mem_end)
104 return 1;
105
106 return 0;
107}
94 108
95#endif 109#endif