cvmx-spxx-defs.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  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_SPXX_DEFS_H__
  28. #define __CVMX_SPXX_DEFS_H__
  29. #define CVMX_SPXX_BCKPRS_CNT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000340ull) + ((block_id) & 1) * 0x8000000ull)
  30. #define CVMX_SPXX_BIST_STAT(block_id) (CVMX_ADD_IO_SEG(0x00011800900007F8ull) + ((block_id) & 1) * 0x8000000ull)
  31. #define CVMX_SPXX_CLK_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000348ull) + ((block_id) & 1) * 0x8000000ull)
  32. #define CVMX_SPXX_CLK_STAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000350ull) + ((block_id) & 1) * 0x8000000ull)
  33. #define CVMX_SPXX_DBG_DESKEW_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000368ull) + ((block_id) & 1) * 0x8000000ull)
  34. #define CVMX_SPXX_DBG_DESKEW_STATE(block_id) (CVMX_ADD_IO_SEG(0x0001180090000370ull) + ((block_id) & 1) * 0x8000000ull)
  35. #define CVMX_SPXX_DRV_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000358ull) + ((block_id) & 1) * 0x8000000ull)
  36. #define CVMX_SPXX_ERR_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000320ull) + ((block_id) & 1) * 0x8000000ull)
  37. #define CVMX_SPXX_INT_DAT(block_id) (CVMX_ADD_IO_SEG(0x0001180090000318ull) + ((block_id) & 1) * 0x8000000ull)
  38. #define CVMX_SPXX_INT_MSK(block_id) (CVMX_ADD_IO_SEG(0x0001180090000308ull) + ((block_id) & 1) * 0x8000000ull)
  39. #define CVMX_SPXX_INT_REG(block_id) (CVMX_ADD_IO_SEG(0x0001180090000300ull) + ((block_id) & 1) * 0x8000000ull)
  40. #define CVMX_SPXX_INT_SYNC(block_id) (CVMX_ADD_IO_SEG(0x0001180090000310ull) + ((block_id) & 1) * 0x8000000ull)
  41. #define CVMX_SPXX_TPA_ACC(block_id) (CVMX_ADD_IO_SEG(0x0001180090000338ull) + ((block_id) & 1) * 0x8000000ull)
  42. #define CVMX_SPXX_TPA_MAX(block_id) (CVMX_ADD_IO_SEG(0x0001180090000330ull) + ((block_id) & 1) * 0x8000000ull)
  43. #define CVMX_SPXX_TPA_SEL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000328ull) + ((block_id) & 1) * 0x8000000ull)
  44. #define CVMX_SPXX_TRN4_CTL(block_id) (CVMX_ADD_IO_SEG(0x0001180090000360ull) + ((block_id) & 1) * 0x8000000ull)
  45. void __cvmx_interrupt_spxx_int_msk_enable(int index);
  46. union cvmx_spxx_bckprs_cnt {
  47. uint64_t u64;
  48. struct cvmx_spxx_bckprs_cnt_s {
  49. #ifdef __BIG_ENDIAN_BITFIELD
  50. uint64_t reserved_32_63:32;
  51. uint64_t cnt:32;
  52. #else
  53. uint64_t cnt:32;
  54. uint64_t reserved_32_63:32;
  55. #endif
  56. } s;
  57. };
  58. union cvmx_spxx_bist_stat {
  59. uint64_t u64;
  60. struct cvmx_spxx_bist_stat_s {
  61. #ifdef __BIG_ENDIAN_BITFIELD
  62. uint64_t reserved_3_63:61;
  63. uint64_t stat2:1;
  64. uint64_t stat1:1;
  65. uint64_t stat0:1;
  66. #else
  67. uint64_t stat0:1;
  68. uint64_t stat1:1;
  69. uint64_t stat2:1;
  70. uint64_t reserved_3_63:61;
  71. #endif
  72. } s;
  73. };
  74. union cvmx_spxx_clk_ctl {
  75. uint64_t u64;
  76. struct cvmx_spxx_clk_ctl_s {
  77. #ifdef __BIG_ENDIAN_BITFIELD
  78. uint64_t reserved_17_63:47;
  79. uint64_t seetrn:1;
  80. uint64_t reserved_12_15:4;
  81. uint64_t clkdly:5;
  82. uint64_t runbist:1;
  83. uint64_t statdrv:1;
  84. uint64_t statrcv:1;
  85. uint64_t sndtrn:1;
  86. uint64_t drptrn:1;
  87. uint64_t rcvtrn:1;
  88. uint64_t srxdlck:1;
  89. #else
  90. uint64_t srxdlck:1;
  91. uint64_t rcvtrn:1;
  92. uint64_t drptrn:1;
  93. uint64_t sndtrn:1;
  94. uint64_t statrcv:1;
  95. uint64_t statdrv:1;
  96. uint64_t runbist:1;
  97. uint64_t clkdly:5;
  98. uint64_t reserved_12_15:4;
  99. uint64_t seetrn:1;
  100. uint64_t reserved_17_63:47;
  101. #endif
  102. } s;
  103. };
  104. union cvmx_spxx_clk_stat {
  105. uint64_t u64;
  106. struct cvmx_spxx_clk_stat_s {
  107. #ifdef __BIG_ENDIAN_BITFIELD
  108. uint64_t reserved_11_63:53;
  109. uint64_t stxcal:1;
  110. uint64_t reserved_9_9:1;
  111. uint64_t srxtrn:1;
  112. uint64_t s4clk1:1;
  113. uint64_t s4clk0:1;
  114. uint64_t d4clk1:1;
  115. uint64_t d4clk0:1;
  116. uint64_t reserved_0_3:4;
  117. #else
  118. uint64_t reserved_0_3:4;
  119. uint64_t d4clk0:1;
  120. uint64_t d4clk1:1;
  121. uint64_t s4clk0:1;
  122. uint64_t s4clk1:1;
  123. uint64_t srxtrn:1;
  124. uint64_t reserved_9_9:1;
  125. uint64_t stxcal:1;
  126. uint64_t reserved_11_63:53;
  127. #endif
  128. } s;
  129. };
  130. union cvmx_spxx_dbg_deskew_ctl {
  131. uint64_t u64;
  132. struct cvmx_spxx_dbg_deskew_ctl_s {
  133. #ifdef __BIG_ENDIAN_BITFIELD
  134. uint64_t reserved_30_63:34;
  135. uint64_t fallnop:1;
  136. uint64_t fall8:1;
  137. uint64_t reserved_26_27:2;
  138. uint64_t sstep_go:1;
  139. uint64_t sstep:1;
  140. uint64_t reserved_22_23:2;
  141. uint64_t clrdly:1;
  142. uint64_t dec:1;
  143. uint64_t inc:1;
  144. uint64_t mux:1;
  145. uint64_t offset:5;
  146. uint64_t bitsel:5;
  147. uint64_t offdly:6;
  148. uint64_t dllfrc:1;
  149. uint64_t dlldis:1;
  150. #else
  151. uint64_t dlldis:1;
  152. uint64_t dllfrc:1;
  153. uint64_t offdly:6;
  154. uint64_t bitsel:5;
  155. uint64_t offset:5;
  156. uint64_t mux:1;
  157. uint64_t inc:1;
  158. uint64_t dec:1;
  159. uint64_t clrdly:1;
  160. uint64_t reserved_22_23:2;
  161. uint64_t sstep:1;
  162. uint64_t sstep_go:1;
  163. uint64_t reserved_26_27:2;
  164. uint64_t fall8:1;
  165. uint64_t fallnop:1;
  166. uint64_t reserved_30_63:34;
  167. #endif
  168. } s;
  169. };
  170. union cvmx_spxx_dbg_deskew_state {
  171. uint64_t u64;
  172. struct cvmx_spxx_dbg_deskew_state_s {
  173. #ifdef __BIG_ENDIAN_BITFIELD
  174. uint64_t reserved_9_63:55;
  175. uint64_t testres:1;
  176. uint64_t unxterm:1;
  177. uint64_t muxsel:2;
  178. uint64_t offset:5;
  179. #else
  180. uint64_t offset:5;
  181. uint64_t muxsel:2;
  182. uint64_t unxterm:1;
  183. uint64_t testres:1;
  184. uint64_t reserved_9_63:55;
  185. #endif
  186. } s;
  187. };
  188. union cvmx_spxx_drv_ctl {
  189. uint64_t u64;
  190. struct cvmx_spxx_drv_ctl_s {
  191. #ifdef __BIG_ENDIAN_BITFIELD
  192. uint64_t reserved_0_63:64;
  193. #else
  194. uint64_t reserved_0_63:64;
  195. #endif
  196. } s;
  197. struct cvmx_spxx_drv_ctl_cn38xx {
  198. #ifdef __BIG_ENDIAN_BITFIELD
  199. uint64_t reserved_16_63:48;
  200. uint64_t stx4ncmp:4;
  201. uint64_t stx4pcmp:4;
  202. uint64_t srx4cmp:8;
  203. #else
  204. uint64_t srx4cmp:8;
  205. uint64_t stx4pcmp:4;
  206. uint64_t stx4ncmp:4;
  207. uint64_t reserved_16_63:48;
  208. #endif
  209. } cn38xx;
  210. struct cvmx_spxx_drv_ctl_cn58xx {
  211. #ifdef __BIG_ENDIAN_BITFIELD
  212. uint64_t reserved_24_63:40;
  213. uint64_t stx4ncmp:4;
  214. uint64_t stx4pcmp:4;
  215. uint64_t reserved_10_15:6;
  216. uint64_t srx4cmp:10;
  217. #else
  218. uint64_t srx4cmp:10;
  219. uint64_t reserved_10_15:6;
  220. uint64_t stx4pcmp:4;
  221. uint64_t stx4ncmp:4;
  222. uint64_t reserved_24_63:40;
  223. #endif
  224. } cn58xx;
  225. };
  226. union cvmx_spxx_err_ctl {
  227. uint64_t u64;
  228. struct cvmx_spxx_err_ctl_s {
  229. #ifdef __BIG_ENDIAN_BITFIELD
  230. uint64_t reserved_9_63:55;
  231. uint64_t prtnxa:1;
  232. uint64_t dipcls:1;
  233. uint64_t dippay:1;
  234. uint64_t reserved_4_5:2;
  235. uint64_t errcnt:4;
  236. #else
  237. uint64_t errcnt:4;
  238. uint64_t reserved_4_5:2;
  239. uint64_t dippay:1;
  240. uint64_t dipcls:1;
  241. uint64_t prtnxa:1;
  242. uint64_t reserved_9_63:55;
  243. #endif
  244. } s;
  245. };
  246. union cvmx_spxx_int_dat {
  247. uint64_t u64;
  248. struct cvmx_spxx_int_dat_s {
  249. #ifdef __BIG_ENDIAN_BITFIELD
  250. uint64_t reserved_32_63:32;
  251. uint64_t mul:1;
  252. uint64_t reserved_14_30:17;
  253. uint64_t calbnk:2;
  254. uint64_t rsvop:4;
  255. uint64_t prt:8;
  256. #else
  257. uint64_t prt:8;
  258. uint64_t rsvop:4;
  259. uint64_t calbnk:2;
  260. uint64_t reserved_14_30:17;
  261. uint64_t mul:1;
  262. uint64_t reserved_32_63:32;
  263. #endif
  264. } s;
  265. };
  266. union cvmx_spxx_int_msk {
  267. uint64_t u64;
  268. struct cvmx_spxx_int_msk_s {
  269. #ifdef __BIG_ENDIAN_BITFIELD
  270. uint64_t reserved_12_63:52;
  271. uint64_t calerr:1;
  272. uint64_t syncerr:1;
  273. uint64_t diperr:1;
  274. uint64_t tpaovr:1;
  275. uint64_t rsverr:1;
  276. uint64_t drwnng:1;
  277. uint64_t clserr:1;
  278. uint64_t spiovr:1;
  279. uint64_t reserved_2_3:2;
  280. uint64_t abnorm:1;
  281. uint64_t prtnxa:1;
  282. #else
  283. uint64_t prtnxa:1;
  284. uint64_t abnorm:1;
  285. uint64_t reserved_2_3:2;
  286. uint64_t spiovr:1;
  287. uint64_t clserr:1;
  288. uint64_t drwnng:1;
  289. uint64_t rsverr:1;
  290. uint64_t tpaovr:1;
  291. uint64_t diperr:1;
  292. uint64_t syncerr:1;
  293. uint64_t calerr:1;
  294. uint64_t reserved_12_63:52;
  295. #endif
  296. } s;
  297. };
  298. union cvmx_spxx_int_reg {
  299. uint64_t u64;
  300. struct cvmx_spxx_int_reg_s {
  301. #ifdef __BIG_ENDIAN_BITFIELD
  302. uint64_t reserved_32_63:32;
  303. uint64_t spf:1;
  304. uint64_t reserved_12_30:19;
  305. uint64_t calerr:1;
  306. uint64_t syncerr:1;
  307. uint64_t diperr:1;
  308. uint64_t tpaovr:1;
  309. uint64_t rsverr:1;
  310. uint64_t drwnng:1;
  311. uint64_t clserr:1;
  312. uint64_t spiovr:1;
  313. uint64_t reserved_2_3:2;
  314. uint64_t abnorm:1;
  315. uint64_t prtnxa:1;
  316. #else
  317. uint64_t prtnxa:1;
  318. uint64_t abnorm:1;
  319. uint64_t reserved_2_3:2;
  320. uint64_t spiovr:1;
  321. uint64_t clserr:1;
  322. uint64_t drwnng:1;
  323. uint64_t rsverr:1;
  324. uint64_t tpaovr:1;
  325. uint64_t diperr:1;
  326. uint64_t syncerr:1;
  327. uint64_t calerr:1;
  328. uint64_t reserved_12_30:19;
  329. uint64_t spf:1;
  330. uint64_t reserved_32_63:32;
  331. #endif
  332. } s;
  333. };
  334. union cvmx_spxx_int_sync {
  335. uint64_t u64;
  336. struct cvmx_spxx_int_sync_s {
  337. #ifdef __BIG_ENDIAN_BITFIELD
  338. uint64_t reserved_12_63:52;
  339. uint64_t calerr:1;
  340. uint64_t syncerr:1;
  341. uint64_t diperr:1;
  342. uint64_t tpaovr:1;
  343. uint64_t rsverr:1;
  344. uint64_t drwnng:1;
  345. uint64_t clserr:1;
  346. uint64_t spiovr:1;
  347. uint64_t reserved_2_3:2;
  348. uint64_t abnorm:1;
  349. uint64_t prtnxa:1;
  350. #else
  351. uint64_t prtnxa:1;
  352. uint64_t abnorm:1;
  353. uint64_t reserved_2_3:2;
  354. uint64_t spiovr:1;
  355. uint64_t clserr:1;
  356. uint64_t drwnng:1;
  357. uint64_t rsverr:1;
  358. uint64_t tpaovr:1;
  359. uint64_t diperr:1;
  360. uint64_t syncerr:1;
  361. uint64_t calerr:1;
  362. uint64_t reserved_12_63:52;
  363. #endif
  364. } s;
  365. };
  366. union cvmx_spxx_tpa_acc {
  367. uint64_t u64;
  368. struct cvmx_spxx_tpa_acc_s {
  369. #ifdef __BIG_ENDIAN_BITFIELD
  370. uint64_t reserved_32_63:32;
  371. uint64_t cnt:32;
  372. #else
  373. uint64_t cnt:32;
  374. uint64_t reserved_32_63:32;
  375. #endif
  376. } s;
  377. };
  378. union cvmx_spxx_tpa_max {
  379. uint64_t u64;
  380. struct cvmx_spxx_tpa_max_s {
  381. #ifdef __BIG_ENDIAN_BITFIELD
  382. uint64_t reserved_32_63:32;
  383. uint64_t max:32;
  384. #else
  385. uint64_t max:32;
  386. uint64_t reserved_32_63:32;
  387. #endif
  388. } s;
  389. };
  390. union cvmx_spxx_tpa_sel {
  391. uint64_t u64;
  392. struct cvmx_spxx_tpa_sel_s {
  393. #ifdef __BIG_ENDIAN_BITFIELD
  394. uint64_t reserved_4_63:60;
  395. uint64_t prtsel:4;
  396. #else
  397. uint64_t prtsel:4;
  398. uint64_t reserved_4_63:60;
  399. #endif
  400. } s;
  401. };
  402. union cvmx_spxx_trn4_ctl {
  403. uint64_t u64;
  404. struct cvmx_spxx_trn4_ctl_s {
  405. #ifdef __BIG_ENDIAN_BITFIELD
  406. uint64_t reserved_13_63:51;
  407. uint64_t trntest:1;
  408. uint64_t jitter:3;
  409. uint64_t clr_boot:1;
  410. uint64_t set_boot:1;
  411. uint64_t maxdist:5;
  412. uint64_t macro_en:1;
  413. uint64_t mux_en:1;
  414. #else
  415. uint64_t mux_en:1;
  416. uint64_t macro_en:1;
  417. uint64_t maxdist:5;
  418. uint64_t set_boot:1;
  419. uint64_t clr_boot:1;
  420. uint64_t jitter:3;
  421. uint64_t trntest:1;
  422. uint64_t reserved_13_63:51;
  423. #endif
  424. } s;
  425. };
  426. #endif