29f76204ce1d8592a18a027c778215dd7b9018c7
[pandora-kernel.git] / arch / m68k / include / asm / cacheflush_no.h
1 #ifndef _M68KNOMMU_CACHEFLUSH_H
2 #define _M68KNOMMU_CACHEFLUSH_H
3
4 /*
5  * (C) Copyright 2000-2004, Greg Ungerer <gerg@snapgear.com>
6  */
7 #include <linux/mm.h>
8 #if defined(CONFIG_M5407) || defined(CONFIG_M548x)
9 #include <asm/m54xxacr.h>
10 #endif
11
12 #define flush_cache_all()                       __flush_cache_all()
13 #define flush_cache_mm(mm)                      do { } while (0)
14 #define flush_cache_dup_mm(mm)                  do { } while (0)
15 #define flush_cache_range(vma, start, end)      __flush_cache_all()
16 #define flush_cache_page(vma, vmaddr)           do { } while (0)
17 #ifndef flush_dcache_range
18 #define flush_dcache_range(start,len)           __flush_cache_all()
19 #endif
20 #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 0
21 #define flush_dcache_page(page)                 do { } while (0)
22 #define flush_dcache_mmap_lock(mapping)         do { } while (0)
23 #define flush_dcache_mmap_unlock(mapping)       do { } while (0)
24 #define flush_icache_range(start,len)           __flush_cache_all()
25 #define flush_icache_page(vma,pg)               do { } while (0)
26 #define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
27 #define flush_cache_vmap(start, end)            do { } while (0)
28 #define flush_cache_vunmap(start, end)          do { } while (0)
29
30 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
31         memcpy(dst, src, len)
32 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
33         memcpy(dst, src, len)
34
35 #ifndef __flush_cache_all
36 static inline void __flush_cache_all(void)
37 {
38 #if defined(CONFIG_M523x) || defined(CONFIG_M527x)
39         __asm__ __volatile__ (
40                 "movel  #0x81400100, %%d0\n\t"
41                 "movec  %%d0, %%CACR\n\t"
42                 "nop\n\t"
43                 : : : "d0" );
44 #endif /* CONFIG_M523x || CONFIG_M527x */
45 #if defined(CONFIG_M528x)
46         __asm__ __volatile__ (
47                 "movel  #0x81000200, %%d0\n\t"
48                 "movec  %%d0, %%CACR\n\t"
49                 "nop\n\t"
50                 : : : "d0" );
51 #endif /* CONFIG_M528x */
52 #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272)
53         __asm__ __volatile__ (
54                 "movel  #0x81000100, %%d0\n\t"
55                 "movec  %%d0, %%CACR\n\t"
56                 "nop\n\t"
57                 : : : "d0" );
58 #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */
59 #ifdef CONFIG_M5249
60         __asm__ __volatile__ (
61                 "movel  #0xa1000200, %%d0\n\t"
62                 "movec  %%d0, %%CACR\n\t"
63                 "nop\n\t"
64                 : : : "d0" );
65 #endif /* CONFIG_M5249 */
66 #ifdef CONFIG_M532x
67         __asm__ __volatile__ (
68                 "movel  #0x81000200, %%d0\n\t"
69                 "movec  %%d0, %%CACR\n\t"
70                 "nop\n\t"
71                 : : : "d0" );
72 #endif /* CONFIG_M532x */
73 }
74 #endif /* __flush_cache_all */
75
76 #endif /* _M68KNOMMU_CACHEFLUSH_H */