cacheflush_no.h 2.2 KB

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