cvmx-pcsxx-defs.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. /***********************license start***************
  2. * Author: Cavium Networks
  3. *
  4. * Contact: [email protected]
  5. * This file is part of the OCTEON SDK
  6. *
  7. * Copyright (C) 2003-2018 Cavium, Inc.
  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_PCSXX_DEFS_H__
  28. #define __CVMX_PCSXX_DEFS_H__
  29. static inline uint64_t CVMX_PCSXX_10GBX_STATUS_REG(unsigned long block_id)
  30. {
  31. switch (cvmx_get_octeon_family()) {
  32. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  33. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  34. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  35. return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x8000000ull;
  36. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  37. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  38. return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x8000000ull;
  39. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  40. return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x1000000ull;
  41. }
  42. return CVMX_ADD_IO_SEG(0x00011800B0000828ull) + (block_id) * 0x1000000ull;
  43. }
  44. static inline uint64_t CVMX_PCSXX_BIST_STATUS_REG(unsigned long block_id)
  45. {
  46. switch (cvmx_get_octeon_family()) {
  47. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  48. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  49. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  50. return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x8000000ull;
  51. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  52. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  53. return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x8000000ull;
  54. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  55. return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x1000000ull;
  56. }
  57. return CVMX_ADD_IO_SEG(0x00011800B0000870ull) + (block_id) * 0x1000000ull;
  58. }
  59. static inline uint64_t CVMX_PCSXX_BIT_LOCK_STATUS_REG(unsigned long block_id)
  60. {
  61. switch (cvmx_get_octeon_family()) {
  62. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  63. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  64. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  65. return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x8000000ull;
  66. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  67. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  68. return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x8000000ull;
  69. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  70. return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x1000000ull;
  71. }
  72. return CVMX_ADD_IO_SEG(0x00011800B0000850ull) + (block_id) * 0x1000000ull;
  73. }
  74. static inline uint64_t CVMX_PCSXX_CONTROL1_REG(unsigned long block_id)
  75. {
  76. switch (cvmx_get_octeon_family()) {
  77. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  78. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  79. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  80. return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x8000000ull;
  81. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  82. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  83. return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x8000000ull;
  84. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  85. return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x1000000ull;
  86. }
  87. return CVMX_ADD_IO_SEG(0x00011800B0000800ull) + (block_id) * 0x1000000ull;
  88. }
  89. static inline uint64_t CVMX_PCSXX_CONTROL2_REG(unsigned long block_id)
  90. {
  91. switch (cvmx_get_octeon_family()) {
  92. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  93. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  94. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  95. return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x8000000ull;
  96. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  97. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  98. return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x8000000ull;
  99. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  100. return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x1000000ull;
  101. }
  102. return CVMX_ADD_IO_SEG(0x00011800B0000818ull) + (block_id) * 0x1000000ull;
  103. }
  104. static inline uint64_t CVMX_PCSXX_INT_EN_REG(unsigned long block_id)
  105. {
  106. switch (cvmx_get_octeon_family()) {
  107. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  108. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  109. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  110. return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x8000000ull;
  111. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  112. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  113. return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x8000000ull;
  114. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  115. return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x1000000ull;
  116. }
  117. return CVMX_ADD_IO_SEG(0x00011800B0000860ull) + (block_id) * 0x1000000ull;
  118. }
  119. static inline uint64_t CVMX_PCSXX_INT_REG(unsigned long block_id)
  120. {
  121. switch (cvmx_get_octeon_family()) {
  122. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  123. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  124. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  125. return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x8000000ull;
  126. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  127. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  128. return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x8000000ull;
  129. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  130. return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x1000000ull;
  131. }
  132. return CVMX_ADD_IO_SEG(0x00011800B0000858ull) + (block_id) * 0x1000000ull;
  133. }
  134. static inline uint64_t CVMX_PCSXX_LOG_ANL_REG(unsigned long block_id)
  135. {
  136. switch (cvmx_get_octeon_family()) {
  137. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  138. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  139. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  140. return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x8000000ull;
  141. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  142. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  143. return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x8000000ull;
  144. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  145. return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x1000000ull;
  146. }
  147. return CVMX_ADD_IO_SEG(0x00011800B0000868ull) + (block_id) * 0x1000000ull;
  148. }
  149. static inline uint64_t CVMX_PCSXX_MISC_CTL_REG(unsigned long block_id)
  150. {
  151. switch (cvmx_get_octeon_family()) {
  152. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  153. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  154. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  155. return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x8000000ull;
  156. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  157. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  158. return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x8000000ull;
  159. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  160. return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x1000000ull;
  161. }
  162. return CVMX_ADD_IO_SEG(0x00011800B0000848ull) + (block_id) * 0x1000000ull;
  163. }
  164. static inline uint64_t CVMX_PCSXX_RX_SYNC_STATES_REG(unsigned long block_id)
  165. {
  166. switch (cvmx_get_octeon_family()) {
  167. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  168. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  169. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  170. return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x8000000ull;
  171. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  172. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  173. return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x8000000ull;
  174. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  175. return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x1000000ull;
  176. }
  177. return CVMX_ADD_IO_SEG(0x00011800B0000838ull) + (block_id) * 0x1000000ull;
  178. }
  179. static inline uint64_t CVMX_PCSXX_SPD_ABIL_REG(unsigned long block_id)
  180. {
  181. switch (cvmx_get_octeon_family()) {
  182. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  183. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  184. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  185. return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x8000000ull;
  186. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  187. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  188. return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x8000000ull;
  189. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  190. return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x1000000ull;
  191. }
  192. return CVMX_ADD_IO_SEG(0x00011800B0000810ull) + (block_id) * 0x1000000ull;
  193. }
  194. static inline uint64_t CVMX_PCSXX_STATUS1_REG(unsigned long block_id)
  195. {
  196. switch (cvmx_get_octeon_family()) {
  197. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  198. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  199. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  200. return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x8000000ull;
  201. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  202. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  203. return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x8000000ull;
  204. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  205. return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x1000000ull;
  206. }
  207. return CVMX_ADD_IO_SEG(0x00011800B0000808ull) + (block_id) * 0x1000000ull;
  208. }
  209. static inline uint64_t CVMX_PCSXX_STATUS2_REG(unsigned long block_id)
  210. {
  211. switch (cvmx_get_octeon_family()) {
  212. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  213. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  214. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  215. return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x8000000ull;
  216. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  217. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  218. return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x8000000ull;
  219. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  220. return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x1000000ull;
  221. }
  222. return CVMX_ADD_IO_SEG(0x00011800B0000820ull) + (block_id) * 0x1000000ull;
  223. }
  224. static inline uint64_t CVMX_PCSXX_TX_RX_POLARITY_REG(unsigned long block_id)
  225. {
  226. switch (cvmx_get_octeon_family()) {
  227. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  228. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  229. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  230. return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x8000000ull;
  231. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  232. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  233. return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x8000000ull;
  234. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  235. return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x1000000ull;
  236. }
  237. return CVMX_ADD_IO_SEG(0x00011800B0000840ull) + (block_id) * 0x1000000ull;
  238. }
  239. static inline uint64_t CVMX_PCSXX_TX_RX_STATES_REG(unsigned long block_id)
  240. {
  241. switch (cvmx_get_octeon_family()) {
  242. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  243. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  244. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  245. return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x8000000ull;
  246. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  247. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  248. return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x8000000ull;
  249. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  250. return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x1000000ull;
  251. }
  252. return CVMX_ADD_IO_SEG(0x00011800B0000830ull) + (block_id) * 0x1000000ull;
  253. }
  254. void __cvmx_interrupt_pcsxx_int_en_reg_enable(int index);
  255. union cvmx_pcsxx_10gbx_status_reg {
  256. uint64_t u64;
  257. struct cvmx_pcsxx_10gbx_status_reg_s {
  258. #ifdef __BIG_ENDIAN_BITFIELD
  259. uint64_t reserved_13_63:51;
  260. uint64_t alignd:1;
  261. uint64_t pattst:1;
  262. uint64_t reserved_4_10:7;
  263. uint64_t l3sync:1;
  264. uint64_t l2sync:1;
  265. uint64_t l1sync:1;
  266. uint64_t l0sync:1;
  267. #else
  268. uint64_t l0sync:1;
  269. uint64_t l1sync:1;
  270. uint64_t l2sync:1;
  271. uint64_t l3sync:1;
  272. uint64_t reserved_4_10:7;
  273. uint64_t pattst:1;
  274. uint64_t alignd:1;
  275. uint64_t reserved_13_63:51;
  276. #endif
  277. } s;
  278. };
  279. union cvmx_pcsxx_bist_status_reg {
  280. uint64_t u64;
  281. struct cvmx_pcsxx_bist_status_reg_s {
  282. #ifdef __BIG_ENDIAN_BITFIELD
  283. uint64_t reserved_1_63:63;
  284. uint64_t bist_status:1;
  285. #else
  286. uint64_t bist_status:1;
  287. uint64_t reserved_1_63:63;
  288. #endif
  289. } s;
  290. };
  291. union cvmx_pcsxx_bit_lock_status_reg {
  292. uint64_t u64;
  293. struct cvmx_pcsxx_bit_lock_status_reg_s {
  294. #ifdef __BIG_ENDIAN_BITFIELD
  295. uint64_t reserved_4_63:60;
  296. uint64_t bitlck3:1;
  297. uint64_t bitlck2:1;
  298. uint64_t bitlck1:1;
  299. uint64_t bitlck0:1;
  300. #else
  301. uint64_t bitlck0:1;
  302. uint64_t bitlck1:1;
  303. uint64_t bitlck2:1;
  304. uint64_t bitlck3:1;
  305. uint64_t reserved_4_63:60;
  306. #endif
  307. } s;
  308. };
  309. union cvmx_pcsxx_control1_reg {
  310. uint64_t u64;
  311. struct cvmx_pcsxx_control1_reg_s {
  312. #ifdef __BIG_ENDIAN_BITFIELD
  313. uint64_t reserved_16_63:48;
  314. uint64_t reset:1;
  315. uint64_t loopbck1:1;
  316. uint64_t spdsel1:1;
  317. uint64_t reserved_12_12:1;
  318. uint64_t lo_pwr:1;
  319. uint64_t reserved_7_10:4;
  320. uint64_t spdsel0:1;
  321. uint64_t spd:4;
  322. uint64_t reserved_0_1:2;
  323. #else
  324. uint64_t reserved_0_1:2;
  325. uint64_t spd:4;
  326. uint64_t spdsel0:1;
  327. uint64_t reserved_7_10:4;
  328. uint64_t lo_pwr:1;
  329. uint64_t reserved_12_12:1;
  330. uint64_t spdsel1:1;
  331. uint64_t loopbck1:1;
  332. uint64_t reset:1;
  333. uint64_t reserved_16_63:48;
  334. #endif
  335. } s;
  336. };
  337. union cvmx_pcsxx_control2_reg {
  338. uint64_t u64;
  339. struct cvmx_pcsxx_control2_reg_s {
  340. #ifdef __BIG_ENDIAN_BITFIELD
  341. uint64_t reserved_2_63:62;
  342. uint64_t type:2;
  343. #else
  344. uint64_t type:2;
  345. uint64_t reserved_2_63:62;
  346. #endif
  347. } s;
  348. };
  349. union cvmx_pcsxx_int_en_reg {
  350. uint64_t u64;
  351. struct cvmx_pcsxx_int_en_reg_s {
  352. #ifdef __BIG_ENDIAN_BITFIELD
  353. uint64_t reserved_7_63:57;
  354. uint64_t dbg_sync_en:1;
  355. uint64_t algnlos_en:1;
  356. uint64_t synlos_en:1;
  357. uint64_t bitlckls_en:1;
  358. uint64_t rxsynbad_en:1;
  359. uint64_t rxbad_en:1;
  360. uint64_t txflt_en:1;
  361. #else
  362. uint64_t txflt_en:1;
  363. uint64_t rxbad_en:1;
  364. uint64_t rxsynbad_en:1;
  365. uint64_t bitlckls_en:1;
  366. uint64_t synlos_en:1;
  367. uint64_t algnlos_en:1;
  368. uint64_t dbg_sync_en:1;
  369. uint64_t reserved_7_63:57;
  370. #endif
  371. } s;
  372. struct cvmx_pcsxx_int_en_reg_cn52xx {
  373. #ifdef __BIG_ENDIAN_BITFIELD
  374. uint64_t reserved_6_63:58;
  375. uint64_t algnlos_en:1;
  376. uint64_t synlos_en:1;
  377. uint64_t bitlckls_en:1;
  378. uint64_t rxsynbad_en:1;
  379. uint64_t rxbad_en:1;
  380. uint64_t txflt_en:1;
  381. #else
  382. uint64_t txflt_en:1;
  383. uint64_t rxbad_en:1;
  384. uint64_t rxsynbad_en:1;
  385. uint64_t bitlckls_en:1;
  386. uint64_t synlos_en:1;
  387. uint64_t algnlos_en:1;
  388. uint64_t reserved_6_63:58;
  389. #endif
  390. } cn52xx;
  391. };
  392. union cvmx_pcsxx_int_reg {
  393. uint64_t u64;
  394. struct cvmx_pcsxx_int_reg_s {
  395. #ifdef __BIG_ENDIAN_BITFIELD
  396. uint64_t reserved_7_63:57;
  397. uint64_t dbg_sync:1;
  398. uint64_t algnlos:1;
  399. uint64_t synlos:1;
  400. uint64_t bitlckls:1;
  401. uint64_t rxsynbad:1;
  402. uint64_t rxbad:1;
  403. uint64_t txflt:1;
  404. #else
  405. uint64_t txflt:1;
  406. uint64_t rxbad:1;
  407. uint64_t rxsynbad:1;
  408. uint64_t bitlckls:1;
  409. uint64_t synlos:1;
  410. uint64_t algnlos:1;
  411. uint64_t dbg_sync:1;
  412. uint64_t reserved_7_63:57;
  413. #endif
  414. } s;
  415. struct cvmx_pcsxx_int_reg_cn52xx {
  416. #ifdef __BIG_ENDIAN_BITFIELD
  417. uint64_t reserved_6_63:58;
  418. uint64_t algnlos:1;
  419. uint64_t synlos:1;
  420. uint64_t bitlckls:1;
  421. uint64_t rxsynbad:1;
  422. uint64_t rxbad:1;
  423. uint64_t txflt:1;
  424. #else
  425. uint64_t txflt:1;
  426. uint64_t rxbad:1;
  427. uint64_t rxsynbad:1;
  428. uint64_t bitlckls:1;
  429. uint64_t synlos:1;
  430. uint64_t algnlos:1;
  431. uint64_t reserved_6_63:58;
  432. #endif
  433. } cn52xx;
  434. };
  435. union cvmx_pcsxx_log_anl_reg {
  436. uint64_t u64;
  437. struct cvmx_pcsxx_log_anl_reg_s {
  438. #ifdef __BIG_ENDIAN_BITFIELD
  439. uint64_t reserved_7_63:57;
  440. uint64_t enc_mode:1;
  441. uint64_t drop_ln:2;
  442. uint64_t lafifovfl:1;
  443. uint64_t la_en:1;
  444. uint64_t pkt_sz:2;
  445. #else
  446. uint64_t pkt_sz:2;
  447. uint64_t la_en:1;
  448. uint64_t lafifovfl:1;
  449. uint64_t drop_ln:2;
  450. uint64_t enc_mode:1;
  451. uint64_t reserved_7_63:57;
  452. #endif
  453. } s;
  454. };
  455. union cvmx_pcsxx_misc_ctl_reg {
  456. uint64_t u64;
  457. struct cvmx_pcsxx_misc_ctl_reg_s {
  458. #ifdef __BIG_ENDIAN_BITFIELD
  459. uint64_t reserved_4_63:60;
  460. uint64_t tx_swap:1;
  461. uint64_t rx_swap:1;
  462. uint64_t xaui:1;
  463. uint64_t gmxeno:1;
  464. #else
  465. uint64_t gmxeno:1;
  466. uint64_t xaui:1;
  467. uint64_t rx_swap:1;
  468. uint64_t tx_swap:1;
  469. uint64_t reserved_4_63:60;
  470. #endif
  471. } s;
  472. };
  473. union cvmx_pcsxx_rx_sync_states_reg {
  474. uint64_t u64;
  475. struct cvmx_pcsxx_rx_sync_states_reg_s {
  476. #ifdef __BIG_ENDIAN_BITFIELD
  477. uint64_t reserved_16_63:48;
  478. uint64_t sync3st:4;
  479. uint64_t sync2st:4;
  480. uint64_t sync1st:4;
  481. uint64_t sync0st:4;
  482. #else
  483. uint64_t sync0st:4;
  484. uint64_t sync1st:4;
  485. uint64_t sync2st:4;
  486. uint64_t sync3st:4;
  487. uint64_t reserved_16_63:48;
  488. #endif
  489. } s;
  490. };
  491. union cvmx_pcsxx_spd_abil_reg {
  492. uint64_t u64;
  493. struct cvmx_pcsxx_spd_abil_reg_s {
  494. #ifdef __BIG_ENDIAN_BITFIELD
  495. uint64_t reserved_2_63:62;
  496. uint64_t tenpasst:1;
  497. uint64_t tengb:1;
  498. #else
  499. uint64_t tengb:1;
  500. uint64_t tenpasst:1;
  501. uint64_t reserved_2_63:62;
  502. #endif
  503. } s;
  504. };
  505. union cvmx_pcsxx_status1_reg {
  506. uint64_t u64;
  507. struct cvmx_pcsxx_status1_reg_s {
  508. #ifdef __BIG_ENDIAN_BITFIELD
  509. uint64_t reserved_8_63:56;
  510. uint64_t flt:1;
  511. uint64_t reserved_3_6:4;
  512. uint64_t rcv_lnk:1;
  513. uint64_t lpable:1;
  514. uint64_t reserved_0_0:1;
  515. #else
  516. uint64_t reserved_0_0:1;
  517. uint64_t lpable:1;
  518. uint64_t rcv_lnk:1;
  519. uint64_t reserved_3_6:4;
  520. uint64_t flt:1;
  521. uint64_t reserved_8_63:56;
  522. #endif
  523. } s;
  524. };
  525. union cvmx_pcsxx_status2_reg {
  526. uint64_t u64;
  527. struct cvmx_pcsxx_status2_reg_s {
  528. #ifdef __BIG_ENDIAN_BITFIELD
  529. uint64_t reserved_16_63:48;
  530. uint64_t dev:2;
  531. uint64_t reserved_12_13:2;
  532. uint64_t xmtflt:1;
  533. uint64_t rcvflt:1;
  534. uint64_t reserved_3_9:7;
  535. uint64_t tengb_w:1;
  536. uint64_t tengb_x:1;
  537. uint64_t tengb_r:1;
  538. #else
  539. uint64_t tengb_r:1;
  540. uint64_t tengb_x:1;
  541. uint64_t tengb_w:1;
  542. uint64_t reserved_3_9:7;
  543. uint64_t rcvflt:1;
  544. uint64_t xmtflt:1;
  545. uint64_t reserved_12_13:2;
  546. uint64_t dev:2;
  547. uint64_t reserved_16_63:48;
  548. #endif
  549. } s;
  550. };
  551. union cvmx_pcsxx_tx_rx_polarity_reg {
  552. uint64_t u64;
  553. struct cvmx_pcsxx_tx_rx_polarity_reg_s {
  554. #ifdef __BIG_ENDIAN_BITFIELD
  555. uint64_t reserved_10_63:54;
  556. uint64_t xor_rxplrt:4;
  557. uint64_t xor_txplrt:4;
  558. uint64_t rxplrt:1;
  559. uint64_t txplrt:1;
  560. #else
  561. uint64_t txplrt:1;
  562. uint64_t rxplrt:1;
  563. uint64_t xor_txplrt:4;
  564. uint64_t xor_rxplrt:4;
  565. uint64_t reserved_10_63:54;
  566. #endif
  567. } s;
  568. struct cvmx_pcsxx_tx_rx_polarity_reg_cn52xxp1 {
  569. #ifdef __BIG_ENDIAN_BITFIELD
  570. uint64_t reserved_2_63:62;
  571. uint64_t rxplrt:1;
  572. uint64_t txplrt:1;
  573. #else
  574. uint64_t txplrt:1;
  575. uint64_t rxplrt:1;
  576. uint64_t reserved_2_63:62;
  577. #endif
  578. } cn52xxp1;
  579. };
  580. union cvmx_pcsxx_tx_rx_states_reg {
  581. uint64_t u64;
  582. struct cvmx_pcsxx_tx_rx_states_reg_s {
  583. #ifdef __BIG_ENDIAN_BITFIELD
  584. uint64_t reserved_14_63:50;
  585. uint64_t term_err:1;
  586. uint64_t syn3bad:1;
  587. uint64_t syn2bad:1;
  588. uint64_t syn1bad:1;
  589. uint64_t syn0bad:1;
  590. uint64_t rxbad:1;
  591. uint64_t algn_st:3;
  592. uint64_t rx_st:2;
  593. uint64_t tx_st:3;
  594. #else
  595. uint64_t tx_st:3;
  596. uint64_t rx_st:2;
  597. uint64_t algn_st:3;
  598. uint64_t rxbad:1;
  599. uint64_t syn0bad:1;
  600. uint64_t syn1bad:1;
  601. uint64_t syn2bad:1;
  602. uint64_t syn3bad:1;
  603. uint64_t term_err:1;
  604. uint64_t reserved_14_63:50;
  605. #endif
  606. } s;
  607. struct cvmx_pcsxx_tx_rx_states_reg_cn52xxp1 {
  608. #ifdef __BIG_ENDIAN_BITFIELD
  609. uint64_t reserved_13_63:51;
  610. uint64_t syn3bad:1;
  611. uint64_t syn2bad:1;
  612. uint64_t syn1bad:1;
  613. uint64_t syn0bad:1;
  614. uint64_t rxbad:1;
  615. uint64_t algn_st:3;
  616. uint64_t rx_st:2;
  617. uint64_t tx_st:3;
  618. #else
  619. uint64_t tx_st:3;
  620. uint64_t rx_st:2;
  621. uint64_t algn_st:3;
  622. uint64_t rxbad:1;
  623. uint64_t syn0bad:1;
  624. uint64_t syn1bad:1;
  625. uint64_t syn2bad:1;
  626. uint64_t syn3bad:1;
  627. uint64_t reserved_13_63:51;
  628. #endif
  629. } cn52xxp1;
  630. };
  631. #endif