cvmx-rst-defs.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. /***********************license start***************
  2. * Author: Cavium Inc.
  3. *
  4. * Contact: [email protected]
  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. };
  81. union cvmx_rst_cfg {
  82. uint64_t u64;
  83. struct cvmx_rst_cfg_s {
  84. #ifdef __BIG_ENDIAN_BITFIELD
  85. uint64_t bist_delay:58;
  86. uint64_t reserved_3_5:3;
  87. uint64_t cntl_clr_bist:1;
  88. uint64_t warm_clr_bist:1;
  89. uint64_t soft_clr_bist:1;
  90. #else
  91. uint64_t soft_clr_bist:1;
  92. uint64_t warm_clr_bist:1;
  93. uint64_t cntl_clr_bist:1;
  94. uint64_t reserved_3_5:3;
  95. uint64_t bist_delay:58;
  96. #endif
  97. } s;
  98. };
  99. union cvmx_rst_ckill {
  100. uint64_t u64;
  101. struct cvmx_rst_ckill_s {
  102. #ifdef __BIG_ENDIAN_BITFIELD
  103. uint64_t reserved_47_63:17;
  104. uint64_t timer:47;
  105. #else
  106. uint64_t timer:47;
  107. uint64_t reserved_47_63:17;
  108. #endif
  109. } s;
  110. };
  111. union cvmx_rst_ctlx {
  112. uint64_t u64;
  113. struct cvmx_rst_ctlx_s {
  114. #ifdef __BIG_ENDIAN_BITFIELD
  115. uint64_t reserved_10_63:54;
  116. uint64_t prst_link:1;
  117. uint64_t rst_done:1;
  118. uint64_t rst_link:1;
  119. uint64_t host_mode:1;
  120. uint64_t reserved_4_5:2;
  121. uint64_t rst_drv:1;
  122. uint64_t rst_rcv:1;
  123. uint64_t rst_chip:1;
  124. uint64_t rst_val:1;
  125. #else
  126. uint64_t rst_val:1;
  127. uint64_t rst_chip:1;
  128. uint64_t rst_rcv:1;
  129. uint64_t rst_drv:1;
  130. uint64_t reserved_4_5:2;
  131. uint64_t host_mode:1;
  132. uint64_t rst_link:1;
  133. uint64_t rst_done:1;
  134. uint64_t prst_link:1;
  135. uint64_t reserved_10_63:54;
  136. #endif
  137. } s;
  138. };
  139. union cvmx_rst_delay {
  140. uint64_t u64;
  141. struct cvmx_rst_delay_s {
  142. #ifdef __BIG_ENDIAN_BITFIELD
  143. uint64_t reserved_32_63:32;
  144. uint64_t warm_rst_dly:16;
  145. uint64_t soft_rst_dly:16;
  146. #else
  147. uint64_t soft_rst_dly:16;
  148. uint64_t warm_rst_dly:16;
  149. uint64_t reserved_32_63:32;
  150. #endif
  151. } s;
  152. };
  153. union cvmx_rst_eco {
  154. uint64_t u64;
  155. struct cvmx_rst_eco_s {
  156. #ifdef __BIG_ENDIAN_BITFIELD
  157. uint64_t reserved_32_63:32;
  158. uint64_t eco_rw:32;
  159. #else
  160. uint64_t eco_rw:32;
  161. uint64_t reserved_32_63:32;
  162. #endif
  163. } s;
  164. };
  165. union cvmx_rst_int {
  166. uint64_t u64;
  167. struct cvmx_rst_int_s {
  168. #ifdef __BIG_ENDIAN_BITFIELD
  169. uint64_t reserved_12_63:52;
  170. uint64_t perst:4;
  171. uint64_t reserved_4_7:4;
  172. uint64_t rst_link:4;
  173. #else
  174. uint64_t rst_link:4;
  175. uint64_t reserved_4_7:4;
  176. uint64_t perst:4;
  177. uint64_t reserved_12_63:52;
  178. #endif
  179. } s;
  180. struct cvmx_rst_int_cn70xx {
  181. #ifdef __BIG_ENDIAN_BITFIELD
  182. uint64_t reserved_11_63:53;
  183. uint64_t perst:3;
  184. uint64_t reserved_3_7:5;
  185. uint64_t rst_link:3;
  186. #else
  187. uint64_t rst_link:3;
  188. uint64_t reserved_3_7:5;
  189. uint64_t perst:3;
  190. uint64_t reserved_11_63:53;
  191. #endif
  192. } cn70xx;
  193. };
  194. union cvmx_rst_ocx {
  195. uint64_t u64;
  196. struct cvmx_rst_ocx_s {
  197. #ifdef __BIG_ENDIAN_BITFIELD
  198. uint64_t reserved_3_63:61;
  199. uint64_t rst_link:3;
  200. #else
  201. uint64_t rst_link:3;
  202. uint64_t reserved_3_63:61;
  203. #endif
  204. } s;
  205. };
  206. union cvmx_rst_power_dbg {
  207. uint64_t u64;
  208. struct cvmx_rst_power_dbg_s {
  209. #ifdef __BIG_ENDIAN_BITFIELD
  210. uint64_t reserved_3_63:61;
  211. uint64_t str:3;
  212. #else
  213. uint64_t str:3;
  214. uint64_t reserved_3_63:61;
  215. #endif
  216. } s;
  217. };
  218. union cvmx_rst_pp_power {
  219. uint64_t u64;
  220. struct cvmx_rst_pp_power_s {
  221. #ifdef __BIG_ENDIAN_BITFIELD
  222. uint64_t reserved_48_63:16;
  223. uint64_t gate:48;
  224. #else
  225. uint64_t gate:48;
  226. uint64_t reserved_48_63:16;
  227. #endif
  228. } s;
  229. struct cvmx_rst_pp_power_cn70xx {
  230. #ifdef __BIG_ENDIAN_BITFIELD
  231. uint64_t reserved_4_63:60;
  232. uint64_t gate:4;
  233. #else
  234. uint64_t gate:4;
  235. uint64_t reserved_4_63:60;
  236. #endif
  237. } cn70xx;
  238. };
  239. union cvmx_rst_soft_prstx {
  240. uint64_t u64;
  241. struct cvmx_rst_soft_prstx_s {
  242. #ifdef __BIG_ENDIAN_BITFIELD
  243. uint64_t reserved_1_63:63;
  244. uint64_t soft_prst:1;
  245. #else
  246. uint64_t soft_prst:1;
  247. uint64_t reserved_1_63:63;
  248. #endif
  249. } s;
  250. };
  251. union cvmx_rst_soft_rst {
  252. uint64_t u64;
  253. struct cvmx_rst_soft_rst_s {
  254. #ifdef __BIG_ENDIAN_BITFIELD
  255. uint64_t reserved_1_63:63;
  256. uint64_t soft_rst:1;
  257. #else
  258. uint64_t soft_rst:1;
  259. uint64_t reserved_1_63:63;
  260. #endif
  261. } s;
  262. };
  263. #endif