cvmx-stxx-defs.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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_STXX_DEFS_H__
  28. #define __CVMX_STXX_DEFS_H__
  29. #define CVMX_STXX_ARB_CTL(block_id) \
  30. CVMX_ADD_IO_SEG(0x0001180090000608ull + (((block_id) & 1) * 0x8000000ull))
  31. #define CVMX_STXX_BCKPRS_CNT(block_id) \
  32. CVMX_ADD_IO_SEG(0x0001180090000688ull + (((block_id) & 1) * 0x8000000ull))
  33. #define CVMX_STXX_COM_CTL(block_id) \
  34. CVMX_ADD_IO_SEG(0x0001180090000600ull + (((block_id) & 1) * 0x8000000ull))
  35. #define CVMX_STXX_DIP_CNT(block_id) \
  36. CVMX_ADD_IO_SEG(0x0001180090000690ull + (((block_id) & 1) * 0x8000000ull))
  37. #define CVMX_STXX_IGN_CAL(block_id) \
  38. CVMX_ADD_IO_SEG(0x0001180090000610ull + (((block_id) & 1) * 0x8000000ull))
  39. #define CVMX_STXX_INT_MSK(block_id) \
  40. CVMX_ADD_IO_SEG(0x00011800900006A0ull + (((block_id) & 1) * 0x8000000ull))
  41. #define CVMX_STXX_INT_REG(block_id) \
  42. CVMX_ADD_IO_SEG(0x0001180090000698ull + (((block_id) & 1) * 0x8000000ull))
  43. #define CVMX_STXX_INT_SYNC(block_id) \
  44. CVMX_ADD_IO_SEG(0x00011800900006A8ull + (((block_id) & 1) * 0x8000000ull))
  45. #define CVMX_STXX_MIN_BST(block_id) \
  46. CVMX_ADD_IO_SEG(0x0001180090000618ull + (((block_id) & 1) * 0x8000000ull))
  47. #define CVMX_STXX_SPI4_CALX(offset, block_id) \
  48. CVMX_ADD_IO_SEG(0x0001180090000400ull + (((offset) & 31) * 8) + (((block_id) & 1) * 0x8000000ull))
  49. #define CVMX_STXX_SPI4_DAT(block_id) \
  50. CVMX_ADD_IO_SEG(0x0001180090000628ull + (((block_id) & 1) * 0x8000000ull))
  51. #define CVMX_STXX_SPI4_STAT(block_id) \
  52. CVMX_ADD_IO_SEG(0x0001180090000630ull + (((block_id) & 1) * 0x8000000ull))
  53. #define CVMX_STXX_STAT_BYTES_HI(block_id) \
  54. CVMX_ADD_IO_SEG(0x0001180090000648ull + (((block_id) & 1) * 0x8000000ull))
  55. #define CVMX_STXX_STAT_BYTES_LO(block_id) \
  56. CVMX_ADD_IO_SEG(0x0001180090000680ull + (((block_id) & 1) * 0x8000000ull))
  57. #define CVMX_STXX_STAT_CTL(block_id) \
  58. CVMX_ADD_IO_SEG(0x0001180090000638ull + (((block_id) & 1) * 0x8000000ull))
  59. #define CVMX_STXX_STAT_PKT_XMT(block_id) \
  60. CVMX_ADD_IO_SEG(0x0001180090000640ull + (((block_id) & 1) * 0x8000000ull))
  61. union cvmx_stxx_arb_ctl {
  62. uint64_t u64;
  63. struct cvmx_stxx_arb_ctl_s {
  64. uint64_t reserved_6_63:58;
  65. uint64_t mintrn:1;
  66. uint64_t reserved_4_4:1;
  67. uint64_t igntpa:1;
  68. uint64_t reserved_0_2:3;
  69. } s;
  70. struct cvmx_stxx_arb_ctl_s cn38xx;
  71. struct cvmx_stxx_arb_ctl_s cn38xxp2;
  72. struct cvmx_stxx_arb_ctl_s cn58xx;
  73. struct cvmx_stxx_arb_ctl_s cn58xxp1;
  74. };
  75. union cvmx_stxx_bckprs_cnt {
  76. uint64_t u64;
  77. struct cvmx_stxx_bckprs_cnt_s {
  78. uint64_t reserved_32_63:32;
  79. uint64_t cnt:32;
  80. } s;
  81. struct cvmx_stxx_bckprs_cnt_s cn38xx;
  82. struct cvmx_stxx_bckprs_cnt_s cn38xxp2;
  83. struct cvmx_stxx_bckprs_cnt_s cn58xx;
  84. struct cvmx_stxx_bckprs_cnt_s cn58xxp1;
  85. };
  86. union cvmx_stxx_com_ctl {
  87. uint64_t u64;
  88. struct cvmx_stxx_com_ctl_s {
  89. uint64_t reserved_4_63:60;
  90. uint64_t st_en:1;
  91. uint64_t reserved_1_2:2;
  92. uint64_t inf_en:1;
  93. } s;
  94. struct cvmx_stxx_com_ctl_s cn38xx;
  95. struct cvmx_stxx_com_ctl_s cn38xxp2;
  96. struct cvmx_stxx_com_ctl_s cn58xx;
  97. struct cvmx_stxx_com_ctl_s cn58xxp1;
  98. };
  99. union cvmx_stxx_dip_cnt {
  100. uint64_t u64;
  101. struct cvmx_stxx_dip_cnt_s {
  102. uint64_t reserved_8_63:56;
  103. uint64_t frmmax:4;
  104. uint64_t dipmax:4;
  105. } s;
  106. struct cvmx_stxx_dip_cnt_s cn38xx;
  107. struct cvmx_stxx_dip_cnt_s cn38xxp2;
  108. struct cvmx_stxx_dip_cnt_s cn58xx;
  109. struct cvmx_stxx_dip_cnt_s cn58xxp1;
  110. };
  111. union cvmx_stxx_ign_cal {
  112. uint64_t u64;
  113. struct cvmx_stxx_ign_cal_s {
  114. uint64_t reserved_16_63:48;
  115. uint64_t igntpa:16;
  116. } s;
  117. struct cvmx_stxx_ign_cal_s cn38xx;
  118. struct cvmx_stxx_ign_cal_s cn38xxp2;
  119. struct cvmx_stxx_ign_cal_s cn58xx;
  120. struct cvmx_stxx_ign_cal_s cn58xxp1;
  121. };
  122. union cvmx_stxx_int_msk {
  123. uint64_t u64;
  124. struct cvmx_stxx_int_msk_s {
  125. uint64_t reserved_8_63:56;
  126. uint64_t frmerr:1;
  127. uint64_t unxfrm:1;
  128. uint64_t nosync:1;
  129. uint64_t diperr:1;
  130. uint64_t datovr:1;
  131. uint64_t ovrbst:1;
  132. uint64_t calpar1:1;
  133. uint64_t calpar0:1;
  134. } s;
  135. struct cvmx_stxx_int_msk_s cn38xx;
  136. struct cvmx_stxx_int_msk_s cn38xxp2;
  137. struct cvmx_stxx_int_msk_s cn58xx;
  138. struct cvmx_stxx_int_msk_s cn58xxp1;
  139. };
  140. union cvmx_stxx_int_reg {
  141. uint64_t u64;
  142. struct cvmx_stxx_int_reg_s {
  143. uint64_t reserved_9_63:55;
  144. uint64_t syncerr:1;
  145. uint64_t frmerr:1;
  146. uint64_t unxfrm:1;
  147. uint64_t nosync:1;
  148. uint64_t diperr:1;
  149. uint64_t datovr:1;
  150. uint64_t ovrbst:1;
  151. uint64_t calpar1:1;
  152. uint64_t calpar0:1;
  153. } s;
  154. struct cvmx_stxx_int_reg_s cn38xx;
  155. struct cvmx_stxx_int_reg_s cn38xxp2;
  156. struct cvmx_stxx_int_reg_s cn58xx;
  157. struct cvmx_stxx_int_reg_s cn58xxp1;
  158. };
  159. union cvmx_stxx_int_sync {
  160. uint64_t u64;
  161. struct cvmx_stxx_int_sync_s {
  162. uint64_t reserved_8_63:56;
  163. uint64_t frmerr:1;
  164. uint64_t unxfrm:1;
  165. uint64_t nosync:1;
  166. uint64_t diperr:1;
  167. uint64_t datovr:1;
  168. uint64_t ovrbst:1;
  169. uint64_t calpar1:1;
  170. uint64_t calpar0:1;
  171. } s;
  172. struct cvmx_stxx_int_sync_s cn38xx;
  173. struct cvmx_stxx_int_sync_s cn38xxp2;
  174. struct cvmx_stxx_int_sync_s cn58xx;
  175. struct cvmx_stxx_int_sync_s cn58xxp1;
  176. };
  177. union cvmx_stxx_min_bst {
  178. uint64_t u64;
  179. struct cvmx_stxx_min_bst_s {
  180. uint64_t reserved_9_63:55;
  181. uint64_t minb:9;
  182. } s;
  183. struct cvmx_stxx_min_bst_s cn38xx;
  184. struct cvmx_stxx_min_bst_s cn38xxp2;
  185. struct cvmx_stxx_min_bst_s cn58xx;
  186. struct cvmx_stxx_min_bst_s cn58xxp1;
  187. };
  188. union cvmx_stxx_spi4_calx {
  189. uint64_t u64;
  190. struct cvmx_stxx_spi4_calx_s {
  191. uint64_t reserved_17_63:47;
  192. uint64_t oddpar:1;
  193. uint64_t prt3:4;
  194. uint64_t prt2:4;
  195. uint64_t prt1:4;
  196. uint64_t prt0:4;
  197. } s;
  198. struct cvmx_stxx_spi4_calx_s cn38xx;
  199. struct cvmx_stxx_spi4_calx_s cn38xxp2;
  200. struct cvmx_stxx_spi4_calx_s cn58xx;
  201. struct cvmx_stxx_spi4_calx_s cn58xxp1;
  202. };
  203. union cvmx_stxx_spi4_dat {
  204. uint64_t u64;
  205. struct cvmx_stxx_spi4_dat_s {
  206. uint64_t reserved_32_63:32;
  207. uint64_t alpha:16;
  208. uint64_t max_t:16;
  209. } s;
  210. struct cvmx_stxx_spi4_dat_s cn38xx;
  211. struct cvmx_stxx_spi4_dat_s cn38xxp2;
  212. struct cvmx_stxx_spi4_dat_s cn58xx;
  213. struct cvmx_stxx_spi4_dat_s cn58xxp1;
  214. };
  215. union cvmx_stxx_spi4_stat {
  216. uint64_t u64;
  217. struct cvmx_stxx_spi4_stat_s {
  218. uint64_t reserved_16_63:48;
  219. uint64_t m:8;
  220. uint64_t reserved_7_7:1;
  221. uint64_t len:7;
  222. } s;
  223. struct cvmx_stxx_spi4_stat_s cn38xx;
  224. struct cvmx_stxx_spi4_stat_s cn38xxp2;
  225. struct cvmx_stxx_spi4_stat_s cn58xx;
  226. struct cvmx_stxx_spi4_stat_s cn58xxp1;
  227. };
  228. union cvmx_stxx_stat_bytes_hi {
  229. uint64_t u64;
  230. struct cvmx_stxx_stat_bytes_hi_s {
  231. uint64_t reserved_32_63:32;
  232. uint64_t cnt:32;
  233. } s;
  234. struct cvmx_stxx_stat_bytes_hi_s cn38xx;
  235. struct cvmx_stxx_stat_bytes_hi_s cn38xxp2;
  236. struct cvmx_stxx_stat_bytes_hi_s cn58xx;
  237. struct cvmx_stxx_stat_bytes_hi_s cn58xxp1;
  238. };
  239. union cvmx_stxx_stat_bytes_lo {
  240. uint64_t u64;
  241. struct cvmx_stxx_stat_bytes_lo_s {
  242. uint64_t reserved_32_63:32;
  243. uint64_t cnt:32;
  244. } s;
  245. struct cvmx_stxx_stat_bytes_lo_s cn38xx;
  246. struct cvmx_stxx_stat_bytes_lo_s cn38xxp2;
  247. struct cvmx_stxx_stat_bytes_lo_s cn58xx;
  248. struct cvmx_stxx_stat_bytes_lo_s cn58xxp1;
  249. };
  250. union cvmx_stxx_stat_ctl {
  251. uint64_t u64;
  252. struct cvmx_stxx_stat_ctl_s {
  253. uint64_t reserved_5_63:59;
  254. uint64_t clr:1;
  255. uint64_t bckprs:4;
  256. } s;
  257. struct cvmx_stxx_stat_ctl_s cn38xx;
  258. struct cvmx_stxx_stat_ctl_s cn38xxp2;
  259. struct cvmx_stxx_stat_ctl_s cn58xx;
  260. struct cvmx_stxx_stat_ctl_s cn58xxp1;
  261. };
  262. union cvmx_stxx_stat_pkt_xmt {
  263. uint64_t u64;
  264. struct cvmx_stxx_stat_pkt_xmt_s {
  265. uint64_t reserved_32_63:32;
  266. uint64_t cnt:32;
  267. } s;
  268. struct cvmx_stxx_stat_pkt_xmt_s cn38xx;
  269. struct cvmx_stxx_stat_pkt_xmt_s cn38xxp2;
  270. struct cvmx_stxx_stat_pkt_xmt_s cn58xx;
  271. struct cvmx_stxx_stat_pkt_xmt_s cn58xxp1;
  272. };
  273. #endif