cvmx-rst-defs.h 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. /***********************license start***************
  2. * Author: Cavium Inc.
  3. *
  4. * Contact: support@cavium.com
  5. * This file is part of the OCTEON SDK
  6. *
  7. * Copyright (c) 2003-2014 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 Inc. for more information
  26. ***********************license end**************************************/
  27. #ifndef __CVMX_RST_DEFS_H__
  28. #define __CVMX_RST_DEFS_H__
  29. #define CVMX_RST_BOOT (CVMX_ADD_IO_SEG(0x0001180006001600ull))
  30. #define CVMX_RST_CFG (CVMX_ADD_IO_SEG(0x0001180006001610ull))
  31. #define CVMX_RST_CKILL (CVMX_ADD_IO_SEG(0x0001180006001638ull))
  32. #define CVMX_RST_CTLX(offset) (CVMX_ADD_IO_SEG(0x0001180006001640ull) + ((offset) & 3) * 8)
  33. #define CVMX_RST_DELAY (CVMX_ADD_IO_SEG(0x0001180006001608ull))
  34. #define CVMX_RST_ECO (CVMX_ADD_IO_SEG(0x00011800060017B8ull))
  35. #define CVMX_RST_INT (CVMX_ADD_IO_SEG(0x0001180006001628ull))
  36. #define CVMX_RST_OCX (CVMX_ADD_IO_SEG(0x0001180006001618ull))
  37. #define CVMX_RST_POWER_DBG (CVMX_ADD_IO_SEG(0x0001180006001708ull))
  38. #define CVMX_RST_PP_POWER (CVMX_ADD_IO_SEG(0x0001180006001700ull))
  39. #define CVMX_RST_SOFT_PRSTX(offset) (CVMX_ADD_IO_SEG(0x00011800060016C0ull) + ((offset) & 3) * 8)
  40. #define CVMX_RST_SOFT_RST (CVMX_ADD_IO_SEG(0x0001180006001680ull))
  41. union cvmx_rst_boot {
  42. uint64_t u64;
  43. struct cvmx_rst_boot_s {
  44. #ifdef __BIG_ENDIAN_BITFIELD
  45. uint64_t chipkill:1;
  46. uint64_t jtcsrdis:1;
  47. uint64_t ejtagdis:1;
  48. uint64_t romen:1;
  49. uint64_t ckill_ppdis:1;
  50. uint64_t jt_tstmode:1;
  51. uint64_t vrm_err:1;
  52. uint64_t reserved_37_56:20;
  53. uint64_t c_mul:7;
  54. uint64_t pnr_mul:6;
  55. uint64_t reserved_21_23:3;
  56. uint64_t lboot_oci:3;
  57. uint64_t lboot_ext:6;
  58. uint64_t lboot:10;
  59. uint64_t rboot:1;
  60. uint64_t rboot_pin:1;
  61. #else
  62. uint64_t rboot_pin:1;
  63. uint64_t rboot:1;
  64. uint64_t lboot:10;
  65. uint64_t lboot_ext:6;
  66. uint64_t lboot_oci:3;
  67. uint64_t reserved_21_23:3;
  68. uint64_t pnr_mul:6;
  69. uint64_t c_mul:7;
  70. uint64_t reserved_37_56:20;
  71. uint64_t vrm_err:1;
  72. uint64_t jt_tstmode:1;
  73. uint64_t ckill_ppdis:1;
  74. uint64_t romen:1;
  75. uint64_t ejtagdis:1;
  76. uint64_t jtcsrdis:1;
  77. uint64_t chipkill:1;
  78. #endif
  79. } s;
  80. struct cvmx_rst_boot_s cn70xx;
  81. struct cvmx_rst_boot_s cn70xxp1;
  82. struct cvmx_rst_boot_s cn78xx;
  83. };
  84. union cvmx_rst_cfg {
  85. uint64_t u64;
  86. struct cvmx_rst_cfg_s {
  87. #ifdef __BIG_ENDIAN_BITFIELD
  88. uint64_t bist_delay:58;
  89. uint64_t reserved_3_5:3;
  90. uint64_t cntl_clr_bist:1;
  91. uint64_t warm_clr_bist:1;
  92. uint64_t soft_clr_bist:1;
  93. #else
  94. uint64_t soft_clr_bist:1;
  95. uint64_t warm_clr_bist:1;
  96. uint64_t cntl_clr_bist:1;
  97. uint64_t reserved_3_5:3;
  98. uint64_t bist_delay:58;
  99. #endif
  100. } s;
  101. struct cvmx_rst_cfg_s cn70xx;
  102. struct cvmx_rst_cfg_s cn70xxp1;
  103. struct cvmx_rst_cfg_s cn78xx;
  104. };
  105. union cvmx_rst_ckill {
  106. uint64_t u64;
  107. struct cvmx_rst_ckill_s {
  108. #ifdef __BIG_ENDIAN_BITFIELD
  109. uint64_t reserved_47_63:17;
  110. uint64_t timer:47;
  111. #else
  112. uint64_t timer:47;
  113. uint64_t reserved_47_63:17;
  114. #endif
  115. } s;
  116. struct cvmx_rst_ckill_s cn70xx;
  117. struct cvmx_rst_ckill_s cn70xxp1;
  118. struct cvmx_rst_ckill_s cn78xx;
  119. };
  120. union cvmx_rst_ctlx {
  121. uint64_t u64;
  122. struct cvmx_rst_ctlx_s {
  123. #ifdef __BIG_ENDIAN_BITFIELD
  124. uint64_t reserved_10_63:54;
  125. uint64_t prst_link:1;
  126. uint64_t rst_done:1;
  127. uint64_t rst_link:1;
  128. uint64_t host_mode:1;
  129. uint64_t reserved_4_5:2;
  130. uint64_t rst_drv:1;
  131. uint64_t rst_rcv:1;
  132. uint64_t rst_chip:1;
  133. uint64_t rst_val:1;
  134. #else
  135. uint64_t rst_val:1;
  136. uint64_t rst_chip:1;
  137. uint64_t rst_rcv:1;
  138. uint64_t rst_drv:1;
  139. uint64_t reserved_4_5:2;
  140. uint64_t host_mode:1;
  141. uint64_t rst_link:1;
  142. uint64_t rst_done:1;
  143. uint64_t prst_link:1;
  144. uint64_t reserved_10_63:54;
  145. #endif
  146. } s;
  147. struct cvmx_rst_ctlx_s cn70xx;
  148. struct cvmx_rst_ctlx_s cn70xxp1;
  149. struct cvmx_rst_ctlx_s cn78xx;
  150. };
  151. union cvmx_rst_delay {
  152. uint64_t u64;
  153. struct cvmx_rst_delay_s {
  154. #ifdef __BIG_ENDIAN_BITFIELD
  155. uint64_t reserved_32_63:32;
  156. uint64_t warm_rst_dly:16;
  157. uint64_t soft_rst_dly:16;
  158. #else
  159. uint64_t soft_rst_dly:16;
  160. uint64_t warm_rst_dly:16;
  161. uint64_t reserved_32_63:32;
  162. #endif
  163. } s;
  164. struct cvmx_rst_delay_s cn70xx;
  165. struct cvmx_rst_delay_s cn70xxp1;
  166. struct cvmx_rst_delay_s cn78xx;
  167. };
  168. union cvmx_rst_eco {
  169. uint64_t u64;
  170. struct cvmx_rst_eco_s {
  171. #ifdef __BIG_ENDIAN_BITFIELD
  172. uint64_t reserved_32_63:32;
  173. uint64_t eco_rw:32;
  174. #else
  175. uint64_t eco_rw:32;
  176. uint64_t reserved_32_63:32;
  177. #endif
  178. } s;
  179. struct cvmx_rst_eco_s cn78xx;
  180. };
  181. union cvmx_rst_int {
  182. uint64_t u64;
  183. struct cvmx_rst_int_s {
  184. #ifdef __BIG_ENDIAN_BITFIELD
  185. uint64_t reserved_12_63:52;
  186. uint64_t perst:4;
  187. uint64_t reserved_4_7:4;
  188. uint64_t rst_link:4;
  189. #else
  190. uint64_t rst_link:4;
  191. uint64_t reserved_4_7:4;
  192. uint64_t perst:4;
  193. uint64_t reserved_12_63:52;
  194. #endif
  195. } s;
  196. struct cvmx_rst_int_cn70xx {
  197. #ifdef __BIG_ENDIAN_BITFIELD
  198. uint64_t reserved_11_63:53;
  199. uint64_t perst:3;
  200. uint64_t reserved_3_7:5;
  201. uint64_t rst_link:3;
  202. #else
  203. uint64_t rst_link:3;
  204. uint64_t reserved_3_7:5;
  205. uint64_t perst:3;
  206. uint64_t reserved_11_63:53;
  207. #endif
  208. } cn70xx;
  209. struct cvmx_rst_int_cn70xx cn70xxp1;
  210. struct cvmx_rst_int_s cn78xx;
  211. };
  212. union cvmx_rst_ocx {
  213. uint64_t u64;
  214. struct cvmx_rst_ocx_s {
  215. #ifdef __BIG_ENDIAN_BITFIELD
  216. uint64_t reserved_3_63:61;
  217. uint64_t rst_link:3;
  218. #else
  219. uint64_t rst_link:3;
  220. uint64_t reserved_3_63:61;
  221. #endif
  222. } s;
  223. struct cvmx_rst_ocx_s cn78xx;
  224. };
  225. union cvmx_rst_power_dbg {
  226. uint64_t u64;
  227. struct cvmx_rst_power_dbg_s {
  228. #ifdef __BIG_ENDIAN_BITFIELD
  229. uint64_t reserved_3_63:61;
  230. uint64_t str:3;
  231. #else
  232. uint64_t str:3;
  233. uint64_t reserved_3_63:61;
  234. #endif
  235. } s;
  236. struct cvmx_rst_power_dbg_s cn78xx;
  237. };
  238. union cvmx_rst_pp_power {
  239. uint64_t u64;
  240. struct cvmx_rst_pp_power_s {
  241. #ifdef __BIG_ENDIAN_BITFIELD
  242. uint64_t reserved_48_63:16;
  243. uint64_t gate:48;
  244. #else
  245. uint64_t gate:48;
  246. uint64_t reserved_48_63:16;
  247. #endif
  248. } s;
  249. struct cvmx_rst_pp_power_cn70xx {
  250. #ifdef __BIG_ENDIAN_BITFIELD
  251. uint64_t reserved_4_63:60;
  252. uint64_t gate:4;
  253. #else
  254. uint64_t gate:4;
  255. uint64_t reserved_4_63:60;
  256. #endif
  257. } cn70xx;
  258. struct cvmx_rst_pp_power_cn70xx cn70xxp1;
  259. struct cvmx_rst_pp_power_s cn78xx;
  260. };
  261. union cvmx_rst_soft_prstx {
  262. uint64_t u64;
  263. struct cvmx_rst_soft_prstx_s {
  264. #ifdef __BIG_ENDIAN_BITFIELD
  265. uint64_t reserved_1_63:63;
  266. uint64_t soft_prst:1;
  267. #else
  268. uint64_t soft_prst:1;
  269. uint64_t reserved_1_63:63;
  270. #endif
  271. } s;
  272. struct cvmx_rst_soft_prstx_s cn70xx;
  273. struct cvmx_rst_soft_prstx_s cn70xxp1;
  274. struct cvmx_rst_soft_prstx_s cn78xx;
  275. };
  276. union cvmx_rst_soft_rst {
  277. uint64_t u64;
  278. struct cvmx_rst_soft_rst_s {
  279. #ifdef __BIG_ENDIAN_BITFIELD
  280. uint64_t reserved_1_63:63;
  281. uint64_t soft_rst:1;
  282. #else
  283. uint64_t soft_rst:1;
  284. uint64_t reserved_1_63:63;
  285. #endif
  286. } s;
  287. struct cvmx_rst_soft_rst_s cn70xx;
  288. struct cvmx_rst_soft_rst_s cn70xxp1;
  289. struct cvmx_rst_soft_rst_s cn78xx;
  290. };
  291. #endif