cvmx-ciu3-defs.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. /*
  2. * Copyright (c) 2003-2016 Cavium Inc.
  3. *
  4. * This file is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License, Version 2, as
  6. * published by the Free Software Foundation.
  7. *
  8. * This file is distributed in the hope that it will be useful, but
  9. * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
  10. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
  11. * NONINFRINGEMENT. See the GNU General Public License for more
  12. * details.
  13. *
  14. */
  15. #ifndef __CVMX_CIU3_DEFS_H__
  16. #define __CVMX_CIU3_DEFS_H__
  17. #define CVMX_CIU3_FUSE CVMX_ADD_IO_SEG(0x00010100000001A0ull)
  18. #define CVMX_CIU3_BIST CVMX_ADD_IO_SEG(0x00010100000001C0ull)
  19. #define CVMX_CIU3_CONST CVMX_ADD_IO_SEG(0x0001010000000220ull)
  20. #define CVMX_CIU3_CTL CVMX_ADD_IO_SEG(0x00010100000000E0ull)
  21. #define CVMX_CIU3_DESTX_IO_INT(offset) (CVMX_ADD_IO_SEG(0x0001010000210000ull) + ((offset) & 7) * 8)
  22. #define CVMX_CIU3_DESTX_PP_INT(offset) (CVMX_ADD_IO_SEG(0x0001010000200000ull) + ((offset) & 255) * 8)
  23. #define CVMX_CIU3_GSTOP CVMX_ADD_IO_SEG(0x0001010000000140ull)
  24. #define CVMX_CIU3_IDTX_CTL(offset) (CVMX_ADD_IO_SEG(0x0001010000110000ull) + ((offset) & 255) * 8)
  25. #define CVMX_CIU3_IDTX_IO(offset) (CVMX_ADD_IO_SEG(0x0001010000130000ull) + ((offset) & 255) * 8)
  26. #define CVMX_CIU3_IDTX_PPX(offset, block_id) (CVMX_ADD_IO_SEG(0x0001010000120000ull) + ((block_id) & 255) * 0x20ull)
  27. #define CVMX_CIU3_INTR_RAM_ECC_CTL CVMX_ADD_IO_SEG(0x0001010000000260ull)
  28. #define CVMX_CIU3_INTR_RAM_ECC_ST CVMX_ADD_IO_SEG(0x0001010000000280ull)
  29. #define CVMX_CIU3_INTR_READY CVMX_ADD_IO_SEG(0x00010100000002A0ull)
  30. #define CVMX_CIU3_INTR_SLOWDOWN CVMX_ADD_IO_SEG(0x0001010000000240ull)
  31. #define CVMX_CIU3_ISCX_CTL(offset) (CVMX_ADD_IO_SEG(0x0001010080000000ull) + ((offset) & 1048575) * 8)
  32. #define CVMX_CIU3_ISCX_W1C(offset) (CVMX_ADD_IO_SEG(0x0001010090000000ull) + ((offset) & 1048575) * 8)
  33. #define CVMX_CIU3_ISCX_W1S(offset) (CVMX_ADD_IO_SEG(0x00010100A0000000ull) + ((offset) & 1048575) * 8)
  34. #define CVMX_CIU3_NMI CVMX_ADD_IO_SEG(0x0001010000000160ull)
  35. #define CVMX_CIU3_SISCX(offset) (CVMX_ADD_IO_SEG(0x0001010000220000ull) + ((offset) & 255) * 8)
  36. #define CVMX_CIU3_TIMX(offset) (CVMX_ADD_IO_SEG(0x0001010000010000ull) + ((offset) & 15) * 8)
  37. union cvmx_ciu3_bist {
  38. uint64_t u64;
  39. struct cvmx_ciu3_bist_s {
  40. #ifdef __BIG_ENDIAN_BITFIELD
  41. uint64_t reserved_9_63 : 55;
  42. uint64_t bist : 9;
  43. #else
  44. uint64_t bist : 9;
  45. uint64_t reserved_9_63 : 55;
  46. #endif
  47. } s;
  48. };
  49. union cvmx_ciu3_const {
  50. uint64_t u64;
  51. struct cvmx_ciu3_const_s {
  52. #ifdef __BIG_ENDIAN_BITFIELD
  53. uint64_t dests_io : 16;
  54. uint64_t pintsn : 16;
  55. uint64_t dests_pp : 16;
  56. uint64_t idt : 16;
  57. #else
  58. uint64_t idt : 16;
  59. uint64_t dests_pp : 16;
  60. uint64_t pintsn : 16;
  61. uint64_t dests_io : 16;
  62. #endif
  63. } s;
  64. };
  65. union cvmx_ciu3_ctl {
  66. uint64_t u64;
  67. struct cvmx_ciu3_ctl_s {
  68. #ifdef __BIG_ENDIAN_BITFIELD
  69. uint64_t reserved_5_63 : 59;
  70. uint64_t mcd_sel : 2;
  71. uint64_t iscmem_le : 1;
  72. uint64_t seq_dis : 1;
  73. uint64_t cclk_dis : 1;
  74. #else
  75. uint64_t cclk_dis : 1;
  76. uint64_t seq_dis : 1;
  77. uint64_t iscmem_le : 1;
  78. uint64_t mcd_sel : 2;
  79. uint64_t reserved_5_63 : 59;
  80. #endif
  81. } s;
  82. };
  83. union cvmx_ciu3_destx_io_int {
  84. uint64_t u64;
  85. struct cvmx_ciu3_destx_io_int_s {
  86. #ifdef __BIG_ENDIAN_BITFIELD
  87. uint64_t reserved_52_63 : 12;
  88. uint64_t intsn : 20;
  89. uint64_t reserved_10_31 : 22;
  90. uint64_t intidt : 8;
  91. uint64_t newint : 1;
  92. uint64_t intr : 1;
  93. #else
  94. uint64_t intr : 1;
  95. uint64_t newint : 1;
  96. uint64_t intidt : 8;
  97. uint64_t reserved_10_31 : 22;
  98. uint64_t intsn : 20;
  99. uint64_t reserved_52_63 : 12;
  100. #endif
  101. } s;
  102. };
  103. union cvmx_ciu3_destx_pp_int {
  104. uint64_t u64;
  105. struct cvmx_ciu3_destx_pp_int_s {
  106. #ifdef __BIG_ENDIAN_BITFIELD
  107. uint64_t reserved_52_63 : 12;
  108. uint64_t intsn : 20;
  109. uint64_t reserved_10_31 : 22;
  110. uint64_t intidt : 8;
  111. uint64_t newint : 1;
  112. uint64_t intr : 1;
  113. #else
  114. uint64_t intr : 1;
  115. uint64_t newint : 1;
  116. uint64_t intidt : 8;
  117. uint64_t reserved_10_31 : 22;
  118. uint64_t intsn : 20;
  119. uint64_t reserved_52_63 : 12;
  120. #endif
  121. } s;
  122. };
  123. union cvmx_ciu3_gstop {
  124. uint64_t u64;
  125. struct cvmx_ciu3_gstop_s {
  126. #ifdef __BIG_ENDIAN_BITFIELD
  127. uint64_t reserved_1_63 : 63;
  128. uint64_t gstop : 1;
  129. #else
  130. uint64_t gstop : 1;
  131. uint64_t reserved_1_63 : 63;
  132. #endif
  133. } s;
  134. };
  135. union cvmx_ciu3_idtx_ctl {
  136. uint64_t u64;
  137. struct cvmx_ciu3_idtx_ctl_s {
  138. #ifdef __BIG_ENDIAN_BITFIELD
  139. uint64_t reserved_52_63 : 12;
  140. uint64_t intsn : 20;
  141. uint64_t reserved_4_31 : 28;
  142. uint64_t intr : 1;
  143. uint64_t newint : 1;
  144. uint64_t ip_num : 2;
  145. #else
  146. uint64_t ip_num : 2;
  147. uint64_t newint : 1;
  148. uint64_t intr : 1;
  149. uint64_t reserved_4_31 : 28;
  150. uint64_t intsn : 20;
  151. uint64_t reserved_52_63 : 12;
  152. #endif
  153. } s;
  154. };
  155. union cvmx_ciu3_idtx_io {
  156. uint64_t u64;
  157. struct cvmx_ciu3_idtx_io_s {
  158. #ifdef __BIG_ENDIAN_BITFIELD
  159. uint64_t reserved_5_63 : 59;
  160. uint64_t io : 5;
  161. #else
  162. uint64_t io : 5;
  163. uint64_t reserved_5_63 : 59;
  164. #endif
  165. } s;
  166. };
  167. union cvmx_ciu3_idtx_ppx {
  168. uint64_t u64;
  169. struct cvmx_ciu3_idtx_ppx_s {
  170. #ifdef __BIG_ENDIAN_BITFIELD
  171. uint64_t reserved_48_63 : 16;
  172. uint64_t pp : 48;
  173. #else
  174. uint64_t pp : 48;
  175. uint64_t reserved_48_63 : 16;
  176. #endif
  177. } s;
  178. };
  179. union cvmx_ciu3_intr_ram_ecc_ctl {
  180. uint64_t u64;
  181. struct cvmx_ciu3_intr_ram_ecc_ctl_s {
  182. #ifdef __BIG_ENDIAN_BITFIELD
  183. uint64_t reserved_3_63 : 61;
  184. uint64_t flip_synd : 2;
  185. uint64_t ecc_ena : 1;
  186. #else
  187. uint64_t ecc_ena : 1;
  188. uint64_t flip_synd : 2;
  189. uint64_t reserved_3_63 : 61;
  190. #endif
  191. } s;
  192. };
  193. union cvmx_ciu3_intr_ram_ecc_st {
  194. uint64_t u64;
  195. struct cvmx_ciu3_intr_ram_ecc_st_s {
  196. #ifdef __BIG_ENDIAN_BITFIELD
  197. uint64_t reserved_52_63 : 12;
  198. uint64_t addr : 20;
  199. uint64_t reserved_6_31 : 26;
  200. uint64_t sisc_dbe : 1;
  201. uint64_t sisc_sbe : 1;
  202. uint64_t idt_dbe : 1;
  203. uint64_t idt_sbe : 1;
  204. uint64_t isc_dbe : 1;
  205. uint64_t isc_sbe : 1;
  206. #else
  207. uint64_t isc_sbe : 1;
  208. uint64_t isc_dbe : 1;
  209. uint64_t idt_sbe : 1;
  210. uint64_t idt_dbe : 1;
  211. uint64_t sisc_sbe : 1;
  212. uint64_t sisc_dbe : 1;
  213. uint64_t reserved_6_31 : 26;
  214. uint64_t addr : 20;
  215. uint64_t reserved_52_63 : 12;
  216. #endif
  217. } s;
  218. };
  219. union cvmx_ciu3_intr_ready {
  220. uint64_t u64;
  221. struct cvmx_ciu3_intr_ready_s {
  222. #ifdef __BIG_ENDIAN_BITFIELD
  223. uint64_t reserved_46_63 : 18;
  224. uint64_t index : 14;
  225. uint64_t reserved_1_31 : 31;
  226. uint64_t ready : 1;
  227. #else
  228. uint64_t ready : 1;
  229. uint64_t reserved_1_31 : 31;
  230. uint64_t index : 14;
  231. uint64_t reserved_46_63 : 18;
  232. #endif
  233. } s;
  234. };
  235. union cvmx_ciu3_intr_slowdown {
  236. uint64_t u64;
  237. struct cvmx_ciu3_intr_slowdown_s {
  238. #ifdef __BIG_ENDIAN_BITFIELD
  239. uint64_t reserved_3_63 : 61;
  240. uint64_t ctl : 3;
  241. #else
  242. uint64_t ctl : 3;
  243. uint64_t reserved_3_63 : 61;
  244. #endif
  245. } s;
  246. };
  247. union cvmx_ciu3_iscx_ctl {
  248. uint64_t u64;
  249. struct cvmx_ciu3_iscx_ctl_s {
  250. #ifdef __BIG_ENDIAN_BITFIELD
  251. uint64_t reserved_24_63 : 40;
  252. uint64_t idt : 8;
  253. uint64_t imp : 1;
  254. uint64_t reserved_2_14 : 13;
  255. uint64_t en : 1;
  256. uint64_t raw : 1;
  257. #else
  258. uint64_t raw : 1;
  259. uint64_t en : 1;
  260. uint64_t reserved_2_14 : 13;
  261. uint64_t imp : 1;
  262. uint64_t idt : 8;
  263. uint64_t reserved_24_63 : 40;
  264. #endif
  265. } s;
  266. };
  267. union cvmx_ciu3_iscx_w1c {
  268. uint64_t u64;
  269. struct cvmx_ciu3_iscx_w1c_s {
  270. #ifdef __BIG_ENDIAN_BITFIELD
  271. uint64_t reserved_2_63 : 62;
  272. uint64_t en : 1;
  273. uint64_t raw : 1;
  274. #else
  275. uint64_t raw : 1;
  276. uint64_t en : 1;
  277. uint64_t reserved_2_63 : 62;
  278. #endif
  279. } s;
  280. };
  281. union cvmx_ciu3_iscx_w1s {
  282. uint64_t u64;
  283. struct cvmx_ciu3_iscx_w1s_s {
  284. #ifdef __BIG_ENDIAN_BITFIELD
  285. uint64_t reserved_2_63 : 62;
  286. uint64_t en : 1;
  287. uint64_t raw : 1;
  288. #else
  289. uint64_t raw : 1;
  290. uint64_t en : 1;
  291. uint64_t reserved_2_63 : 62;
  292. #endif
  293. } s;
  294. };
  295. union cvmx_ciu3_nmi {
  296. uint64_t u64;
  297. struct cvmx_ciu3_nmi_s {
  298. #ifdef __BIG_ENDIAN_BITFIELD
  299. uint64_t reserved_48_63 : 16;
  300. uint64_t nmi : 48;
  301. #else
  302. uint64_t nmi : 48;
  303. uint64_t reserved_48_63 : 16;
  304. #endif
  305. } s;
  306. };
  307. union cvmx_ciu3_siscx {
  308. uint64_t u64;
  309. struct cvmx_ciu3_siscx_s {
  310. #ifdef __BIG_ENDIAN_BITFIELD
  311. uint64_t en : 64;
  312. #else
  313. uint64_t en : 64;
  314. #endif
  315. } s;
  316. };
  317. union cvmx_ciu3_timx {
  318. uint64_t u64;
  319. struct cvmx_ciu3_timx_s {
  320. #ifdef __BIG_ENDIAN_BITFIELD
  321. uint64_t reserved_37_63 : 27;
  322. uint64_t one_shot : 1;
  323. uint64_t len : 36;
  324. #else
  325. uint64_t len : 36;
  326. uint64_t one_shot : 1;
  327. uint64_t reserved_37_63 : 27;
  328. #endif
  329. } s;
  330. };
  331. #endif