cvmx-mixx-defs.h 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430
  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-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_MIXX_DEFS_H__
  28. #define __CVMX_MIXX_DEFS_H__
  29. #define CVMX_MIXX_BIST(offset) (CVMX_ADD_IO_SEG(0x0001070000100078ull) + ((offset) & 1) * 2048)
  30. #define CVMX_MIXX_CTL(offset) (CVMX_ADD_IO_SEG(0x0001070000100020ull) + ((offset) & 1) * 2048)
  31. #define CVMX_MIXX_INTENA(offset) (CVMX_ADD_IO_SEG(0x0001070000100050ull) + ((offset) & 1) * 2048)
  32. #define CVMX_MIXX_IRCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100030ull) + ((offset) & 1) * 2048)
  33. #define CVMX_MIXX_IRHWM(offset) (CVMX_ADD_IO_SEG(0x0001070000100028ull) + ((offset) & 1) * 2048)
  34. #define CVMX_MIXX_IRING1(offset) (CVMX_ADD_IO_SEG(0x0001070000100010ull) + ((offset) & 1) * 2048)
  35. #define CVMX_MIXX_IRING2(offset) (CVMX_ADD_IO_SEG(0x0001070000100018ull) + ((offset) & 1) * 2048)
  36. #define CVMX_MIXX_ISR(offset) (CVMX_ADD_IO_SEG(0x0001070000100048ull) + ((offset) & 1) * 2048)
  37. #define CVMX_MIXX_ORCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100040ull) + ((offset) & 1) * 2048)
  38. #define CVMX_MIXX_ORHWM(offset) (CVMX_ADD_IO_SEG(0x0001070000100038ull) + ((offset) & 1) * 2048)
  39. #define CVMX_MIXX_ORING1(offset) (CVMX_ADD_IO_SEG(0x0001070000100000ull) + ((offset) & 1) * 2048)
  40. #define CVMX_MIXX_ORING2(offset) (CVMX_ADD_IO_SEG(0x0001070000100008ull) + ((offset) & 1) * 2048)
  41. #define CVMX_MIXX_REMCNT(offset) (CVMX_ADD_IO_SEG(0x0001070000100058ull) + ((offset) & 1) * 2048)
  42. #define CVMX_MIXX_TSCTL(offset) (CVMX_ADD_IO_SEG(0x0001070000100068ull) + ((offset) & 1) * 2048)
  43. #define CVMX_MIXX_TSTAMP(offset) (CVMX_ADD_IO_SEG(0x0001070000100060ull) + ((offset) & 1) * 2048)
  44. union cvmx_mixx_bist {
  45. uint64_t u64;
  46. struct cvmx_mixx_bist_s {
  47. #ifdef __BIG_ENDIAN_BITFIELD
  48. uint64_t reserved_6_63:58;
  49. uint64_t opfdat:1;
  50. uint64_t mrgdat:1;
  51. uint64_t mrqdat:1;
  52. uint64_t ipfdat:1;
  53. uint64_t irfdat:1;
  54. uint64_t orfdat:1;
  55. #else
  56. uint64_t orfdat:1;
  57. uint64_t irfdat:1;
  58. uint64_t ipfdat:1;
  59. uint64_t mrqdat:1;
  60. uint64_t mrgdat:1;
  61. uint64_t opfdat:1;
  62. uint64_t reserved_6_63:58;
  63. #endif
  64. } s;
  65. struct cvmx_mixx_bist_cn52xx {
  66. #ifdef __BIG_ENDIAN_BITFIELD
  67. uint64_t reserved_4_63:60;
  68. uint64_t mrqdat:1;
  69. uint64_t ipfdat:1;
  70. uint64_t irfdat:1;
  71. uint64_t orfdat:1;
  72. #else
  73. uint64_t orfdat:1;
  74. uint64_t irfdat:1;
  75. uint64_t ipfdat:1;
  76. uint64_t mrqdat:1;
  77. uint64_t reserved_4_63:60;
  78. #endif
  79. } cn52xx;
  80. };
  81. union cvmx_mixx_ctl {
  82. uint64_t u64;
  83. struct cvmx_mixx_ctl_s {
  84. #ifdef __BIG_ENDIAN_BITFIELD
  85. uint64_t reserved_12_63:52;
  86. uint64_t ts_thresh:4;
  87. uint64_t crc_strip:1;
  88. uint64_t busy:1;
  89. uint64_t en:1;
  90. uint64_t reset:1;
  91. uint64_t lendian:1;
  92. uint64_t nbtarb:1;
  93. uint64_t mrq_hwm:2;
  94. #else
  95. uint64_t mrq_hwm:2;
  96. uint64_t nbtarb:1;
  97. uint64_t lendian:1;
  98. uint64_t reset:1;
  99. uint64_t en:1;
  100. uint64_t busy:1;
  101. uint64_t crc_strip:1;
  102. uint64_t ts_thresh:4;
  103. uint64_t reserved_12_63:52;
  104. #endif
  105. } s;
  106. struct cvmx_mixx_ctl_cn52xx {
  107. #ifdef __BIG_ENDIAN_BITFIELD
  108. uint64_t reserved_8_63:56;
  109. uint64_t crc_strip:1;
  110. uint64_t busy:1;
  111. uint64_t en:1;
  112. uint64_t reset:1;
  113. uint64_t lendian:1;
  114. uint64_t nbtarb:1;
  115. uint64_t mrq_hwm:2;
  116. #else
  117. uint64_t mrq_hwm:2;
  118. uint64_t nbtarb:1;
  119. uint64_t lendian:1;
  120. uint64_t reset:1;
  121. uint64_t en:1;
  122. uint64_t busy:1;
  123. uint64_t crc_strip:1;
  124. uint64_t reserved_8_63:56;
  125. #endif
  126. } cn52xx;
  127. };
  128. union cvmx_mixx_intena {
  129. uint64_t u64;
  130. struct cvmx_mixx_intena_s {
  131. #ifdef __BIG_ENDIAN_BITFIELD
  132. uint64_t reserved_8_63:56;
  133. uint64_t tsena:1;
  134. uint64_t orunena:1;
  135. uint64_t irunena:1;
  136. uint64_t data_drpena:1;
  137. uint64_t ithena:1;
  138. uint64_t othena:1;
  139. uint64_t ivfena:1;
  140. uint64_t ovfena:1;
  141. #else
  142. uint64_t ovfena:1;
  143. uint64_t ivfena:1;
  144. uint64_t othena:1;
  145. uint64_t ithena:1;
  146. uint64_t data_drpena:1;
  147. uint64_t irunena:1;
  148. uint64_t orunena:1;
  149. uint64_t tsena:1;
  150. uint64_t reserved_8_63:56;
  151. #endif
  152. } s;
  153. struct cvmx_mixx_intena_cn52xx {
  154. #ifdef __BIG_ENDIAN_BITFIELD
  155. uint64_t reserved_7_63:57;
  156. uint64_t orunena:1;
  157. uint64_t irunena:1;
  158. uint64_t data_drpena:1;
  159. uint64_t ithena:1;
  160. uint64_t othena:1;
  161. uint64_t ivfena:1;
  162. uint64_t ovfena:1;
  163. #else
  164. uint64_t ovfena:1;
  165. uint64_t ivfena:1;
  166. uint64_t othena:1;
  167. uint64_t ithena:1;
  168. uint64_t data_drpena:1;
  169. uint64_t irunena:1;
  170. uint64_t orunena:1;
  171. uint64_t reserved_7_63:57;
  172. #endif
  173. } cn52xx;
  174. };
  175. union cvmx_mixx_ircnt {
  176. uint64_t u64;
  177. struct cvmx_mixx_ircnt_s {
  178. #ifdef __BIG_ENDIAN_BITFIELD
  179. uint64_t reserved_20_63:44;
  180. uint64_t ircnt:20;
  181. #else
  182. uint64_t ircnt:20;
  183. uint64_t reserved_20_63:44;
  184. #endif
  185. } s;
  186. };
  187. union cvmx_mixx_irhwm {
  188. uint64_t u64;
  189. struct cvmx_mixx_irhwm_s {
  190. #ifdef __BIG_ENDIAN_BITFIELD
  191. uint64_t reserved_40_63:24;
  192. uint64_t ibplwm:20;
  193. uint64_t irhwm:20;
  194. #else
  195. uint64_t irhwm:20;
  196. uint64_t ibplwm:20;
  197. uint64_t reserved_40_63:24;
  198. #endif
  199. } s;
  200. };
  201. union cvmx_mixx_iring1 {
  202. uint64_t u64;
  203. struct cvmx_mixx_iring1_s {
  204. #ifdef __BIG_ENDIAN_BITFIELD
  205. uint64_t reserved_60_63:4;
  206. uint64_t isize:20;
  207. uint64_t ibase:37;
  208. uint64_t reserved_0_2:3;
  209. #else
  210. uint64_t reserved_0_2:3;
  211. uint64_t ibase:37;
  212. uint64_t isize:20;
  213. uint64_t reserved_60_63:4;
  214. #endif
  215. } s;
  216. struct cvmx_mixx_iring1_cn52xx {
  217. #ifdef __BIG_ENDIAN_BITFIELD
  218. uint64_t reserved_60_63:4;
  219. uint64_t isize:20;
  220. uint64_t reserved_36_39:4;
  221. uint64_t ibase:33;
  222. uint64_t reserved_0_2:3;
  223. #else
  224. uint64_t reserved_0_2:3;
  225. uint64_t ibase:33;
  226. uint64_t reserved_36_39:4;
  227. uint64_t isize:20;
  228. uint64_t reserved_60_63:4;
  229. #endif
  230. } cn52xx;
  231. };
  232. union cvmx_mixx_iring2 {
  233. uint64_t u64;
  234. struct cvmx_mixx_iring2_s {
  235. #ifdef __BIG_ENDIAN_BITFIELD
  236. uint64_t reserved_52_63:12;
  237. uint64_t itlptr:20;
  238. uint64_t reserved_20_31:12;
  239. uint64_t idbell:20;
  240. #else
  241. uint64_t idbell:20;
  242. uint64_t reserved_20_31:12;
  243. uint64_t itlptr:20;
  244. uint64_t reserved_52_63:12;
  245. #endif
  246. } s;
  247. };
  248. union cvmx_mixx_isr {
  249. uint64_t u64;
  250. struct cvmx_mixx_isr_s {
  251. #ifdef __BIG_ENDIAN_BITFIELD
  252. uint64_t reserved_8_63:56;
  253. uint64_t ts:1;
  254. uint64_t orun:1;
  255. uint64_t irun:1;
  256. uint64_t data_drp:1;
  257. uint64_t irthresh:1;
  258. uint64_t orthresh:1;
  259. uint64_t idblovf:1;
  260. uint64_t odblovf:1;
  261. #else
  262. uint64_t odblovf:1;
  263. uint64_t idblovf:1;
  264. uint64_t orthresh:1;
  265. uint64_t irthresh:1;
  266. uint64_t data_drp:1;
  267. uint64_t irun:1;
  268. uint64_t orun:1;
  269. uint64_t ts:1;
  270. uint64_t reserved_8_63:56;
  271. #endif
  272. } s;
  273. struct cvmx_mixx_isr_cn52xx {
  274. #ifdef __BIG_ENDIAN_BITFIELD
  275. uint64_t reserved_7_63:57;
  276. uint64_t orun:1;
  277. uint64_t irun:1;
  278. uint64_t data_drp:1;
  279. uint64_t irthresh:1;
  280. uint64_t orthresh:1;
  281. uint64_t idblovf:1;
  282. uint64_t odblovf:1;
  283. #else
  284. uint64_t odblovf:1;
  285. uint64_t idblovf:1;
  286. uint64_t orthresh:1;
  287. uint64_t irthresh:1;
  288. uint64_t data_drp:1;
  289. uint64_t irun:1;
  290. uint64_t orun:1;
  291. uint64_t reserved_7_63:57;
  292. #endif
  293. } cn52xx;
  294. };
  295. union cvmx_mixx_orcnt {
  296. uint64_t u64;
  297. struct cvmx_mixx_orcnt_s {
  298. #ifdef __BIG_ENDIAN_BITFIELD
  299. uint64_t reserved_20_63:44;
  300. uint64_t orcnt:20;
  301. #else
  302. uint64_t orcnt:20;
  303. uint64_t reserved_20_63:44;
  304. #endif
  305. } s;
  306. };
  307. union cvmx_mixx_orhwm {
  308. uint64_t u64;
  309. struct cvmx_mixx_orhwm_s {
  310. #ifdef __BIG_ENDIAN_BITFIELD
  311. uint64_t reserved_20_63:44;
  312. uint64_t orhwm:20;
  313. #else
  314. uint64_t orhwm:20;
  315. uint64_t reserved_20_63:44;
  316. #endif
  317. } s;
  318. };
  319. union cvmx_mixx_oring1 {
  320. uint64_t u64;
  321. struct cvmx_mixx_oring1_s {
  322. #ifdef __BIG_ENDIAN_BITFIELD
  323. uint64_t reserved_60_63:4;
  324. uint64_t osize:20;
  325. uint64_t obase:37;
  326. uint64_t reserved_0_2:3;
  327. #else
  328. uint64_t reserved_0_2:3;
  329. uint64_t obase:37;
  330. uint64_t osize:20;
  331. uint64_t reserved_60_63:4;
  332. #endif
  333. } s;
  334. struct cvmx_mixx_oring1_cn52xx {
  335. #ifdef __BIG_ENDIAN_BITFIELD
  336. uint64_t reserved_60_63:4;
  337. uint64_t osize:20;
  338. uint64_t reserved_36_39:4;
  339. uint64_t obase:33;
  340. uint64_t reserved_0_2:3;
  341. #else
  342. uint64_t reserved_0_2:3;
  343. uint64_t obase:33;
  344. uint64_t reserved_36_39:4;
  345. uint64_t osize:20;
  346. uint64_t reserved_60_63:4;
  347. #endif
  348. } cn52xx;
  349. };
  350. union cvmx_mixx_oring2 {
  351. uint64_t u64;
  352. struct cvmx_mixx_oring2_s {
  353. #ifdef __BIG_ENDIAN_BITFIELD
  354. uint64_t reserved_52_63:12;
  355. uint64_t otlptr:20;
  356. uint64_t reserved_20_31:12;
  357. uint64_t odbell:20;
  358. #else
  359. uint64_t odbell:20;
  360. uint64_t reserved_20_31:12;
  361. uint64_t otlptr:20;
  362. uint64_t reserved_52_63:12;
  363. #endif
  364. } s;
  365. };
  366. union cvmx_mixx_remcnt {
  367. uint64_t u64;
  368. struct cvmx_mixx_remcnt_s {
  369. #ifdef __BIG_ENDIAN_BITFIELD
  370. uint64_t reserved_52_63:12;
  371. uint64_t iremcnt:20;
  372. uint64_t reserved_20_31:12;
  373. uint64_t oremcnt:20;
  374. #else
  375. uint64_t oremcnt:20;
  376. uint64_t reserved_20_31:12;
  377. uint64_t iremcnt:20;
  378. uint64_t reserved_52_63:12;
  379. #endif
  380. } s;
  381. };
  382. union cvmx_mixx_tsctl {
  383. uint64_t u64;
  384. struct cvmx_mixx_tsctl_s {
  385. #ifdef __BIG_ENDIAN_BITFIELD
  386. uint64_t reserved_21_63:43;
  387. uint64_t tsavl:5;
  388. uint64_t reserved_13_15:3;
  389. uint64_t tstot:5;
  390. uint64_t reserved_5_7:3;
  391. uint64_t tscnt:5;
  392. #else
  393. uint64_t tscnt:5;
  394. uint64_t reserved_5_7:3;
  395. uint64_t tstot:5;
  396. uint64_t reserved_13_15:3;
  397. uint64_t tsavl:5;
  398. uint64_t reserved_21_63:43;
  399. #endif
  400. } s;
  401. };
  402. union cvmx_mixx_tstamp {
  403. uint64_t u64;
  404. struct cvmx_mixx_tstamp_s {
  405. #ifdef __BIG_ENDIAN_BITFIELD
  406. uint64_t tstamp:64;
  407. #else
  408. uint64_t tstamp:64;
  409. #endif
  410. } s;
  411. };
  412. #endif