diff options
author | Mike Frysinger <vapier.adi@gmail.com> | 2008-10-16 11:33:53 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-10-16 11:33:53 -0400 |
commit | 04be80ef0bab044e89ab04b84ccea14a5dc4543b (patch) | |
tree | 6ff7022694bcb9d24259c9d6ce8a2f369950d342 /arch/blackfin | |
parent | a92946bc6abad6494ac95ea1a8b7c224b15fa1f7 (diff) |
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')
-rw-r--r-- | arch/blackfin/include/asm/cacheflush.h | 17 | ||||
-rw-r--r-- | arch/blackfin/include/asm/cplbinit.h | 17 | ||||
-rw-r--r-- | arch/blackfin/kernel/cplb-nompu/cplbinit.c | 1 |
3 files changed, 18 insertions, 17 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); \ | |||
85 | # define flush_dcache_page(page) do { } while (0) | 85 | # define flush_dcache_page(page) do { } while (0) |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | extern unsigned long reserved_mem_dcache_on; | ||
89 | extern unsigned long reserved_mem_icache_on; | ||
90 | |||
91 | static inline int bfin_addr_dcachable(unsigned long addr) | ||
92 | { | ||
93 | #ifdef CONFIG_BFIN_DCACHE | ||
94 | if (addr < (_ramend - DMA_UNCACHED_REGION)) | ||
95 | return 1; | ||
96 | #endif | ||
97 | |||
98 | if (reserved_mem_dcache_on && | ||
99 | addr >= _ramend && addr < physical_mem_end) | ||
100 | return 1; | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | |||
88 | #endif /* _BLACKFIN_ICACHEFLUSH_H */ | 105 | #endif /* _BLACKFIN_ICACHEFLUSH_H */ |
diff --git a/arch/blackfin/include/asm/cplbinit.h b/arch/blackfin/include/asm/cplbinit.h index d179b747ff03..f845b41147ba 100644 --- a/arch/blackfin/include/asm/cplbinit.h +++ b/arch/blackfin/include/asm/cplbinit.h | |||
@@ -87,23 +87,6 @@ extern u_long dpdt_swapcount_table[]; | |||
87 | 87 | ||
88 | #endif /* CONFIG_MPU */ | 88 | #endif /* CONFIG_MPU */ |
89 | 89 | ||
90 | extern unsigned long reserved_mem_dcache_on; | ||
91 | extern unsigned long reserved_mem_icache_on; | ||
92 | |||
93 | extern void generate_cplb_tables(void); | 90 | extern void generate_cplb_tables(void); |
94 | 91 | ||
95 | static 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 | } | ||
108 | |||
109 | #endif | 92 | #endif |
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index 301252e84441..512f8c92ead5 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | 24 | ||
25 | #include <asm/blackfin.h> | 25 | #include <asm/blackfin.h> |
26 | #include <asm/cacheflush.h> | ||
26 | #include <asm/cplb.h> | 27 | #include <asm/cplb.h> |
27 | #include <asm/cplbinit.h> | 28 | #include <asm/cplbinit.h> |
28 | 29 | ||