glue-cache.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*
  2. * arch/arm/include/asm/glue-cache.h
  3. *
  4. * Copyright (C) 1999-2002 Russell King
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef ASM_GLUE_CACHE_H
  11. #define ASM_GLUE_CACHE_H
  12. #include <asm/glue.h>
  13. /*
  14. * Cache Model
  15. * ===========
  16. */
  17. #undef _CACHE
  18. #undef MULTI_CACHE
  19. #if defined(CONFIG_CPU_CACHE_V3)
  20. # ifdef _CACHE
  21. # define MULTI_CACHE 1
  22. # else
  23. # define _CACHE v3
  24. # endif
  25. #endif
  26. #if defined(CONFIG_CPU_CACHE_V4)
  27. # ifdef _CACHE
  28. # define MULTI_CACHE 1
  29. # else
  30. # define _CACHE v4
  31. # endif
  32. #endif
  33. #if defined(CONFIG_CPU_ARM920T) || defined(CONFIG_CPU_ARM922T) || \
  34. defined(CONFIG_CPU_ARM925T) || defined(CONFIG_CPU_ARM1020) || \
  35. defined(CONFIG_CPU_ARM1026)
  36. # define MULTI_CACHE 1
  37. #endif
  38. #if defined(CONFIG_CPU_FA526)
  39. # ifdef _CACHE
  40. # define MULTI_CACHE 1
  41. # else
  42. # define _CACHE fa
  43. # endif
  44. #endif
  45. #if defined(CONFIG_CPU_ARM926T)
  46. # ifdef _CACHE
  47. # define MULTI_CACHE 1
  48. # else
  49. # define _CACHE arm926
  50. # endif
  51. #endif
  52. #if defined(CONFIG_CPU_ARM940T)
  53. # ifdef _CACHE
  54. # define MULTI_CACHE 1
  55. # else
  56. # define _CACHE arm940
  57. # endif
  58. #endif
  59. #if defined(CONFIG_CPU_ARM946E)
  60. # ifdef _CACHE
  61. # define MULTI_CACHE 1
  62. # else
  63. # define _CACHE arm946
  64. # endif
  65. #endif
  66. #if defined(CONFIG_CPU_CACHE_V4WB)
  67. # ifdef _CACHE
  68. # define MULTI_CACHE 1
  69. # else
  70. # define _CACHE v4wb
  71. # endif
  72. #endif
  73. #if defined(CONFIG_CPU_XSCALE)
  74. # ifdef _CACHE
  75. # define MULTI_CACHE 1
  76. # else
  77. # define _CACHE xscale
  78. # endif
  79. #endif
  80. #if defined(CONFIG_CPU_XSC3)
  81. # ifdef _CACHE
  82. # define MULTI_CACHE 1
  83. # else
  84. # define _CACHE xsc3
  85. # endif
  86. #endif
  87. #if defined(CONFIG_CPU_MOHAWK)
  88. # ifdef _CACHE
  89. # define MULTI_CACHE 1
  90. # else
  91. # define _CACHE mohawk
  92. # endif
  93. #endif
  94. #if defined(CONFIG_CPU_FEROCEON)
  95. # define MULTI_CACHE 1
  96. #endif
  97. #if defined(CONFIG_CPU_V6) || defined(CONFIG_CPU_V6K)
  98. //# ifdef _CACHE
  99. # define MULTI_CACHE 1
  100. //# else
  101. //# define _CACHE v6
  102. //# endif
  103. #endif
  104. #if defined(CONFIG_CPU_V7)
  105. //# ifdef _CACHE
  106. # define MULTI_CACHE 1
  107. //# else
  108. //# define _CACHE v7
  109. //# endif
  110. #endif
  111. #if !defined(_CACHE) && !defined(MULTI_CACHE)
  112. #error Unknown cache maintenance model
  113. #endif
  114. #ifndef MULTI_CACHE
  115. #define __cpuc_flush_icache_all __glue(_CACHE,_flush_icache_all)
  116. #define __cpuc_flush_kern_all __glue(_CACHE,_flush_kern_cache_all)
  117. #define __cpuc_flush_kern_louis __glue(_CACHE,_flush_kern_cache_louis)
  118. #define __cpuc_flush_user_all __glue(_CACHE,_flush_user_cache_all)
  119. #define __cpuc_flush_user_range __glue(_CACHE,_flush_user_cache_range)
  120. #define __cpuc_coherent_kern_range __glue(_CACHE,_coherent_kern_range)
  121. #define __cpuc_coherent_user_range __glue(_CACHE,_coherent_user_range)
  122. #define __cpuc_flush_dcache_area __glue(_CACHE,_flush_kern_dcache_area)
  123. #define dmac_map_area __glue(_CACHE,_dma_map_area)
  124. #define dmac_unmap_area __glue(_CACHE,_dma_unmap_area)
  125. #define dmac_flush_range __glue(_CACHE,_dma_flush_range)
  126. #endif
  127. #endif