cvmx-mixx-defs.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /***********************license start***************
  2. * Author: Cavium Networks
  3. *
  4. * Contact: support@caviumnetworks.com
  5. * This file is part of the OCTEON SDK
  6. *
  7. * Copyright (c) 2003-2008 Cavium Networks
  8. *
  9. * This file is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License, Version 2, as
  11. * published by the Free Software Foundation.
  12. *
  13. * This file is distributed in the hope that it will be useful, but
  14. * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
  15. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
  16. * NONINFRINGEMENT. See the GNU General Public License for more
  17. * details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this file; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  22. * or visit http://www.gnu.org/licenses/.
  23. *
  24. * This file may also be available under a different license from Cavium.
  25. * Contact Cavium Networks for more information
  26. ***********************license end**************************************/
  27. #ifndef __CVMX_MIXX_DEFS_H__
  28. #define __CVMX_MIXX_DEFS_H__
  29. #define CVMX_MIXX_BIST(offset) \
  30. CVMX_ADD_IO_SEG(0x0001070000100078ull + (((offset) & 1) * 2048))
  31. #define CVMX_MIXX_CTL(offset) \
  32. CVMX_ADD_IO_SEG(0x0001070000100020ull + (((offset) & 1) * 2048))
  33. #define CVMX_MIXX_INTENA(offset) \
  34. CVMX_ADD_IO_SEG(0x0001070000100050ull + (((offset) & 1) * 2048))
  35. #define CVMX_MIXX_IRCNT(offset) \
  36. CVMX_ADD_IO_SEG(0x0001070000100030ull + (((offset) & 1) * 2048))
  37. #define CVMX_MIXX_IRHWM(offset) \
  38. CVMX_ADD_IO_SEG(0x0001070000100028ull + (((offset) & 1) * 2048))
  39. #define CVMX_MIXX_IRING1(offset) \
  40. CVMX_ADD_IO_SEG(0x0001070000100010ull + (((offset) & 1) * 2048))
  41. #define CVMX_MIXX_IRING2(offset) \
  42. CVMX_ADD_IO_SEG(0x0001070000100018ull + (((offset) & 1) * 2048))
  43. #define CVMX_MIXX_ISR(offset) \
  44. CVMX_ADD_IO_SEG(0x0001070000100048ull + (((offset) & 1) * 2048))
  45. #define CVMX_MIXX_ORCNT(offset) \
  46. CVMX_ADD_IO_SEG(0x0001070000100040ull + (((offset) & 1) * 2048))
  47. #define CVMX_MIXX_ORHWM(offset) \
  48. CVMX_ADD_IO_SEG(0x0001070000100038ull + (((offset) & 1) * 2048))
  49. #define CVMX_MIXX_ORING1(offset) \
  50. CVMX_ADD_IO_SEG(0x0001070000100000ull + (((offset) & 1) * 2048))
  51. #define CVMX_MIXX_ORING2(offset) \
  52. CVMX_ADD_IO_SEG(0x0001070000100008ull + (((offset) & 1) * 2048))
  53. #define CVMX_MIXX_REMCNT(offset) \
  54. CVMX_ADD_IO_SEG(0x0001070000100058ull + (((offset) & 1) * 2048))
  55. union cvmx_mixx_bist {
  56. uint64_t u64;
  57. struct cvmx_mixx_bist_s {
  58. uint64_t reserved_4_63:60;
  59. uint64_t mrqdat:1;
  60. uint64_t ipfdat:1;
  61. uint64_t irfdat:1;
  62. uint64_t orfdat:1;
  63. } s;
  64. struct cvmx_mixx_bist_s cn52xx;
  65. struct cvmx_mixx_bist_s cn52xxp1;
  66. struct cvmx_mixx_bist_s cn56xx;
  67. struct cvmx_mixx_bist_s cn56xxp1;
  68. };
  69. union cvmx_mixx_ctl {
  70. uint64_t u64;
  71. struct cvmx_mixx_ctl_s {
  72. uint64_t reserved_8_63:56;
  73. uint64_t crc_strip:1;
  74. uint64_t busy:1;
  75. uint64_t en:1;
  76. uint64_t reset:1;
  77. uint64_t lendian:1;
  78. uint64_t nbtarb:1;
  79. uint64_t mrq_hwm:2;
  80. } s;
  81. struct cvmx_mixx_ctl_s cn52xx;
  82. struct cvmx_mixx_ctl_s cn52xxp1;
  83. struct cvmx_mixx_ctl_s cn56xx;
  84. struct cvmx_mixx_ctl_s cn56xxp1;
  85. };
  86. union cvmx_mixx_intena {
  87. uint64_t u64;
  88. struct cvmx_mixx_intena_s {
  89. uint64_t reserved_7_63:57;
  90. uint64_t orunena:1;
  91. uint64_t irunena:1;
  92. uint64_t data_drpena:1;
  93. uint64_t ithena:1;
  94. uint64_t othena:1;
  95. uint64_t ivfena:1;
  96. uint64_t ovfena:1;
  97. } s;
  98. struct cvmx_mixx_intena_s cn52xx;
  99. struct cvmx_mixx_intena_s cn52xxp1;
  100. struct cvmx_mixx_intena_s cn56xx;
  101. struct cvmx_mixx_intena_s cn56xxp1;
  102. };
  103. union cvmx_mixx_ircnt {
  104. uint64_t u64;
  105. struct cvmx_mixx_ircnt_s {
  106. uint64_t reserved_20_63:44;
  107. uint64_t ircnt:20;
  108. } s;
  109. struct cvmx_mixx_ircnt_s cn52xx;
  110. struct cvmx_mixx_ircnt_s cn52xxp1;
  111. struct cvmx_mixx_ircnt_s cn56xx;
  112. struct cvmx_mixx_ircnt_s cn56xxp1;
  113. };
  114. union cvmx_mixx_irhwm {
  115. uint64_t u64;
  116. struct cvmx_mixx_irhwm_s {
  117. uint64_t reserved_40_63:24;
  118. uint64_t ibplwm:20;
  119. uint64_t irhwm:20;
  120. } s;
  121. struct cvmx_mixx_irhwm_s cn52xx;
  122. struct cvmx_mixx_irhwm_s cn52xxp1;
  123. struct cvmx_mixx_irhwm_s cn56xx;
  124. struct cvmx_mixx_irhwm_s cn56xxp1;
  125. };
  126. union cvmx_mixx_iring1 {
  127. uint64_t u64;
  128. struct cvmx_mixx_iring1_s {
  129. uint64_t reserved_60_63:4;
  130. uint64_t isize:20;
  131. uint64_t reserved_36_39:4;
  132. uint64_t ibase:33;
  133. uint64_t reserved_0_2:3;
  134. } s;
  135. struct cvmx_mixx_iring1_s cn52xx;
  136. struct cvmx_mixx_iring1_s cn52xxp1;
  137. struct cvmx_mixx_iring1_s cn56xx;
  138. struct cvmx_mixx_iring1_s cn56xxp1;
  139. };
  140. union cvmx_mixx_iring2 {
  141. uint64_t u64;
  142. struct cvmx_mixx_iring2_s {
  143. uint64_t reserved_52_63:12;
  144. uint64_t itlptr:20;
  145. uint64_t reserved_20_31:12;
  146. uint64_t idbell:20;
  147. } s;
  148. struct cvmx_mixx_iring2_s cn52xx;
  149. struct cvmx_mixx_iring2_s cn52xxp1;
  150. struct cvmx_mixx_iring2_s cn56xx;
  151. struct cvmx_mixx_iring2_s cn56xxp1;
  152. };
  153. union cvmx_mixx_isr {
  154. uint64_t u64;
  155. struct cvmx_mixx_isr_s {
  156. uint64_t reserved_7_63:57;
  157. uint64_t orun:1;
  158. uint64_t irun:1;
  159. uint64_t data_drp:1;
  160. uint64_t irthresh:1;
  161. uint64_t orthresh:1;
  162. uint64_t idblovf:1;
  163. uint64_t odblovf:1;
  164. } s;
  165. struct cvmx_mixx_isr_s cn52xx;
  166. struct cvmx_mixx_isr_s cn52xxp1;
  167. struct cvmx_mixx_isr_s cn56xx;
  168. struct cvmx_mixx_isr_s cn56xxp1;
  169. };
  170. union cvmx_mixx_orcnt {
  171. uint64_t u64;
  172. struct cvmx_mixx_orcnt_s {
  173. uint64_t reserved_20_63:44;
  174. uint64_t orcnt:20;
  175. } s;
  176. struct cvmx_mixx_orcnt_s cn52xx;
  177. struct cvmx_mixx_orcnt_s cn52xxp1;
  178. struct cvmx_mixx_orcnt_s cn56xx;
  179. struct cvmx_mixx_orcnt_s cn56xxp1;
  180. };
  181. union cvmx_mixx_orhwm {
  182. uint64_t u64;
  183. struct cvmx_mixx_orhwm_s {
  184. uint64_t reserved_20_63:44;
  185. uint64_t orhwm:20;
  186. } s;
  187. struct cvmx_mixx_orhwm_s cn52xx;
  188. struct cvmx_mixx_orhwm_s cn52xxp1;
  189. struct cvmx_mixx_orhwm_s cn56xx;
  190. struct cvmx_mixx_orhwm_s cn56xxp1;
  191. };
  192. union cvmx_mixx_oring1 {
  193. uint64_t u64;
  194. struct cvmx_mixx_oring1_s {
  195. uint64_t reserved_60_63:4;
  196. uint64_t osize:20;
  197. uint64_t reserved_36_39:4;
  198. uint64_t obase:33;
  199. uint64_t reserved_0_2:3;
  200. } s;
  201. struct cvmx_mixx_oring1_s cn52xx;
  202. struct cvmx_mixx_oring1_s cn52xxp1;
  203. struct cvmx_mixx_oring1_s cn56xx;
  204. struct cvmx_mixx_oring1_s cn56xxp1;
  205. };
  206. union cvmx_mixx_oring2 {
  207. uint64_t u64;
  208. struct cvmx_mixx_oring2_s {
  209. uint64_t reserved_52_63:12;
  210. uint64_t otlptr:20;
  211. uint64_t reserved_20_31:12;
  212. uint64_t odbell:20;
  213. } s;
  214. struct cvmx_mixx_oring2_s cn52xx;
  215. struct cvmx_mixx_oring2_s cn52xxp1;
  216. struct cvmx_mixx_oring2_s cn56xx;
  217. struct cvmx_mixx_oring2_s cn56xxp1;
  218. };
  219. union cvmx_mixx_remcnt {
  220. uint64_t u64;
  221. struct cvmx_mixx_remcnt_s {
  222. uint64_t reserved_52_63:12;
  223. uint64_t iremcnt:20;
  224. uint64_t reserved_20_31:12;
  225. uint64_t oremcnt:20;
  226. } s;
  227. struct cvmx_mixx_remcnt_s cn52xx;
  228. struct cvmx_mixx_remcnt_s cn52xxp1;
  229. struct cvmx_mixx_remcnt_s cn56xx;
  230. struct cvmx_mixx_remcnt_s cn56xxp1;
  231. };
  232. #endif