cvmx-pcsxx-defs.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  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_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. union cvmx_pcsxx_10gbx_status_reg {
  255. uint64_t u64;
  256. struct cvmx_pcsxx_10gbx_status_reg_s {
  257. #ifdef __BIG_ENDIAN_BITFIELD
  258. uint64_t reserved_13_63:51;
  259. uint64_t alignd:1;
  260. uint64_t pattst:1;
  261. uint64_t reserved_4_10:7;
  262. uint64_t l3sync:1;
  263. uint64_t l2sync:1;
  264. uint64_t l1sync:1;
  265. uint64_t l0sync:1;
  266. #else
  267. uint64_t l0sync:1;
  268. uint64_t l1sync:1;
  269. uint64_t l2sync:1;
  270. uint64_t l3sync:1;
  271. uint64_t reserved_4_10:7;
  272. uint64_t pattst:1;
  273. uint64_t alignd:1;
  274. uint64_t reserved_13_63:51;
  275. #endif
  276. } s;
  277. struct cvmx_pcsxx_10gbx_status_reg_s cn52xx;
  278. struct cvmx_pcsxx_10gbx_status_reg_s cn52xxp1;
  279. struct cvmx_pcsxx_10gbx_status_reg_s cn56xx;
  280. struct cvmx_pcsxx_10gbx_status_reg_s cn56xxp1;
  281. struct cvmx_pcsxx_10gbx_status_reg_s cn61xx;
  282. struct cvmx_pcsxx_10gbx_status_reg_s cn63xx;
  283. struct cvmx_pcsxx_10gbx_status_reg_s cn63xxp1;
  284. struct cvmx_pcsxx_10gbx_status_reg_s cn66xx;
  285. struct cvmx_pcsxx_10gbx_status_reg_s cn68xx;
  286. struct cvmx_pcsxx_10gbx_status_reg_s cn68xxp1;
  287. };
  288. union cvmx_pcsxx_bist_status_reg {
  289. uint64_t u64;
  290. struct cvmx_pcsxx_bist_status_reg_s {
  291. #ifdef __BIG_ENDIAN_BITFIELD
  292. uint64_t reserved_1_63:63;
  293. uint64_t bist_status:1;
  294. #else
  295. uint64_t bist_status:1;
  296. uint64_t reserved_1_63:63;
  297. #endif
  298. } s;
  299. struct cvmx_pcsxx_bist_status_reg_s cn52xx;
  300. struct cvmx_pcsxx_bist_status_reg_s cn52xxp1;
  301. struct cvmx_pcsxx_bist_status_reg_s cn56xx;
  302. struct cvmx_pcsxx_bist_status_reg_s cn56xxp1;
  303. struct cvmx_pcsxx_bist_status_reg_s cn61xx;
  304. struct cvmx_pcsxx_bist_status_reg_s cn63xx;
  305. struct cvmx_pcsxx_bist_status_reg_s cn63xxp1;
  306. struct cvmx_pcsxx_bist_status_reg_s cn66xx;
  307. struct cvmx_pcsxx_bist_status_reg_s cn68xx;
  308. struct cvmx_pcsxx_bist_status_reg_s cn68xxp1;
  309. };
  310. union cvmx_pcsxx_bit_lock_status_reg {
  311. uint64_t u64;
  312. struct cvmx_pcsxx_bit_lock_status_reg_s {
  313. #ifdef __BIG_ENDIAN_BITFIELD
  314. uint64_t reserved_4_63:60;
  315. uint64_t bitlck3:1;
  316. uint64_t bitlck2:1;
  317. uint64_t bitlck1:1;
  318. uint64_t bitlck0:1;
  319. #else
  320. uint64_t bitlck0:1;
  321. uint64_t bitlck1:1;
  322. uint64_t bitlck2:1;
  323. uint64_t bitlck3:1;
  324. uint64_t reserved_4_63:60;
  325. #endif
  326. } s;
  327. struct cvmx_pcsxx_bit_lock_status_reg_s cn52xx;
  328. struct cvmx_pcsxx_bit_lock_status_reg_s cn52xxp1;
  329. struct cvmx_pcsxx_bit_lock_status_reg_s cn56xx;
  330. struct cvmx_pcsxx_bit_lock_status_reg_s cn56xxp1;
  331. struct cvmx_pcsxx_bit_lock_status_reg_s cn61xx;
  332. struct cvmx_pcsxx_bit_lock_status_reg_s cn63xx;
  333. struct cvmx_pcsxx_bit_lock_status_reg_s cn63xxp1;
  334. struct cvmx_pcsxx_bit_lock_status_reg_s cn66xx;
  335. struct cvmx_pcsxx_bit_lock_status_reg_s cn68xx;
  336. struct cvmx_pcsxx_bit_lock_status_reg_s cn68xxp1;
  337. };
  338. union cvmx_pcsxx_control1_reg {
  339. uint64_t u64;
  340. struct cvmx_pcsxx_control1_reg_s {
  341. #ifdef __BIG_ENDIAN_BITFIELD
  342. uint64_t reserved_16_63:48;
  343. uint64_t reset:1;
  344. uint64_t loopbck1:1;
  345. uint64_t spdsel1:1;
  346. uint64_t reserved_12_12:1;
  347. uint64_t lo_pwr:1;
  348. uint64_t reserved_7_10:4;
  349. uint64_t spdsel0:1;
  350. uint64_t spd:4;
  351. uint64_t reserved_0_1:2;
  352. #else
  353. uint64_t reserved_0_1:2;
  354. uint64_t spd:4;
  355. uint64_t spdsel0:1;
  356. uint64_t reserved_7_10:4;
  357. uint64_t lo_pwr:1;
  358. uint64_t reserved_12_12:1;
  359. uint64_t spdsel1:1;
  360. uint64_t loopbck1:1;
  361. uint64_t reset:1;
  362. uint64_t reserved_16_63:48;
  363. #endif
  364. } s;
  365. struct cvmx_pcsxx_control1_reg_s cn52xx;
  366. struct cvmx_pcsxx_control1_reg_s cn52xxp1;
  367. struct cvmx_pcsxx_control1_reg_s cn56xx;
  368. struct cvmx_pcsxx_control1_reg_s cn56xxp1;
  369. struct cvmx_pcsxx_control1_reg_s cn61xx;
  370. struct cvmx_pcsxx_control1_reg_s cn63xx;
  371. struct cvmx_pcsxx_control1_reg_s cn63xxp1;
  372. struct cvmx_pcsxx_control1_reg_s cn66xx;
  373. struct cvmx_pcsxx_control1_reg_s cn68xx;
  374. struct cvmx_pcsxx_control1_reg_s cn68xxp1;
  375. };
  376. union cvmx_pcsxx_control2_reg {
  377. uint64_t u64;
  378. struct cvmx_pcsxx_control2_reg_s {
  379. #ifdef __BIG_ENDIAN_BITFIELD
  380. uint64_t reserved_2_63:62;
  381. uint64_t type:2;
  382. #else
  383. uint64_t type:2;
  384. uint64_t reserved_2_63:62;
  385. #endif
  386. } s;
  387. struct cvmx_pcsxx_control2_reg_s cn52xx;
  388. struct cvmx_pcsxx_control2_reg_s cn52xxp1;
  389. struct cvmx_pcsxx_control2_reg_s cn56xx;
  390. struct cvmx_pcsxx_control2_reg_s cn56xxp1;
  391. struct cvmx_pcsxx_control2_reg_s cn61xx;
  392. struct cvmx_pcsxx_control2_reg_s cn63xx;
  393. struct cvmx_pcsxx_control2_reg_s cn63xxp1;
  394. struct cvmx_pcsxx_control2_reg_s cn66xx;
  395. struct cvmx_pcsxx_control2_reg_s cn68xx;
  396. struct cvmx_pcsxx_control2_reg_s cn68xxp1;
  397. };
  398. union cvmx_pcsxx_int_en_reg {
  399. uint64_t u64;
  400. struct cvmx_pcsxx_int_en_reg_s {
  401. #ifdef __BIG_ENDIAN_BITFIELD
  402. uint64_t reserved_7_63:57;
  403. uint64_t dbg_sync_en:1;
  404. uint64_t algnlos_en:1;
  405. uint64_t synlos_en:1;
  406. uint64_t bitlckls_en:1;
  407. uint64_t rxsynbad_en:1;
  408. uint64_t rxbad_en:1;
  409. uint64_t txflt_en:1;
  410. #else
  411. uint64_t txflt_en:1;
  412. uint64_t rxbad_en:1;
  413. uint64_t rxsynbad_en:1;
  414. uint64_t bitlckls_en:1;
  415. uint64_t synlos_en:1;
  416. uint64_t algnlos_en:1;
  417. uint64_t dbg_sync_en:1;
  418. uint64_t reserved_7_63:57;
  419. #endif
  420. } s;
  421. struct cvmx_pcsxx_int_en_reg_cn52xx {
  422. #ifdef __BIG_ENDIAN_BITFIELD
  423. uint64_t reserved_6_63:58;
  424. uint64_t algnlos_en:1;
  425. uint64_t synlos_en:1;
  426. uint64_t bitlckls_en:1;
  427. uint64_t rxsynbad_en:1;
  428. uint64_t rxbad_en:1;
  429. uint64_t txflt_en:1;
  430. #else
  431. uint64_t txflt_en:1;
  432. uint64_t rxbad_en:1;
  433. uint64_t rxsynbad_en:1;
  434. uint64_t bitlckls_en:1;
  435. uint64_t synlos_en:1;
  436. uint64_t algnlos_en:1;
  437. uint64_t reserved_6_63:58;
  438. #endif
  439. } cn52xx;
  440. struct cvmx_pcsxx_int_en_reg_cn52xx cn52xxp1;
  441. struct cvmx_pcsxx_int_en_reg_cn52xx cn56xx;
  442. struct cvmx_pcsxx_int_en_reg_cn52xx cn56xxp1;
  443. struct cvmx_pcsxx_int_en_reg_s cn61xx;
  444. struct cvmx_pcsxx_int_en_reg_s cn63xx;
  445. struct cvmx_pcsxx_int_en_reg_s cn63xxp1;
  446. struct cvmx_pcsxx_int_en_reg_s cn66xx;
  447. struct cvmx_pcsxx_int_en_reg_s cn68xx;
  448. struct cvmx_pcsxx_int_en_reg_s cn68xxp1;
  449. };
  450. union cvmx_pcsxx_int_reg {
  451. uint64_t u64;
  452. struct cvmx_pcsxx_int_reg_s {
  453. #ifdef __BIG_ENDIAN_BITFIELD
  454. uint64_t reserved_7_63:57;
  455. uint64_t dbg_sync:1;
  456. uint64_t algnlos:1;
  457. uint64_t synlos:1;
  458. uint64_t bitlckls:1;
  459. uint64_t rxsynbad:1;
  460. uint64_t rxbad:1;
  461. uint64_t txflt:1;
  462. #else
  463. uint64_t txflt:1;
  464. uint64_t rxbad:1;
  465. uint64_t rxsynbad:1;
  466. uint64_t bitlckls:1;
  467. uint64_t synlos:1;
  468. uint64_t algnlos:1;
  469. uint64_t dbg_sync:1;
  470. uint64_t reserved_7_63:57;
  471. #endif
  472. } s;
  473. struct cvmx_pcsxx_int_reg_cn52xx {
  474. #ifdef __BIG_ENDIAN_BITFIELD
  475. uint64_t reserved_6_63:58;
  476. uint64_t algnlos:1;
  477. uint64_t synlos:1;
  478. uint64_t bitlckls:1;
  479. uint64_t rxsynbad:1;
  480. uint64_t rxbad:1;
  481. uint64_t txflt:1;
  482. #else
  483. uint64_t txflt:1;
  484. uint64_t rxbad:1;
  485. uint64_t rxsynbad:1;
  486. uint64_t bitlckls:1;
  487. uint64_t synlos:1;
  488. uint64_t algnlos:1;
  489. uint64_t reserved_6_63:58;
  490. #endif
  491. } cn52xx;
  492. struct cvmx_pcsxx_int_reg_cn52xx cn52xxp1;
  493. struct cvmx_pcsxx_int_reg_cn52xx cn56xx;
  494. struct cvmx_pcsxx_int_reg_cn52xx cn56xxp1;
  495. struct cvmx_pcsxx_int_reg_s cn61xx;
  496. struct cvmx_pcsxx_int_reg_s cn63xx;
  497. struct cvmx_pcsxx_int_reg_s cn63xxp1;
  498. struct cvmx_pcsxx_int_reg_s cn66xx;
  499. struct cvmx_pcsxx_int_reg_s cn68xx;
  500. struct cvmx_pcsxx_int_reg_s cn68xxp1;
  501. };
  502. union cvmx_pcsxx_log_anl_reg {
  503. uint64_t u64;
  504. struct cvmx_pcsxx_log_anl_reg_s {
  505. #ifdef __BIG_ENDIAN_BITFIELD
  506. uint64_t reserved_7_63:57;
  507. uint64_t enc_mode:1;
  508. uint64_t drop_ln:2;
  509. uint64_t lafifovfl:1;
  510. uint64_t la_en:1;
  511. uint64_t pkt_sz:2;
  512. #else
  513. uint64_t pkt_sz:2;
  514. uint64_t la_en:1;
  515. uint64_t lafifovfl:1;
  516. uint64_t drop_ln:2;
  517. uint64_t enc_mode:1;
  518. uint64_t reserved_7_63:57;
  519. #endif
  520. } s;
  521. struct cvmx_pcsxx_log_anl_reg_s cn52xx;
  522. struct cvmx_pcsxx_log_anl_reg_s cn52xxp1;
  523. struct cvmx_pcsxx_log_anl_reg_s cn56xx;
  524. struct cvmx_pcsxx_log_anl_reg_s cn56xxp1;
  525. struct cvmx_pcsxx_log_anl_reg_s cn61xx;
  526. struct cvmx_pcsxx_log_anl_reg_s cn63xx;
  527. struct cvmx_pcsxx_log_anl_reg_s cn63xxp1;
  528. struct cvmx_pcsxx_log_anl_reg_s cn66xx;
  529. struct cvmx_pcsxx_log_anl_reg_s cn68xx;
  530. struct cvmx_pcsxx_log_anl_reg_s cn68xxp1;
  531. };
  532. union cvmx_pcsxx_misc_ctl_reg {
  533. uint64_t u64;
  534. struct cvmx_pcsxx_misc_ctl_reg_s {
  535. #ifdef __BIG_ENDIAN_BITFIELD
  536. uint64_t reserved_4_63:60;
  537. uint64_t tx_swap:1;
  538. uint64_t rx_swap:1;
  539. uint64_t xaui:1;
  540. uint64_t gmxeno:1;
  541. #else
  542. uint64_t gmxeno:1;
  543. uint64_t xaui:1;
  544. uint64_t rx_swap:1;
  545. uint64_t tx_swap:1;
  546. uint64_t reserved_4_63:60;
  547. #endif
  548. } s;
  549. struct cvmx_pcsxx_misc_ctl_reg_s cn52xx;
  550. struct cvmx_pcsxx_misc_ctl_reg_s cn52xxp1;
  551. struct cvmx_pcsxx_misc_ctl_reg_s cn56xx;
  552. struct cvmx_pcsxx_misc_ctl_reg_s cn56xxp1;
  553. struct cvmx_pcsxx_misc_ctl_reg_s cn61xx;
  554. struct cvmx_pcsxx_misc_ctl_reg_s cn63xx;
  555. struct cvmx_pcsxx_misc_ctl_reg_s cn63xxp1;
  556. struct cvmx_pcsxx_misc_ctl_reg_s cn66xx;
  557. struct cvmx_pcsxx_misc_ctl_reg_s cn68xx;
  558. struct cvmx_pcsxx_misc_ctl_reg_s cn68xxp1;
  559. };
  560. union cvmx_pcsxx_rx_sync_states_reg {
  561. uint64_t u64;
  562. struct cvmx_pcsxx_rx_sync_states_reg_s {
  563. #ifdef __BIG_ENDIAN_BITFIELD
  564. uint64_t reserved_16_63:48;
  565. uint64_t sync3st:4;
  566. uint64_t sync2st:4;
  567. uint64_t sync1st:4;
  568. uint64_t sync0st:4;
  569. #else
  570. uint64_t sync0st:4;
  571. uint64_t sync1st:4;
  572. uint64_t sync2st:4;
  573. uint64_t sync3st:4;
  574. uint64_t reserved_16_63:48;
  575. #endif
  576. } s;
  577. struct cvmx_pcsxx_rx_sync_states_reg_s cn52xx;
  578. struct cvmx_pcsxx_rx_sync_states_reg_s cn52xxp1;
  579. struct cvmx_pcsxx_rx_sync_states_reg_s cn56xx;
  580. struct cvmx_pcsxx_rx_sync_states_reg_s cn56xxp1;
  581. struct cvmx_pcsxx_rx_sync_states_reg_s cn61xx;
  582. struct cvmx_pcsxx_rx_sync_states_reg_s cn63xx;
  583. struct cvmx_pcsxx_rx_sync_states_reg_s cn63xxp1;
  584. struct cvmx_pcsxx_rx_sync_states_reg_s cn66xx;
  585. struct cvmx_pcsxx_rx_sync_states_reg_s cn68xx;
  586. struct cvmx_pcsxx_rx_sync_states_reg_s cn68xxp1;
  587. };
  588. union cvmx_pcsxx_spd_abil_reg {
  589. uint64_t u64;
  590. struct cvmx_pcsxx_spd_abil_reg_s {
  591. #ifdef __BIG_ENDIAN_BITFIELD
  592. uint64_t reserved_2_63:62;
  593. uint64_t tenpasst:1;
  594. uint64_t tengb:1;
  595. #else
  596. uint64_t tengb:1;
  597. uint64_t tenpasst:1;
  598. uint64_t reserved_2_63:62;
  599. #endif
  600. } s;
  601. struct cvmx_pcsxx_spd_abil_reg_s cn52xx;
  602. struct cvmx_pcsxx_spd_abil_reg_s cn52xxp1;
  603. struct cvmx_pcsxx_spd_abil_reg_s cn56xx;
  604. struct cvmx_pcsxx_spd_abil_reg_s cn56xxp1;
  605. struct cvmx_pcsxx_spd_abil_reg_s cn61xx;
  606. struct cvmx_pcsxx_spd_abil_reg_s cn63xx;
  607. struct cvmx_pcsxx_spd_abil_reg_s cn63xxp1;
  608. struct cvmx_pcsxx_spd_abil_reg_s cn66xx;
  609. struct cvmx_pcsxx_spd_abil_reg_s cn68xx;
  610. struct cvmx_pcsxx_spd_abil_reg_s cn68xxp1;
  611. };
  612. union cvmx_pcsxx_status1_reg {
  613. uint64_t u64;
  614. struct cvmx_pcsxx_status1_reg_s {
  615. #ifdef __BIG_ENDIAN_BITFIELD
  616. uint64_t reserved_8_63:56;
  617. uint64_t flt:1;
  618. uint64_t reserved_3_6:4;
  619. uint64_t rcv_lnk:1;
  620. uint64_t lpable:1;
  621. uint64_t reserved_0_0:1;
  622. #else
  623. uint64_t reserved_0_0:1;
  624. uint64_t lpable:1;
  625. uint64_t rcv_lnk:1;
  626. uint64_t reserved_3_6:4;
  627. uint64_t flt:1;
  628. uint64_t reserved_8_63:56;
  629. #endif
  630. } s;
  631. struct cvmx_pcsxx_status1_reg_s cn52xx;
  632. struct cvmx_pcsxx_status1_reg_s cn52xxp1;
  633. struct cvmx_pcsxx_status1_reg_s cn56xx;
  634. struct cvmx_pcsxx_status1_reg_s cn56xxp1;
  635. struct cvmx_pcsxx_status1_reg_s cn61xx;
  636. struct cvmx_pcsxx_status1_reg_s cn63xx;
  637. struct cvmx_pcsxx_status1_reg_s cn63xxp1;
  638. struct cvmx_pcsxx_status1_reg_s cn66xx;
  639. struct cvmx_pcsxx_status1_reg_s cn68xx;
  640. struct cvmx_pcsxx_status1_reg_s cn68xxp1;
  641. };
  642. union cvmx_pcsxx_status2_reg {
  643. uint64_t u64;
  644. struct cvmx_pcsxx_status2_reg_s {
  645. #ifdef __BIG_ENDIAN_BITFIELD
  646. uint64_t reserved_16_63:48;
  647. uint64_t dev:2;
  648. uint64_t reserved_12_13:2;
  649. uint64_t xmtflt:1;
  650. uint64_t rcvflt:1;
  651. uint64_t reserved_3_9:7;
  652. uint64_t tengb_w:1;
  653. uint64_t tengb_x:1;
  654. uint64_t tengb_r:1;
  655. #else
  656. uint64_t tengb_r:1;
  657. uint64_t tengb_x:1;
  658. uint64_t tengb_w:1;
  659. uint64_t reserved_3_9:7;
  660. uint64_t rcvflt:1;
  661. uint64_t xmtflt:1;
  662. uint64_t reserved_12_13:2;
  663. uint64_t dev:2;
  664. uint64_t reserved_16_63:48;
  665. #endif
  666. } s;
  667. struct cvmx_pcsxx_status2_reg_s cn52xx;
  668. struct cvmx_pcsxx_status2_reg_s cn52xxp1;
  669. struct cvmx_pcsxx_status2_reg_s cn56xx;
  670. struct cvmx_pcsxx_status2_reg_s cn56xxp1;
  671. struct cvmx_pcsxx_status2_reg_s cn61xx;
  672. struct cvmx_pcsxx_status2_reg_s cn63xx;
  673. struct cvmx_pcsxx_status2_reg_s cn63xxp1;
  674. struct cvmx_pcsxx_status2_reg_s cn66xx;
  675. struct cvmx_pcsxx_status2_reg_s cn68xx;
  676. struct cvmx_pcsxx_status2_reg_s cn68xxp1;
  677. };
  678. union cvmx_pcsxx_tx_rx_polarity_reg {
  679. uint64_t u64;
  680. struct cvmx_pcsxx_tx_rx_polarity_reg_s {
  681. #ifdef __BIG_ENDIAN_BITFIELD
  682. uint64_t reserved_10_63:54;
  683. uint64_t xor_rxplrt:4;
  684. uint64_t xor_txplrt:4;
  685. uint64_t rxplrt:1;
  686. uint64_t txplrt:1;
  687. #else
  688. uint64_t txplrt:1;
  689. uint64_t rxplrt:1;
  690. uint64_t xor_txplrt:4;
  691. uint64_t xor_rxplrt:4;
  692. uint64_t reserved_10_63:54;
  693. #endif
  694. } s;
  695. struct cvmx_pcsxx_tx_rx_polarity_reg_s cn52xx;
  696. struct cvmx_pcsxx_tx_rx_polarity_reg_cn52xxp1 {
  697. #ifdef __BIG_ENDIAN_BITFIELD
  698. uint64_t reserved_2_63:62;
  699. uint64_t rxplrt:1;
  700. uint64_t txplrt:1;
  701. #else
  702. uint64_t txplrt:1;
  703. uint64_t rxplrt:1;
  704. uint64_t reserved_2_63:62;
  705. #endif
  706. } cn52xxp1;
  707. struct cvmx_pcsxx_tx_rx_polarity_reg_s cn56xx;
  708. struct cvmx_pcsxx_tx_rx_polarity_reg_cn52xxp1 cn56xxp1;
  709. struct cvmx_pcsxx_tx_rx_polarity_reg_s cn61xx;
  710. struct cvmx_pcsxx_tx_rx_polarity_reg_s cn63xx;
  711. struct cvmx_pcsxx_tx_rx_polarity_reg_s cn63xxp1;
  712. struct cvmx_pcsxx_tx_rx_polarity_reg_s cn66xx;
  713. struct cvmx_pcsxx_tx_rx_polarity_reg_s cn68xx;
  714. struct cvmx_pcsxx_tx_rx_polarity_reg_s cn68xxp1;
  715. };
  716. union cvmx_pcsxx_tx_rx_states_reg {
  717. uint64_t u64;
  718. struct cvmx_pcsxx_tx_rx_states_reg_s {
  719. #ifdef __BIG_ENDIAN_BITFIELD
  720. uint64_t reserved_14_63:50;
  721. uint64_t term_err:1;
  722. uint64_t syn3bad:1;
  723. uint64_t syn2bad:1;
  724. uint64_t syn1bad:1;
  725. uint64_t syn0bad:1;
  726. uint64_t rxbad:1;
  727. uint64_t algn_st:3;
  728. uint64_t rx_st:2;
  729. uint64_t tx_st:3;
  730. #else
  731. uint64_t tx_st:3;
  732. uint64_t rx_st:2;
  733. uint64_t algn_st:3;
  734. uint64_t rxbad:1;
  735. uint64_t syn0bad:1;
  736. uint64_t syn1bad:1;
  737. uint64_t syn2bad:1;
  738. uint64_t syn3bad:1;
  739. uint64_t term_err:1;
  740. uint64_t reserved_14_63:50;
  741. #endif
  742. } s;
  743. struct cvmx_pcsxx_tx_rx_states_reg_s cn52xx;
  744. struct cvmx_pcsxx_tx_rx_states_reg_cn52xxp1 {
  745. #ifdef __BIG_ENDIAN_BITFIELD
  746. uint64_t reserved_13_63:51;
  747. uint64_t syn3bad:1;
  748. uint64_t syn2bad:1;
  749. uint64_t syn1bad:1;
  750. uint64_t syn0bad:1;
  751. uint64_t rxbad:1;
  752. uint64_t algn_st:3;
  753. uint64_t rx_st:2;
  754. uint64_t tx_st:3;
  755. #else
  756. uint64_t tx_st:3;
  757. uint64_t rx_st:2;
  758. uint64_t algn_st:3;
  759. uint64_t rxbad:1;
  760. uint64_t syn0bad:1;
  761. uint64_t syn1bad:1;
  762. uint64_t syn2bad:1;
  763. uint64_t syn3bad:1;
  764. uint64_t reserved_13_63:51;
  765. #endif
  766. } cn52xxp1;
  767. struct cvmx_pcsxx_tx_rx_states_reg_s cn56xx;
  768. struct cvmx_pcsxx_tx_rx_states_reg_cn52xxp1 cn56xxp1;
  769. struct cvmx_pcsxx_tx_rx_states_reg_s cn61xx;
  770. struct cvmx_pcsxx_tx_rx_states_reg_s cn63xx;
  771. struct cvmx_pcsxx_tx_rx_states_reg_s cn63xxp1;
  772. struct cvmx_pcsxx_tx_rx_states_reg_s cn66xx;
  773. struct cvmx_pcsxx_tx_rx_states_reg_s cn68xx;
  774. struct cvmx_pcsxx_tx_rx_states_reg_s cn68xxp1;
  775. };
  776. #endif