Commit 58c35bd3 authored by Vitja Makarov's avatar Vitja Makarov Committed by Bryan Wu

Blackfin arch: introducing bfin_addr_dcachable

This patch introduces bfin_addr_dcachable() predicate, that simply tests is
address in cachable region or not.
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 3094c981
...@@ -92,4 +92,18 @@ extern unsigned long reserved_mem_icache_on; ...@@ -92,4 +92,18 @@ extern unsigned long reserved_mem_icache_on;
extern void generate_cplb_tables(void); extern void generate_cplb_tables(void);
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 #endif
...@@ -42,6 +42,7 @@ EXPORT_SYMBOL(memory_start); ...@@ -42,6 +42,7 @@ EXPORT_SYMBOL(memory_start);
EXPORT_SYMBOL(memory_end); EXPORT_SYMBOL(memory_end);
EXPORT_SYMBOL(physical_mem_end); EXPORT_SYMBOL(physical_mem_end);
EXPORT_SYMBOL(_ramend); EXPORT_SYMBOL(_ramend);
EXPORT_SYMBOL(reserved_mem_dcache_on);
#ifdef CONFIG_MTD_UCLINUX #ifdef CONFIG_MTD_UCLINUX
unsigned long memory_mtd_end, memory_mtd_start, mtd_size; unsigned long memory_mtd_end, memory_mtd_start, mtd_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment