cvmx-stxx-defs.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  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-2012 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) (CVMX_ADD_IO_SEG(0x0001180090000608ull) + ((block_id) & 1) * 0x8000000ull)
  30. #define CVMX_STXX_BCKPRS_CNT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000688ull) + ((block_id) & 1) * 0x8000000ull)
  31. #define CVMX_STXX_COM_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000600ull) + ((block_id) & 1) * 0x8000000ull)
  32. #define CVMX_STXX_DIP_CNT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000690ull) + ((block_id) & 1) * 0x8000000ull)
  33. #define CVMX_STXX_IGN_CAL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000610ull) + ((block_id) & 1) * 0x8000000ull)
  34. #define CVMX_STXX_INT_MSK(block_id) (CVMX_ADD_IO_SEG(0x00011800900006A0ull) + ((block_id) & 1) * 0x8000000ull)
  35. #define CVMX_STXX_INT_REG(block_id) (CVMX_ADD_IO_SEG(0x0001180090000698ull) + ((block_id) & 1) * 0x8000000ull)
  36. #define CVMX_STXX_INT_SYNC(block_id) (CVMX_ADD_IO_SEG(0x00011800900006A8ull) + ((block_id) & 1) * 0x8000000ull)
  37. #define CVMX_STXX_MIN_BST(block_id) (CVMX_ADD_IO_SEG(0x0001180090000618ull) + ((block_id) & 1) * 0x8000000ull)
  38. #define CVMX_STXX_SPI4_CALX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001180090000400ull) + (((offset) & 31) + ((block_id) & 1) * 0x1000000ull) * 8)
  39. #define CVMX_STXX_SPI4_DAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000628ull) + ((block_id) & 1) * 0x8000000ull)
  40. #define CVMX_STXX_SPI4_STAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000630ull) + ((block_id) & 1) * 0x8000000ull)
  41. #define CVMX_STXX_STAT_BYTES_HI(block_id) (CVMX_ADD_IO_SEG(0x0001180090000648ull) + ((block_id) & 1) * 0x8000000ull)
  42. #define CVMX_STXX_STAT_BYTES_LO(block_id) (CVMX_ADD_IO_SEG(0x0001180090000680ull) + ((block_id) & 1) * 0x8000000ull)
  43. #define CVMX_STXX_STAT_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000638ull) + ((block_id) & 1) * 0x8000000ull)
  44. #define CVMX_STXX_STAT_PKT_XMT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000640ull) + ((block_id) & 1) * 0x8000000ull)
  45. union cvmx_stxx_arb_ctl {
  46. uint64_t u64;
  47. struct cvmx_stxx_arb_ctl_s {
  48. #ifdef __BIG_ENDIAN_BITFIELD
  49. uint64_t reserved_6_63:58;
  50. uint64_t mintrn:1;
  51. uint64_t reserved_4_4:1;
  52. uint64_t igntpa:1;
  53. uint64_t reserved_0_2:3;
  54. #else
  55. uint64_t reserved_0_2:3;
  56. uint64_t igntpa:1;
  57. uint64_t reserved_4_4:1;
  58. uint64_t mintrn:1;
  59. uint64_t reserved_6_63:58;
  60. #endif
  61. } s;
  62. struct cvmx_stxx_arb_ctl_s cn38xx;
  63. struct cvmx_stxx_arb_ctl_s cn38xxp2;
  64. struct cvmx_stxx_arb_ctl_s cn58xx;
  65. struct cvmx_stxx_arb_ctl_s cn58xxp1;
  66. };
  67. union cvmx_stxx_bckprs_cnt {
  68. uint64_t u64;
  69. struct cvmx_stxx_bckprs_cnt_s {
  70. #ifdef __BIG_ENDIAN_BITFIELD
  71. uint64_t reserved_32_63:32;
  72. uint64_t cnt:32;
  73. #else
  74. uint64_t cnt:32;
  75. uint64_t reserved_32_63:32;
  76. #endif
  77. } s;
  78. struct cvmx_stxx_bckprs_cnt_s cn38xx;
  79. struct cvmx_stxx_bckprs_cnt_s cn38xxp2;
  80. struct cvmx_stxx_bckprs_cnt_s cn58xx;
  81. struct cvmx_stxx_bckprs_cnt_s cn58xxp1;
  82. };
  83. union cvmx_stxx_com_ctl {
  84. uint64_t u64;
  85. struct cvmx_stxx_com_ctl_s {
  86. #ifdef __BIG_ENDIAN_BITFIELD
  87. uint64_t reserved_4_63:60;
  88. uint64_t st_en:1;
  89. uint64_t reserved_1_2:2;
  90. uint64_t inf_en:1;
  91. #else
  92. uint64_t inf_en:1;
  93. uint64_t reserved_1_2:2;
  94. uint64_t st_en:1;
  95. uint64_t reserved_4_63:60;
  96. #endif
  97. } s;
  98. struct cvmx_stxx_com_ctl_s cn38xx;
  99. struct cvmx_stxx_com_ctl_s cn38xxp2;
  100. struct cvmx_stxx_com_ctl_s cn58xx;
  101. struct cvmx_stxx_com_ctl_s cn58xxp1;
  102. };
  103. union cvmx_stxx_dip_cnt {
  104. uint64_t u64;
  105. struct cvmx_stxx_dip_cnt_s {
  106. #ifdef __BIG_ENDIAN_BITFIELD
  107. uint64_t reserved_8_63:56;
  108. uint64_t frmmax:4;
  109. uint64_t dipmax:4;
  110. #else
  111. uint64_t dipmax:4;
  112. uint64_t frmmax:4;
  113. uint64_t reserved_8_63:56;
  114. #endif
  115. } s;
  116. struct cvmx_stxx_dip_cnt_s cn38xx;
  117. struct cvmx_stxx_dip_cnt_s cn38xxp2;
  118. struct cvmx_stxx_dip_cnt_s cn58xx;
  119. struct cvmx_stxx_dip_cnt_s cn58xxp1;
  120. };
  121. union cvmx_stxx_ign_cal {
  122. uint64_t u64;
  123. struct cvmx_stxx_ign_cal_s {
  124. #ifdef __BIG_ENDIAN_BITFIELD
  125. uint64_t reserved_16_63:48;
  126. uint64_t igntpa:16;
  127. #else
  128. uint64_t igntpa:16;
  129. uint64_t reserved_16_63:48;
  130. #endif
  131. } s;
  132. struct cvmx_stxx_ign_cal_s cn38xx;
  133. struct cvmx_stxx_ign_cal_s cn38xxp2;
  134. struct cvmx_stxx_ign_cal_s cn58xx;
  135. struct cvmx_stxx_ign_cal_s cn58xxp1;
  136. };
  137. union cvmx_stxx_int_msk {
  138. uint64_t u64;
  139. struct cvmx_stxx_int_msk_s {
  140. #ifdef __BIG_ENDIAN_BITFIELD
  141. uint64_t reserved_8_63:56;
  142. uint64_t frmerr:1;
  143. uint64_t unxfrm:1;
  144. uint64_t nosync:1;
  145. uint64_t diperr:1;
  146. uint64_t datovr:1;
  147. uint64_t ovrbst:1;
  148. uint64_t calpar1:1;
  149. uint64_t calpar0:1;
  150. #else
  151. uint64_t calpar0:1;
  152. uint64_t calpar1:1;
  153. uint64_t ovrbst:1;
  154. uint64_t datovr:1;
  155. uint64_t diperr:1;
  156. uint64_t nosync:1;
  157. uint64_t unxfrm:1;
  158. uint64_t frmerr:1;
  159. uint64_t reserved_8_63:56;
  160. #endif
  161. } s;
  162. struct cvmx_stxx_int_msk_s cn38xx;
  163. struct cvmx_stxx_int_msk_s cn38xxp2;
  164. struct cvmx_stxx_int_msk_s cn58xx;
  165. struct cvmx_stxx_int_msk_s cn58xxp1;
  166. };
  167. union cvmx_stxx_int_reg {
  168. uint64_t u64;
  169. struct cvmx_stxx_int_reg_s {
  170. #ifdef __BIG_ENDIAN_BITFIELD
  171. uint64_t reserved_9_63:55;
  172. uint64_t syncerr:1;
  173. uint64_t frmerr:1;
  174. uint64_t unxfrm:1;
  175. uint64_t nosync:1;
  176. uint64_t diperr:1;
  177. uint64_t datovr:1;
  178. uint64_t ovrbst:1;
  179. uint64_t calpar1:1;
  180. uint64_t calpar0:1;
  181. #else
  182. uint64_t calpar0:1;
  183. uint64_t calpar1:1;
  184. uint64_t ovrbst:1;
  185. uint64_t datovr:1;
  186. uint64_t diperr:1;
  187. uint64_t nosync:1;
  188. uint64_t unxfrm:1;
  189. uint64_t frmerr:1;
  190. uint64_t syncerr:1;
  191. uint64_t reserved_9_63:55;
  192. #endif
  193. } s;
  194. struct cvmx_stxx_int_reg_s cn38xx;
  195. struct cvmx_stxx_int_reg_s cn38xxp2;
  196. struct cvmx_stxx_int_reg_s cn58xx;
  197. struct cvmx_stxx_int_reg_s cn58xxp1;
  198. };
  199. union cvmx_stxx_int_sync {
  200. uint64_t u64;
  201. struct cvmx_stxx_int_sync_s {
  202. #ifdef __BIG_ENDIAN_BITFIELD
  203. uint64_t reserved_8_63:56;
  204. uint64_t frmerr:1;
  205. uint64_t unxfrm:1;
  206. uint64_t nosync:1;
  207. uint64_t diperr:1;
  208. uint64_t datovr:1;
  209. uint64_t ovrbst:1;
  210. uint64_t calpar1:1;
  211. uint64_t calpar0:1;
  212. #else
  213. uint64_t calpar0:1;
  214. uint64_t calpar1:1;
  215. uint64_t ovrbst:1;
  216. uint64_t datovr:1;
  217. uint64_t diperr:1;
  218. uint64_t nosync:1;
  219. uint64_t unxfrm:1;
  220. uint64_t frmerr:1;
  221. uint64_t reserved_8_63:56;
  222. #endif
  223. } s;
  224. struct cvmx_stxx_int_sync_s cn38xx;
  225. struct cvmx_stxx_int_sync_s cn38xxp2;
  226. struct cvmx_stxx_int_sync_s cn58xx;
  227. struct cvmx_stxx_int_sync_s cn58xxp1;
  228. };
  229. union cvmx_stxx_min_bst {
  230. uint64_t u64;
  231. struct cvmx_stxx_min_bst_s {
  232. #ifdef __BIG_ENDIAN_BITFIELD
  233. uint64_t reserved_9_63:55;
  234. uint64_t minb:9;
  235. #else
  236. uint64_t minb:9;
  237. uint64_t reserved_9_63:55;
  238. #endif
  239. } s;
  240. struct cvmx_stxx_min_bst_s cn38xx;
  241. struct cvmx_stxx_min_bst_s cn38xxp2;
  242. struct cvmx_stxx_min_bst_s cn58xx;
  243. struct cvmx_stxx_min_bst_s cn58xxp1;
  244. };
  245. union cvmx_stxx_spi4_calx {
  246. uint64_t u64;
  247. struct cvmx_stxx_spi4_calx_s {
  248. #ifdef __BIG_ENDIAN_BITFIELD
  249. uint64_t reserved_17_63:47;
  250. uint64_t oddpar:1;
  251. uint64_t prt3:4;
  252. uint64_t prt2:4;
  253. uint64_t prt1:4;
  254. uint64_t prt0:4;
  255. #else
  256. uint64_t prt0:4;
  257. uint64_t prt1:4;
  258. uint64_t prt2:4;
  259. uint64_t prt3:4;
  260. uint64_t oddpar:1;
  261. uint64_t reserved_17_63:47;
  262. #endif
  263. } s;
  264. struct cvmx_stxx_spi4_calx_s cn38xx;
  265. struct cvmx_stxx_spi4_calx_s cn38xxp2;
  266. struct cvmx_stxx_spi4_calx_s cn58xx;
  267. struct cvmx_stxx_spi4_calx_s cn58xxp1;
  268. };
  269. union cvmx_stxx_spi4_dat {
  270. uint64_t u64;
  271. struct cvmx_stxx_spi4_dat_s {
  272. #ifdef __BIG_ENDIAN_BITFIELD
  273. uint64_t reserved_32_63:32;
  274. uint64_t alpha:16;
  275. uint64_t max_t:16;
  276. #else
  277. uint64_t max_t:16;
  278. uint64_t alpha:16;
  279. uint64_t reserved_32_63:32;
  280. #endif
  281. } s;
  282. struct cvmx_stxx_spi4_dat_s cn38xx;
  283. struct cvmx_stxx_spi4_dat_s cn38xxp2;
  284. struct cvmx_stxx_spi4_dat_s cn58xx;
  285. struct cvmx_stxx_spi4_dat_s cn58xxp1;
  286. };
  287. union cvmx_stxx_spi4_stat {
  288. uint64_t u64;
  289. struct cvmx_stxx_spi4_stat_s {
  290. #ifdef __BIG_ENDIAN_BITFIELD
  291. uint64_t reserved_16_63:48;
  292. uint64_t m:8;
  293. uint64_t reserved_7_7:1;
  294. uint64_t len:7;
  295. #else
  296. uint64_t len:7;
  297. uint64_t reserved_7_7:1;
  298. uint64_t m:8;
  299. uint64_t reserved_16_63:48;
  300. #endif
  301. } s;
  302. struct cvmx_stxx_spi4_stat_s cn38xx;
  303. struct cvmx_stxx_spi4_stat_s cn38xxp2;
  304. struct cvmx_stxx_spi4_stat_s cn58xx;
  305. struct cvmx_stxx_spi4_stat_s cn58xxp1;
  306. };
  307. union cvmx_stxx_stat_bytes_hi {
  308. uint64_t u64;
  309. struct cvmx_stxx_stat_bytes_hi_s {
  310. #ifdef __BIG_ENDIAN_BITFIELD
  311. uint64_t reserved_32_63:32;
  312. uint64_t cnt:32;
  313. #else
  314. uint64_t cnt:32;
  315. uint64_t reserved_32_63:32;
  316. #endif
  317. } s;
  318. struct cvmx_stxx_stat_bytes_hi_s cn38xx;
  319. struct cvmx_stxx_stat_bytes_hi_s cn38xxp2;
  320. struct cvmx_stxx_stat_bytes_hi_s cn58xx;
  321. struct cvmx_stxx_stat_bytes_hi_s cn58xxp1;
  322. };
  323. union cvmx_stxx_stat_bytes_lo {
  324. uint64_t u64;
  325. struct cvmx_stxx_stat_bytes_lo_s {
  326. #ifdef __BIG_ENDIAN_BITFIELD
  327. uint64_t reserved_32_63:32;
  328. uint64_t cnt:32;
  329. #else
  330. uint64_t cnt:32;
  331. uint64_t reserved_32_63:32;
  332. #endif
  333. } s;
  334. struct cvmx_stxx_stat_bytes_lo_s cn38xx;
  335. struct cvmx_stxx_stat_bytes_lo_s cn38xxp2;
  336. struct cvmx_stxx_stat_bytes_lo_s cn58xx;
  337. struct cvmx_stxx_stat_bytes_lo_s cn58xxp1;
  338. };
  339. union cvmx_stxx_stat_ctl {
  340. uint64_t u64;
  341. struct cvmx_stxx_stat_ctl_s {
  342. #ifdef __BIG_ENDIAN_BITFIELD
  343. uint64_t reserved_5_63:59;
  344. uint64_t clr:1;
  345. uint64_t bckprs:4;
  346. #else
  347. uint64_t bckprs:4;
  348. uint64_t clr:1;
  349. uint64_t reserved_5_63:59;
  350. #endif
  351. } s;
  352. struct cvmx_stxx_stat_ctl_s cn38xx;
  353. struct cvmx_stxx_stat_ctl_s cn38xxp2;
  354. struct cvmx_stxx_stat_ctl_s cn58xx;
  355. struct cvmx_stxx_stat_ctl_s cn58xxp1;
  356. };
  357. union cvmx_stxx_stat_pkt_xmt {
  358. uint64_t u64;
  359. struct cvmx_stxx_stat_pkt_xmt_s {
  360. #ifdef __BIG_ENDIAN_BITFIELD
  361. uint64_t reserved_32_63:32;
  362. uint64_t cnt:32;
  363. #else
  364. uint64_t cnt:32;
  365. uint64_t reserved_32_63:32;
  366. #endif
  367. } s;
  368. struct cvmx_stxx_stat_pkt_xmt_s cn38xx;
  369. struct cvmx_stxx_stat_pkt_xmt_s cn38xxp2;
  370. struct cvmx_stxx_stat_pkt_xmt_s cn58xx;
  371. struct cvmx_stxx_stat_pkt_xmt_s cn58xxp1;
  372. };
  373. #endif