hw_dspcache.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. /**
  2. * \file hw_cache.h
  3. *
  4. * \brief Hardware registers and fields for cache module
  5. */
  6. /*
  7. * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
  8. */
  9. /*
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. *
  14. * Redistributions of source code must retain the above copyright
  15. * notice, this list of conditions and the following disclaimer.
  16. *
  17. * Redistributions in binary form must reproduce the above copyright
  18. * notice, this list of conditions and the following disclaimer in the
  19. * documentation and/or other materials provided with the
  20. * distribution.
  21. *
  22. * Neither the name of Texas Instruments Incorporated nor the names of
  23. * its contributors may be used to endorse or promote products derived
  24. * from this software without specific prior written permission.
  25. *
  26. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  27. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  28. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  29. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  30. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  31. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  32. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  33. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  34. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  35. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  36. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. */
  39. #ifndef HW_CACHE_H_
  40. #define HW_CACHE_H_
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. /******************************************************************************
  45. ** DSP MEMORY SYSTEM REGISTER OFFSETS
  46. ******************************************************************************/
  47. #define DSPCACHE_L2CFG (0x0000)
  48. #define DSPCACHE_L1PCFG (0x0020)
  49. #define DSPCACHE_L1PCC (0x0024)
  50. #define DSPCACHE_L1DCFG (0x0040)
  51. #define DSPCACHE_L1DCC (0x0044)
  52. #define DSPCACHE_L2WBAR (0x4000)
  53. #define DSPCACHE_L2WWC (0x4004)
  54. #define DSPCACHE_L2WIBAR (0x4010)
  55. #define DSPCACHE_L2WIWC (0x4014)
  56. #define DSPCACHE_L2IBAR (0x4018)
  57. #define DSPCACHE_L2IWC (0x401C)
  58. #define DSPCACHE_L1PIBAR (0x4020)
  59. #define DSPCACHE_L1PIWC (0x4024)
  60. #define DSPCACHE_L1DWIBAR (0x4030)
  61. #define DSPCACHE_L1DWIWC (0x4034)
  62. #define DSPCACHE_L1DWBAR (0x4040)
  63. #define DSPCACHE_L1DWWC (0x4044)
  64. #define DSPCACHE_L1DIBAR (0x4048)
  65. #define DSPCACHE_L1DIWC (0x404C)
  66. #define DSPCACHE_L2WB (0x5000)
  67. #define DSPCACHE_L2WBINV (0x5004)
  68. #define DSPCACHE_L2INV (0x5008)
  69. #define DSPCACHE_L1PINV (0x5028)
  70. #define DSPCACHE_L1DWB (0x5040)
  71. #define DSPCACHE_L1DWBINV (0x5044)
  72. #define DSPCACHE_L1DINV (0x5048)
  73. #define DSPCACHE_MAR(n) (0x8000 + ((n)*4))
  74. /******************************************************************************
  75. ** FIELD DEFINITION MACROS
  76. ******************************************************************************/
  77. /**
  78. * \registers L1P CACHE
  79. *
  80. * \brief These registers allow for changing L1P cache modes and manually
  81. * initiating cache coherence operations.
  82. */
  83. /* L1PCFG */
  84. #define DSPCACHE_L1PCFG_L1PMODE (0x00000007)
  85. #define DSPCACHE_L1PCFG_L1PMODE_SHIFT (0x00000000)
  86. /* L1PCC */
  87. #define DSPCACHE_L1PCC_POPER (0x00010000)
  88. #define DSPCACHE_L1PCC_POPER_SHIFT (0x00000010)
  89. #define DSPCACHE_L1PCC_OPER (0x00000001)
  90. #define DSPCACHE_L1PCC_OPER_SHIFT (0x00000000)
  91. /* L1PIWC */
  92. #define DSPCACHE_L1PIWC_L1PIWC (0x0000FFFF)
  93. #define DSPCACHE_L1PIWC_L1PIWC_SHIFT (0x00000000)
  94. /* L1PINV */
  95. #define DSPCACHE_L1PINV_I (0x00000001)
  96. #define DSPCACHE_L1PINV_I_SHIFT (0x00000000)
  97. /**
  98. * \registers L1D CACHE
  99. *
  100. * \brief These registers allow for changing L1D cache modes and manually
  101. * initiating cache coherence operations.
  102. */
  103. /* L1DCFG */
  104. #define DSPCACHE_L1DCFG_L1DMODE (0x00000007)
  105. #define DSPCACHE_L1DCFG_L1DMODE_SHIFT (0x00000000)
  106. /* L1DCC */
  107. #define DSPCACHE_L1DCC_POPER (0x00010000)
  108. #define DSPCACHE_L1DCC_POPER_SHIFT (0x00000010)
  109. #define DSPCACHE_L1DCC_OPER (0x00000001)
  110. #define DSPCACHE_L1DCC_OPER_SHIFT (0x00000000)
  111. /* L1DWIWC */
  112. #define DSPCACHE_L1DWIWC_L1DWIWC (0x0000FFFF)
  113. #define DSPCACHE_L1DWIWC_L1DWIWC_SHIFT (0x00000000)
  114. /* L1DWWC */
  115. #define DSPCACHE_L1DWWC_L1DWWC (0x0000FFFF)
  116. #define DSPCACHE_L1DWWC_L1DWWC_SHIFT (0x00000000)
  117. /* L1DIWC */
  118. #define DSPCACHE_L1DIWC_L1DIWC (0x0000FFFF)
  119. #define DSPCACHE_L1DIWC_L1DIWC_SHIFT (0x00000000)
  120. /* L1DWB */
  121. #define DSPCACHE_L1DWB_C (0x00000001)
  122. #define DSPCACHE_L1DWB_C_SHIFT (0x00000000)
  123. /* L1DWBINV */
  124. #define DSPCACHE_L1DWBINV_C (0x00000001)
  125. #define DSPCACHE_L1DWBINV_C_SHIFT (0x00000000)
  126. /* L1DINV */
  127. #define DSPCACHE_L1DINV_I (0x00000001)
  128. #define DSPCACHE_L1DINV_I_SHIFT (0x00000000)
  129. /**
  130. * \registers L2 CACHE
  131. *
  132. * \brief These registers allow for changing L2 cache modes and manually
  133. * initiating cache coherence operations.
  134. */
  135. /* L2CFG */
  136. #define DSPCACHE_L2CFG_L2MODE (0x00000007)
  137. #define DSPCACHE_L2CFG_L2MODE_SHIFT (0x00000000)
  138. #define DSPCACHE_L2CFG_L2CC (0x00000008)
  139. #define DSPCACHE_L2CFG_L2CC_SHIFT (0x00000003)
  140. #define DSPCACHE_L2CFG_ID (0x00000100)
  141. #define DSPCACHE_L2CFG_ID_SHIFT (0x00000008)
  142. #define DSPCACHE_L2CFG_IP (0x00000200)
  143. #define DSPCACHE_L2CFG_IP_SHIFT (0x00000009)
  144. #define DSPCACHE_L2CFG_MMID (0x000F0000)
  145. #define DSPCACHE_L2CFG_MMID_SHIFT (0x00000010)
  146. #define DSPCACHE_L2CFG_NUM_MM (0x0F000000)
  147. #define DSPCACHE_L2CFG_NUM_MM_SHIFT (0x00000018)
  148. /* L2WWC */
  149. #define DSPCACHE_L2WWC_L2WWC (0x0000FFFF)
  150. #define DSPCACHE_L2WWC_L2WWC_SHIFT (0x00000000)
  151. /* L2WIWC */
  152. #define DSPCACHE_L2WIWC_L2WIWC (0x0000FFFF)
  153. #define DSPCACHE_L2WIWC_L2WIWC_SHIFT (0x00000000)
  154. /* L2IWC */
  155. #define DSPCACHE_L2IWC_L2IWC (0x0000FFFF)
  156. #define DSPCACHE_L2IWC_L2IWC_SHIFT (0x00000000)
  157. /* L2WB */
  158. #define DSPCACHE_L2WB_C (0x00000001)
  159. #define DSPCACHE_L2WB_C_SHIFT (0x00000000)
  160. /* L2WBINV */
  161. #define DSPCACHE_L2WBINV_C (0x00000001)
  162. #define DSPCACHE_L2WBINV_C_SHIFT (0x00000000)
  163. /* L2INV */
  164. #define DSPCACHE_L2INV_I (0x00000001)
  165. #define DSPCACHE_L2INV_I_SHIFT (0x00000000)
  166. /* MAR */
  167. #define DSPCACHE_MAR_PC (0x00000001)
  168. #define DSPCACHE_MAR_PC_SHIFT (0x00000000)
  169. #ifdef __cplusplus
  170. }
  171. #endif
  172. #endif