cvmx-pcsx-defs.h 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010
  1. /***********************license start***************
  2. * Author: Cavium Networks
  3. *
  4. * Contact: support@caviumnetworks.com
  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_PCSX_DEFS_H__
  28. #define __CVMX_PCSX_DEFS_H__
  29. static inline uint64_t CVMX_PCSX_ANX_ADV_REG(unsigned long offset, unsigned long block_id)
  30. {
  31. switch (cvmx_get_octeon_family()) {
  32. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  33. return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  34. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  35. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  36. return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  37. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  38. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  39. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  40. return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  41. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  42. return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  43. }
  44. return CVMX_ADD_IO_SEG(0x00011800B0001010ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  45. }
  46. static inline uint64_t CVMX_PCSX_ANX_EXT_ST_REG(unsigned long offset, unsigned long block_id)
  47. {
  48. switch (cvmx_get_octeon_family()) {
  49. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  50. return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  51. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  52. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  53. return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  54. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  55. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  56. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  57. return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  58. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  59. return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  60. }
  61. return CVMX_ADD_IO_SEG(0x00011800B0001028ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  62. }
  63. static inline uint64_t CVMX_PCSX_ANX_LP_ABIL_REG(unsigned long offset, unsigned long block_id)
  64. {
  65. switch (cvmx_get_octeon_family()) {
  66. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  67. return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  68. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  69. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  70. return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  71. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  72. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  73. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  74. return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  75. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  76. return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  77. }
  78. return CVMX_ADD_IO_SEG(0x00011800B0001018ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  79. }
  80. static inline uint64_t CVMX_PCSX_ANX_RESULTS_REG(unsigned long offset, unsigned long block_id)
  81. {
  82. switch (cvmx_get_octeon_family()) {
  83. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  84. return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  85. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  86. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  87. return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  88. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  89. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  90. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  91. return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  92. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  93. return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  94. }
  95. return CVMX_ADD_IO_SEG(0x00011800B0001020ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  96. }
  97. static inline uint64_t CVMX_PCSX_INTX_EN_REG(unsigned long offset, unsigned long block_id)
  98. {
  99. switch (cvmx_get_octeon_family()) {
  100. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  101. return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  102. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  103. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  104. return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  105. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  106. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  107. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  108. return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  109. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  110. return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  111. }
  112. return CVMX_ADD_IO_SEG(0x00011800B0001088ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  113. }
  114. static inline uint64_t CVMX_PCSX_INTX_REG(unsigned long offset, unsigned long block_id)
  115. {
  116. switch (cvmx_get_octeon_family()) {
  117. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  118. return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  119. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  120. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  121. return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  122. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  123. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  124. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  125. return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  126. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  127. return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  128. }
  129. return CVMX_ADD_IO_SEG(0x00011800B0001080ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  130. }
  131. static inline uint64_t CVMX_PCSX_LINKX_TIMER_COUNT_REG(unsigned long offset, unsigned long block_id)
  132. {
  133. switch (cvmx_get_octeon_family()) {
  134. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  135. return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  136. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  137. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  138. return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  139. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  140. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  141. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  142. return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  143. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  144. return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  145. }
  146. return CVMX_ADD_IO_SEG(0x00011800B0001040ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  147. }
  148. static inline uint64_t CVMX_PCSX_LOG_ANLX_REG(unsigned long offset, unsigned long block_id)
  149. {
  150. switch (cvmx_get_octeon_family()) {
  151. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  152. return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  153. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  154. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  155. return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  156. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  157. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  158. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  159. return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  160. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  161. return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  162. }
  163. return CVMX_ADD_IO_SEG(0x00011800B0001090ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  164. }
  165. static inline uint64_t CVMX_PCSX_MISCX_CTL_REG(unsigned long offset, unsigned long block_id)
  166. {
  167. switch (cvmx_get_octeon_family()) {
  168. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  169. return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  170. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  171. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  172. return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  173. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  174. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  175. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  176. return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  177. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  178. return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  179. }
  180. return CVMX_ADD_IO_SEG(0x00011800B0001078ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  181. }
  182. static inline uint64_t CVMX_PCSX_MRX_CONTROL_REG(unsigned long offset, unsigned long block_id)
  183. {
  184. switch (cvmx_get_octeon_family()) {
  185. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  186. return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  187. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  188. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  189. return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  190. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  191. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  192. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  193. return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  194. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  195. return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  196. }
  197. return CVMX_ADD_IO_SEG(0x00011800B0001000ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  198. }
  199. static inline uint64_t CVMX_PCSX_MRX_STATUS_REG(unsigned long offset, unsigned long block_id)
  200. {
  201. switch (cvmx_get_octeon_family()) {
  202. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  203. return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  204. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  205. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  206. return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  207. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  208. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  209. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  210. return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  211. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  212. return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  213. }
  214. return CVMX_ADD_IO_SEG(0x00011800B0001008ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  215. }
  216. static inline uint64_t CVMX_PCSX_RXX_STATES_REG(unsigned long offset, unsigned long block_id)
  217. {
  218. switch (cvmx_get_octeon_family()) {
  219. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  220. return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  221. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  222. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  223. return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  224. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  225. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  226. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  227. return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  228. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  229. return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  230. }
  231. return CVMX_ADD_IO_SEG(0x00011800B0001058ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  232. }
  233. static inline uint64_t CVMX_PCSX_RXX_SYNC_REG(unsigned long offset, unsigned long block_id)
  234. {
  235. switch (cvmx_get_octeon_family()) {
  236. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  237. return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  238. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  239. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  240. return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  241. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  242. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  243. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  244. return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  245. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  246. return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  247. }
  248. return CVMX_ADD_IO_SEG(0x00011800B0001050ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  249. }
  250. static inline uint64_t CVMX_PCSX_SGMX_AN_ADV_REG(unsigned long offset, unsigned long block_id)
  251. {
  252. switch (cvmx_get_octeon_family()) {
  253. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  254. return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  255. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  256. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  257. return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  258. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  259. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  260. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  261. return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  262. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  263. return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  264. }
  265. return CVMX_ADD_IO_SEG(0x00011800B0001068ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  266. }
  267. static inline uint64_t CVMX_PCSX_SGMX_LP_ADV_REG(unsigned long offset, unsigned long block_id)
  268. {
  269. switch (cvmx_get_octeon_family()) {
  270. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  271. return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  272. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  273. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  274. return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  275. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  276. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  277. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  278. return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  279. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  280. return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  281. }
  282. return CVMX_ADD_IO_SEG(0x00011800B0001070ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  283. }
  284. static inline uint64_t CVMX_PCSX_TXX_STATES_REG(unsigned long offset, unsigned long block_id)
  285. {
  286. switch (cvmx_get_octeon_family()) {
  287. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  288. return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  289. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  290. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  291. return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  292. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  293. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  294. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  295. return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  296. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  297. return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  298. }
  299. return CVMX_ADD_IO_SEG(0x00011800B0001060ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  300. }
  301. static inline uint64_t CVMX_PCSX_TX_RXX_POLARITY_REG(unsigned long offset, unsigned long block_id)
  302. {
  303. switch (cvmx_get_octeon_family()) {
  304. case OCTEON_CNF71XX & OCTEON_FAMILY_MASK:
  305. return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  306. case OCTEON_CN63XX & OCTEON_FAMILY_MASK:
  307. case OCTEON_CN52XX & OCTEON_FAMILY_MASK:
  308. return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  309. case OCTEON_CN56XX & OCTEON_FAMILY_MASK:
  310. case OCTEON_CN66XX & OCTEON_FAMILY_MASK:
  311. case OCTEON_CN61XX & OCTEON_FAMILY_MASK:
  312. return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  313. case OCTEON_CN68XX & OCTEON_FAMILY_MASK:
  314. return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x4000ull) * 1024;
  315. }
  316. return CVMX_ADD_IO_SEG(0x00011800B0001048ull) + ((offset) + (block_id) * 0x20000ull) * 1024;
  317. }
  318. union cvmx_pcsx_anx_adv_reg {
  319. uint64_t u64;
  320. struct cvmx_pcsx_anx_adv_reg_s {
  321. #ifdef __BIG_ENDIAN_BITFIELD
  322. uint64_t reserved_16_63:48;
  323. uint64_t np:1;
  324. uint64_t reserved_14_14:1;
  325. uint64_t rem_flt:2;
  326. uint64_t reserved_9_11:3;
  327. uint64_t pause:2;
  328. uint64_t hfd:1;
  329. uint64_t fd:1;
  330. uint64_t reserved_0_4:5;
  331. #else
  332. uint64_t reserved_0_4:5;
  333. uint64_t fd:1;
  334. uint64_t hfd:1;
  335. uint64_t pause:2;
  336. uint64_t reserved_9_11:3;
  337. uint64_t rem_flt:2;
  338. uint64_t reserved_14_14:1;
  339. uint64_t np:1;
  340. uint64_t reserved_16_63:48;
  341. #endif
  342. } s;
  343. struct cvmx_pcsx_anx_adv_reg_s cn52xx;
  344. struct cvmx_pcsx_anx_adv_reg_s cn52xxp1;
  345. struct cvmx_pcsx_anx_adv_reg_s cn56xx;
  346. struct cvmx_pcsx_anx_adv_reg_s cn56xxp1;
  347. struct cvmx_pcsx_anx_adv_reg_s cn61xx;
  348. struct cvmx_pcsx_anx_adv_reg_s cn63xx;
  349. struct cvmx_pcsx_anx_adv_reg_s cn63xxp1;
  350. struct cvmx_pcsx_anx_adv_reg_s cn66xx;
  351. struct cvmx_pcsx_anx_adv_reg_s cn68xx;
  352. struct cvmx_pcsx_anx_adv_reg_s cn68xxp1;
  353. struct cvmx_pcsx_anx_adv_reg_s cnf71xx;
  354. };
  355. union cvmx_pcsx_anx_ext_st_reg {
  356. uint64_t u64;
  357. struct cvmx_pcsx_anx_ext_st_reg_s {
  358. #ifdef __BIG_ENDIAN_BITFIELD
  359. uint64_t reserved_16_63:48;
  360. uint64_t thou_xfd:1;
  361. uint64_t thou_xhd:1;
  362. uint64_t thou_tfd:1;
  363. uint64_t thou_thd:1;
  364. uint64_t reserved_0_11:12;
  365. #else
  366. uint64_t reserved_0_11:12;
  367. uint64_t thou_thd:1;
  368. uint64_t thou_tfd:1;
  369. uint64_t thou_xhd:1;
  370. uint64_t thou_xfd:1;
  371. uint64_t reserved_16_63:48;
  372. #endif
  373. } s;
  374. struct cvmx_pcsx_anx_ext_st_reg_s cn52xx;
  375. struct cvmx_pcsx_anx_ext_st_reg_s cn52xxp1;
  376. struct cvmx_pcsx_anx_ext_st_reg_s cn56xx;
  377. struct cvmx_pcsx_anx_ext_st_reg_s cn56xxp1;
  378. struct cvmx_pcsx_anx_ext_st_reg_s cn61xx;
  379. struct cvmx_pcsx_anx_ext_st_reg_s cn63xx;
  380. struct cvmx_pcsx_anx_ext_st_reg_s cn63xxp1;
  381. struct cvmx_pcsx_anx_ext_st_reg_s cn66xx;
  382. struct cvmx_pcsx_anx_ext_st_reg_s cn68xx;
  383. struct cvmx_pcsx_anx_ext_st_reg_s cn68xxp1;
  384. struct cvmx_pcsx_anx_ext_st_reg_s cnf71xx;
  385. };
  386. union cvmx_pcsx_anx_lp_abil_reg {
  387. uint64_t u64;
  388. struct cvmx_pcsx_anx_lp_abil_reg_s {
  389. #ifdef __BIG_ENDIAN_BITFIELD
  390. uint64_t reserved_16_63:48;
  391. uint64_t np:1;
  392. uint64_t ack:1;
  393. uint64_t rem_flt:2;
  394. uint64_t reserved_9_11:3;
  395. uint64_t pause:2;
  396. uint64_t hfd:1;
  397. uint64_t fd:1;
  398. uint64_t reserved_0_4:5;
  399. #else
  400. uint64_t reserved_0_4:5;
  401. uint64_t fd:1;
  402. uint64_t hfd:1;
  403. uint64_t pause:2;
  404. uint64_t reserved_9_11:3;
  405. uint64_t rem_flt:2;
  406. uint64_t ack:1;
  407. uint64_t np:1;
  408. uint64_t reserved_16_63:48;
  409. #endif
  410. } s;
  411. struct cvmx_pcsx_anx_lp_abil_reg_s cn52xx;
  412. struct cvmx_pcsx_anx_lp_abil_reg_s cn52xxp1;
  413. struct cvmx_pcsx_anx_lp_abil_reg_s cn56xx;
  414. struct cvmx_pcsx_anx_lp_abil_reg_s cn56xxp1;
  415. struct cvmx_pcsx_anx_lp_abil_reg_s cn61xx;
  416. struct cvmx_pcsx_anx_lp_abil_reg_s cn63xx;
  417. struct cvmx_pcsx_anx_lp_abil_reg_s cn63xxp1;
  418. struct cvmx_pcsx_anx_lp_abil_reg_s cn66xx;
  419. struct cvmx_pcsx_anx_lp_abil_reg_s cn68xx;
  420. struct cvmx_pcsx_anx_lp_abil_reg_s cn68xxp1;
  421. struct cvmx_pcsx_anx_lp_abil_reg_s cnf71xx;
  422. };
  423. union cvmx_pcsx_anx_results_reg {
  424. uint64_t u64;
  425. struct cvmx_pcsx_anx_results_reg_s {
  426. #ifdef __BIG_ENDIAN_BITFIELD
  427. uint64_t reserved_7_63:57;
  428. uint64_t pause:2;
  429. uint64_t spd:2;
  430. uint64_t an_cpt:1;
  431. uint64_t dup:1;
  432. uint64_t link_ok:1;
  433. #else
  434. uint64_t link_ok:1;
  435. uint64_t dup:1;
  436. uint64_t an_cpt:1;
  437. uint64_t spd:2;
  438. uint64_t pause:2;
  439. uint64_t reserved_7_63:57;
  440. #endif
  441. } s;
  442. struct cvmx_pcsx_anx_results_reg_s cn52xx;
  443. struct cvmx_pcsx_anx_results_reg_s cn52xxp1;
  444. struct cvmx_pcsx_anx_results_reg_s cn56xx;
  445. struct cvmx_pcsx_anx_results_reg_s cn56xxp1;
  446. struct cvmx_pcsx_anx_results_reg_s cn61xx;
  447. struct cvmx_pcsx_anx_results_reg_s cn63xx;
  448. struct cvmx_pcsx_anx_results_reg_s cn63xxp1;
  449. struct cvmx_pcsx_anx_results_reg_s cn66xx;
  450. struct cvmx_pcsx_anx_results_reg_s cn68xx;
  451. struct cvmx_pcsx_anx_results_reg_s cn68xxp1;
  452. struct cvmx_pcsx_anx_results_reg_s cnf71xx;
  453. };
  454. union cvmx_pcsx_intx_en_reg {
  455. uint64_t u64;
  456. struct cvmx_pcsx_intx_en_reg_s {
  457. #ifdef __BIG_ENDIAN_BITFIELD
  458. uint64_t reserved_13_63:51;
  459. uint64_t dbg_sync_en:1;
  460. uint64_t dup:1;
  461. uint64_t sync_bad_en:1;
  462. uint64_t an_bad_en:1;
  463. uint64_t rxlock_en:1;
  464. uint64_t rxbad_en:1;
  465. uint64_t rxerr_en:1;
  466. uint64_t txbad_en:1;
  467. uint64_t txfifo_en:1;
  468. uint64_t txfifu_en:1;
  469. uint64_t an_err_en:1;
  470. uint64_t xmit_en:1;
  471. uint64_t lnkspd_en:1;
  472. #else
  473. uint64_t lnkspd_en:1;
  474. uint64_t xmit_en:1;
  475. uint64_t an_err_en:1;
  476. uint64_t txfifu_en:1;
  477. uint64_t txfifo_en:1;
  478. uint64_t txbad_en:1;
  479. uint64_t rxerr_en:1;
  480. uint64_t rxbad_en:1;
  481. uint64_t rxlock_en:1;
  482. uint64_t an_bad_en:1;
  483. uint64_t sync_bad_en:1;
  484. uint64_t dup:1;
  485. uint64_t dbg_sync_en:1;
  486. uint64_t reserved_13_63:51;
  487. #endif
  488. } s;
  489. struct cvmx_pcsx_intx_en_reg_cn52xx {
  490. #ifdef __BIG_ENDIAN_BITFIELD
  491. uint64_t reserved_12_63:52;
  492. uint64_t dup:1;
  493. uint64_t sync_bad_en:1;
  494. uint64_t an_bad_en:1;
  495. uint64_t rxlock_en:1;
  496. uint64_t rxbad_en:1;
  497. uint64_t rxerr_en:1;
  498. uint64_t txbad_en:1;
  499. uint64_t txfifo_en:1;
  500. uint64_t txfifu_en:1;
  501. uint64_t an_err_en:1;
  502. uint64_t xmit_en:1;
  503. uint64_t lnkspd_en:1;
  504. #else
  505. uint64_t lnkspd_en:1;
  506. uint64_t xmit_en:1;
  507. uint64_t an_err_en:1;
  508. uint64_t txfifu_en:1;
  509. uint64_t txfifo_en:1;
  510. uint64_t txbad_en:1;
  511. uint64_t rxerr_en:1;
  512. uint64_t rxbad_en:1;
  513. uint64_t rxlock_en:1;
  514. uint64_t an_bad_en:1;
  515. uint64_t sync_bad_en:1;
  516. uint64_t dup:1;
  517. uint64_t reserved_12_63:52;
  518. #endif
  519. } cn52xx;
  520. struct cvmx_pcsx_intx_en_reg_cn52xx cn52xxp1;
  521. struct cvmx_pcsx_intx_en_reg_cn52xx cn56xx;
  522. struct cvmx_pcsx_intx_en_reg_cn52xx cn56xxp1;
  523. struct cvmx_pcsx_intx_en_reg_s cn61xx;
  524. struct cvmx_pcsx_intx_en_reg_s cn63xx;
  525. struct cvmx_pcsx_intx_en_reg_s cn63xxp1;
  526. struct cvmx_pcsx_intx_en_reg_s cn66xx;
  527. struct cvmx_pcsx_intx_en_reg_s cn68xx;
  528. struct cvmx_pcsx_intx_en_reg_s cn68xxp1;
  529. struct cvmx_pcsx_intx_en_reg_s cnf71xx;
  530. };
  531. union cvmx_pcsx_intx_reg {
  532. uint64_t u64;
  533. struct cvmx_pcsx_intx_reg_s {
  534. #ifdef __BIG_ENDIAN_BITFIELD
  535. uint64_t reserved_13_63:51;
  536. uint64_t dbg_sync:1;
  537. uint64_t dup:1;
  538. uint64_t sync_bad:1;
  539. uint64_t an_bad:1;
  540. uint64_t rxlock:1;
  541. uint64_t rxbad:1;
  542. uint64_t rxerr:1;
  543. uint64_t txbad:1;
  544. uint64_t txfifo:1;
  545. uint64_t txfifu:1;
  546. uint64_t an_err:1;
  547. uint64_t xmit:1;
  548. uint64_t lnkspd:1;
  549. #else
  550. uint64_t lnkspd:1;
  551. uint64_t xmit:1;
  552. uint64_t an_err:1;
  553. uint64_t txfifu:1;
  554. uint64_t txfifo:1;
  555. uint64_t txbad:1;
  556. uint64_t rxerr:1;
  557. uint64_t rxbad:1;
  558. uint64_t rxlock:1;
  559. uint64_t an_bad:1;
  560. uint64_t sync_bad:1;
  561. uint64_t dup:1;
  562. uint64_t dbg_sync:1;
  563. uint64_t reserved_13_63:51;
  564. #endif
  565. } s;
  566. struct cvmx_pcsx_intx_reg_cn52xx {
  567. #ifdef __BIG_ENDIAN_BITFIELD
  568. uint64_t reserved_12_63:52;
  569. uint64_t dup:1;
  570. uint64_t sync_bad:1;
  571. uint64_t an_bad:1;
  572. uint64_t rxlock:1;
  573. uint64_t rxbad:1;
  574. uint64_t rxerr:1;
  575. uint64_t txbad:1;
  576. uint64_t txfifo:1;
  577. uint64_t txfifu:1;
  578. uint64_t an_err:1;
  579. uint64_t xmit:1;
  580. uint64_t lnkspd:1;
  581. #else
  582. uint64_t lnkspd:1;
  583. uint64_t xmit:1;
  584. uint64_t an_err:1;
  585. uint64_t txfifu:1;
  586. uint64_t txfifo:1;
  587. uint64_t txbad:1;
  588. uint64_t rxerr:1;
  589. uint64_t rxbad:1;
  590. uint64_t rxlock:1;
  591. uint64_t an_bad:1;
  592. uint64_t sync_bad:1;
  593. uint64_t dup:1;
  594. uint64_t reserved_12_63:52;
  595. #endif
  596. } cn52xx;
  597. struct cvmx_pcsx_intx_reg_cn52xx cn52xxp1;
  598. struct cvmx_pcsx_intx_reg_cn52xx cn56xx;
  599. struct cvmx_pcsx_intx_reg_cn52xx cn56xxp1;
  600. struct cvmx_pcsx_intx_reg_s cn61xx;
  601. struct cvmx_pcsx_intx_reg_s cn63xx;
  602. struct cvmx_pcsx_intx_reg_s cn63xxp1;
  603. struct cvmx_pcsx_intx_reg_s cn66xx;
  604. struct cvmx_pcsx_intx_reg_s cn68xx;
  605. struct cvmx_pcsx_intx_reg_s cn68xxp1;
  606. struct cvmx_pcsx_intx_reg_s cnf71xx;
  607. };
  608. union cvmx_pcsx_linkx_timer_count_reg {
  609. uint64_t u64;
  610. struct cvmx_pcsx_linkx_timer_count_reg_s {
  611. #ifdef __BIG_ENDIAN_BITFIELD
  612. uint64_t reserved_16_63:48;
  613. uint64_t count:16;
  614. #else
  615. uint64_t count:16;
  616. uint64_t reserved_16_63:48;
  617. #endif
  618. } s;
  619. struct cvmx_pcsx_linkx_timer_count_reg_s cn52xx;
  620. struct cvmx_pcsx_linkx_timer_count_reg_s cn52xxp1;
  621. struct cvmx_pcsx_linkx_timer_count_reg_s cn56xx;
  622. struct cvmx_pcsx_linkx_timer_count_reg_s cn56xxp1;
  623. struct cvmx_pcsx_linkx_timer_count_reg_s cn61xx;
  624. struct cvmx_pcsx_linkx_timer_count_reg_s cn63xx;
  625. struct cvmx_pcsx_linkx_timer_count_reg_s cn63xxp1;
  626. struct cvmx_pcsx_linkx_timer_count_reg_s cn66xx;
  627. struct cvmx_pcsx_linkx_timer_count_reg_s cn68xx;
  628. struct cvmx_pcsx_linkx_timer_count_reg_s cn68xxp1;
  629. struct cvmx_pcsx_linkx_timer_count_reg_s cnf71xx;
  630. };
  631. union cvmx_pcsx_log_anlx_reg {
  632. uint64_t u64;
  633. struct cvmx_pcsx_log_anlx_reg_s {
  634. #ifdef __BIG_ENDIAN_BITFIELD
  635. uint64_t reserved_4_63:60;
  636. uint64_t lafifovfl:1;
  637. uint64_t la_en:1;
  638. uint64_t pkt_sz:2;
  639. #else
  640. uint64_t pkt_sz:2;
  641. uint64_t la_en:1;
  642. uint64_t lafifovfl:1;
  643. uint64_t reserved_4_63:60;
  644. #endif
  645. } s;
  646. struct cvmx_pcsx_log_anlx_reg_s cn52xx;
  647. struct cvmx_pcsx_log_anlx_reg_s cn52xxp1;
  648. struct cvmx_pcsx_log_anlx_reg_s cn56xx;
  649. struct cvmx_pcsx_log_anlx_reg_s cn56xxp1;
  650. struct cvmx_pcsx_log_anlx_reg_s cn61xx;
  651. struct cvmx_pcsx_log_anlx_reg_s cn63xx;
  652. struct cvmx_pcsx_log_anlx_reg_s cn63xxp1;
  653. struct cvmx_pcsx_log_anlx_reg_s cn66xx;
  654. struct cvmx_pcsx_log_anlx_reg_s cn68xx;
  655. struct cvmx_pcsx_log_anlx_reg_s cn68xxp1;
  656. struct cvmx_pcsx_log_anlx_reg_s cnf71xx;
  657. };
  658. union cvmx_pcsx_miscx_ctl_reg {
  659. uint64_t u64;
  660. struct cvmx_pcsx_miscx_ctl_reg_s {
  661. #ifdef __BIG_ENDIAN_BITFIELD
  662. uint64_t reserved_13_63:51;
  663. uint64_t sgmii:1;
  664. uint64_t gmxeno:1;
  665. uint64_t loopbck2:1;
  666. uint64_t mac_phy:1;
  667. uint64_t mode:1;
  668. uint64_t an_ovrd:1;
  669. uint64_t samp_pt:7;
  670. #else
  671. uint64_t samp_pt:7;
  672. uint64_t an_ovrd:1;
  673. uint64_t mode:1;
  674. uint64_t mac_phy:1;
  675. uint64_t loopbck2:1;
  676. uint64_t gmxeno:1;
  677. uint64_t sgmii:1;
  678. uint64_t reserved_13_63:51;
  679. #endif
  680. } s;
  681. struct cvmx_pcsx_miscx_ctl_reg_s cn52xx;
  682. struct cvmx_pcsx_miscx_ctl_reg_s cn52xxp1;
  683. struct cvmx_pcsx_miscx_ctl_reg_s cn56xx;
  684. struct cvmx_pcsx_miscx_ctl_reg_s cn56xxp1;
  685. struct cvmx_pcsx_miscx_ctl_reg_s cn61xx;
  686. struct cvmx_pcsx_miscx_ctl_reg_s cn63xx;
  687. struct cvmx_pcsx_miscx_ctl_reg_s cn63xxp1;
  688. struct cvmx_pcsx_miscx_ctl_reg_s cn66xx;
  689. struct cvmx_pcsx_miscx_ctl_reg_s cn68xx;
  690. struct cvmx_pcsx_miscx_ctl_reg_s cn68xxp1;
  691. struct cvmx_pcsx_miscx_ctl_reg_s cnf71xx;
  692. };
  693. union cvmx_pcsx_mrx_control_reg {
  694. uint64_t u64;
  695. struct cvmx_pcsx_mrx_control_reg_s {
  696. #ifdef __BIG_ENDIAN_BITFIELD
  697. uint64_t reserved_16_63:48;
  698. uint64_t reset:1;
  699. uint64_t loopbck1:1;
  700. uint64_t spdlsb:1;
  701. uint64_t an_en:1;
  702. uint64_t pwr_dn:1;
  703. uint64_t reserved_10_10:1;
  704. uint64_t rst_an:1;
  705. uint64_t dup:1;
  706. uint64_t coltst:1;
  707. uint64_t spdmsb:1;
  708. uint64_t uni:1;
  709. uint64_t reserved_0_4:5;
  710. #else
  711. uint64_t reserved_0_4:5;
  712. uint64_t uni:1;
  713. uint64_t spdmsb:1;
  714. uint64_t coltst:1;
  715. uint64_t dup:1;
  716. uint64_t rst_an:1;
  717. uint64_t reserved_10_10:1;
  718. uint64_t pwr_dn:1;
  719. uint64_t an_en:1;
  720. uint64_t spdlsb:1;
  721. uint64_t loopbck1:1;
  722. uint64_t reset:1;
  723. uint64_t reserved_16_63:48;
  724. #endif
  725. } s;
  726. struct cvmx_pcsx_mrx_control_reg_s cn52xx;
  727. struct cvmx_pcsx_mrx_control_reg_s cn52xxp1;
  728. struct cvmx_pcsx_mrx_control_reg_s cn56xx;
  729. struct cvmx_pcsx_mrx_control_reg_s cn56xxp1;
  730. struct cvmx_pcsx_mrx_control_reg_s cn61xx;
  731. struct cvmx_pcsx_mrx_control_reg_s cn63xx;
  732. struct cvmx_pcsx_mrx_control_reg_s cn63xxp1;
  733. struct cvmx_pcsx_mrx_control_reg_s cn66xx;
  734. struct cvmx_pcsx_mrx_control_reg_s cn68xx;
  735. struct cvmx_pcsx_mrx_control_reg_s cn68xxp1;
  736. struct cvmx_pcsx_mrx_control_reg_s cnf71xx;
  737. };
  738. union cvmx_pcsx_mrx_status_reg {
  739. uint64_t u64;
  740. struct cvmx_pcsx_mrx_status_reg_s {
  741. #ifdef __BIG_ENDIAN_BITFIELD
  742. uint64_t reserved_16_63:48;
  743. uint64_t hun_t4:1;
  744. uint64_t hun_xfd:1;
  745. uint64_t hun_xhd:1;
  746. uint64_t ten_fd:1;
  747. uint64_t ten_hd:1;
  748. uint64_t hun_t2fd:1;
  749. uint64_t hun_t2hd:1;
  750. uint64_t ext_st:1;
  751. uint64_t reserved_7_7:1;
  752. uint64_t prb_sup:1;
  753. uint64_t an_cpt:1;
  754. uint64_t rm_flt:1;
  755. uint64_t an_abil:1;
  756. uint64_t lnk_st:1;
  757. uint64_t reserved_1_1:1;
  758. uint64_t extnd:1;
  759. #else
  760. uint64_t extnd:1;
  761. uint64_t reserved_1_1:1;
  762. uint64_t lnk_st:1;
  763. uint64_t an_abil:1;
  764. uint64_t rm_flt:1;
  765. uint64_t an_cpt:1;
  766. uint64_t prb_sup:1;
  767. uint64_t reserved_7_7:1;
  768. uint64_t ext_st:1;
  769. uint64_t hun_t2hd:1;
  770. uint64_t hun_t2fd:1;
  771. uint64_t ten_hd:1;
  772. uint64_t ten_fd:1;
  773. uint64_t hun_xhd:1;
  774. uint64_t hun_xfd:1;
  775. uint64_t hun_t4:1;
  776. uint64_t reserved_16_63:48;
  777. #endif
  778. } s;
  779. struct cvmx_pcsx_mrx_status_reg_s cn52xx;
  780. struct cvmx_pcsx_mrx_status_reg_s cn52xxp1;
  781. struct cvmx_pcsx_mrx_status_reg_s cn56xx;
  782. struct cvmx_pcsx_mrx_status_reg_s cn56xxp1;
  783. struct cvmx_pcsx_mrx_status_reg_s cn61xx;
  784. struct cvmx_pcsx_mrx_status_reg_s cn63xx;
  785. struct cvmx_pcsx_mrx_status_reg_s cn63xxp1;
  786. struct cvmx_pcsx_mrx_status_reg_s cn66xx;
  787. struct cvmx_pcsx_mrx_status_reg_s cn68xx;
  788. struct cvmx_pcsx_mrx_status_reg_s cn68xxp1;
  789. struct cvmx_pcsx_mrx_status_reg_s cnf71xx;
  790. };
  791. union cvmx_pcsx_rxx_states_reg {
  792. uint64_t u64;
  793. struct cvmx_pcsx_rxx_states_reg_s {
  794. #ifdef __BIG_ENDIAN_BITFIELD
  795. uint64_t reserved_16_63:48;
  796. uint64_t rx_bad:1;
  797. uint64_t rx_st:5;
  798. uint64_t sync_bad:1;
  799. uint64_t sync:4;
  800. uint64_t an_bad:1;
  801. uint64_t an_st:4;
  802. #else
  803. uint64_t an_st:4;
  804. uint64_t an_bad:1;
  805. uint64_t sync:4;
  806. uint64_t sync_bad:1;
  807. uint64_t rx_st:5;
  808. uint64_t rx_bad:1;
  809. uint64_t reserved_16_63:48;
  810. #endif
  811. } s;
  812. struct cvmx_pcsx_rxx_states_reg_s cn52xx;
  813. struct cvmx_pcsx_rxx_states_reg_s cn52xxp1;
  814. struct cvmx_pcsx_rxx_states_reg_s cn56xx;
  815. struct cvmx_pcsx_rxx_states_reg_s cn56xxp1;
  816. struct cvmx_pcsx_rxx_states_reg_s cn61xx;
  817. struct cvmx_pcsx_rxx_states_reg_s cn63xx;
  818. struct cvmx_pcsx_rxx_states_reg_s cn63xxp1;
  819. struct cvmx_pcsx_rxx_states_reg_s cn66xx;
  820. struct cvmx_pcsx_rxx_states_reg_s cn68xx;
  821. struct cvmx_pcsx_rxx_states_reg_s cn68xxp1;
  822. struct cvmx_pcsx_rxx_states_reg_s cnf71xx;
  823. };
  824. union cvmx_pcsx_rxx_sync_reg {
  825. uint64_t u64;
  826. struct cvmx_pcsx_rxx_sync_reg_s {
  827. #ifdef __BIG_ENDIAN_BITFIELD
  828. uint64_t reserved_2_63:62;
  829. uint64_t sync:1;
  830. uint64_t bit_lock:1;
  831. #else
  832. uint64_t bit_lock:1;
  833. uint64_t sync:1;
  834. uint64_t reserved_2_63:62;
  835. #endif
  836. } s;
  837. struct cvmx_pcsx_rxx_sync_reg_s cn52xx;
  838. struct cvmx_pcsx_rxx_sync_reg_s cn52xxp1;
  839. struct cvmx_pcsx_rxx_sync_reg_s cn56xx;
  840. struct cvmx_pcsx_rxx_sync_reg_s cn56xxp1;
  841. struct cvmx_pcsx_rxx_sync_reg_s cn61xx;
  842. struct cvmx_pcsx_rxx_sync_reg_s cn63xx;
  843. struct cvmx_pcsx_rxx_sync_reg_s cn63xxp1;
  844. struct cvmx_pcsx_rxx_sync_reg_s cn66xx;
  845. struct cvmx_pcsx_rxx_sync_reg_s cn68xx;
  846. struct cvmx_pcsx_rxx_sync_reg_s cn68xxp1;
  847. struct cvmx_pcsx_rxx_sync_reg_s cnf71xx;
  848. };
  849. union cvmx_pcsx_sgmx_an_adv_reg {
  850. uint64_t u64;
  851. struct cvmx_pcsx_sgmx_an_adv_reg_s {
  852. #ifdef __BIG_ENDIAN_BITFIELD
  853. uint64_t reserved_16_63:48;
  854. uint64_t link:1;
  855. uint64_t ack:1;
  856. uint64_t reserved_13_13:1;
  857. uint64_t dup:1;
  858. uint64_t speed:2;
  859. uint64_t reserved_1_9:9;
  860. uint64_t one:1;
  861. #else
  862. uint64_t one:1;
  863. uint64_t reserved_1_9:9;
  864. uint64_t speed:2;
  865. uint64_t dup:1;
  866. uint64_t reserved_13_13:1;
  867. uint64_t ack:1;
  868. uint64_t link:1;
  869. uint64_t reserved_16_63:48;
  870. #endif
  871. } s;
  872. struct cvmx_pcsx_sgmx_an_adv_reg_s cn52xx;
  873. struct cvmx_pcsx_sgmx_an_adv_reg_s cn52xxp1;
  874. struct cvmx_pcsx_sgmx_an_adv_reg_s cn56xx;
  875. struct cvmx_pcsx_sgmx_an_adv_reg_s cn56xxp1;
  876. struct cvmx_pcsx_sgmx_an_adv_reg_s cn61xx;
  877. struct cvmx_pcsx_sgmx_an_adv_reg_s cn63xx;
  878. struct cvmx_pcsx_sgmx_an_adv_reg_s cn63xxp1;
  879. struct cvmx_pcsx_sgmx_an_adv_reg_s cn66xx;
  880. struct cvmx_pcsx_sgmx_an_adv_reg_s cn68xx;
  881. struct cvmx_pcsx_sgmx_an_adv_reg_s cn68xxp1;
  882. struct cvmx_pcsx_sgmx_an_adv_reg_s cnf71xx;
  883. };
  884. union cvmx_pcsx_sgmx_lp_adv_reg {
  885. uint64_t u64;
  886. struct cvmx_pcsx_sgmx_lp_adv_reg_s {
  887. #ifdef __BIG_ENDIAN_BITFIELD
  888. uint64_t reserved_16_63:48;
  889. uint64_t link:1;
  890. uint64_t reserved_13_14:2;
  891. uint64_t dup:1;
  892. uint64_t speed:2;
  893. uint64_t reserved_1_9:9;
  894. uint64_t one:1;
  895. #else
  896. uint64_t one:1;
  897. uint64_t reserved_1_9:9;
  898. uint64_t speed:2;
  899. uint64_t dup:1;
  900. uint64_t reserved_13_14:2;
  901. uint64_t link:1;
  902. uint64_t reserved_16_63:48;
  903. #endif
  904. } s;
  905. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn52xx;
  906. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn52xxp1;
  907. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn56xx;
  908. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn56xxp1;
  909. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn61xx;
  910. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn63xx;
  911. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn63xxp1;
  912. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn66xx;
  913. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn68xx;
  914. struct cvmx_pcsx_sgmx_lp_adv_reg_s cn68xxp1;
  915. struct cvmx_pcsx_sgmx_lp_adv_reg_s cnf71xx;
  916. };
  917. union cvmx_pcsx_txx_states_reg {
  918. uint64_t u64;
  919. struct cvmx_pcsx_txx_states_reg_s {
  920. #ifdef __BIG_ENDIAN_BITFIELD
  921. uint64_t reserved_7_63:57;
  922. uint64_t xmit:2;
  923. uint64_t tx_bad:1;
  924. uint64_t ord_st:4;
  925. #else
  926. uint64_t ord_st:4;
  927. uint64_t tx_bad:1;
  928. uint64_t xmit:2;
  929. uint64_t reserved_7_63:57;
  930. #endif
  931. } s;
  932. struct cvmx_pcsx_txx_states_reg_s cn52xx;
  933. struct cvmx_pcsx_txx_states_reg_s cn52xxp1;
  934. struct cvmx_pcsx_txx_states_reg_s cn56xx;
  935. struct cvmx_pcsx_txx_states_reg_s cn56xxp1;
  936. struct cvmx_pcsx_txx_states_reg_s cn61xx;
  937. struct cvmx_pcsx_txx_states_reg_s cn63xx;
  938. struct cvmx_pcsx_txx_states_reg_s cn63xxp1;
  939. struct cvmx_pcsx_txx_states_reg_s cn66xx;
  940. struct cvmx_pcsx_txx_states_reg_s cn68xx;
  941. struct cvmx_pcsx_txx_states_reg_s cn68xxp1;
  942. struct cvmx_pcsx_txx_states_reg_s cnf71xx;
  943. };
  944. union cvmx_pcsx_tx_rxx_polarity_reg {
  945. uint64_t u64;
  946. struct cvmx_pcsx_tx_rxx_polarity_reg_s {
  947. #ifdef __BIG_ENDIAN_BITFIELD
  948. uint64_t reserved_4_63:60;
  949. uint64_t rxovrd:1;
  950. uint64_t autorxpl:1;
  951. uint64_t rxplrt:1;
  952. uint64_t txplrt:1;
  953. #else
  954. uint64_t txplrt:1;
  955. uint64_t rxplrt:1;
  956. uint64_t autorxpl:1;
  957. uint64_t rxovrd:1;
  958. uint64_t reserved_4_63:60;
  959. #endif
  960. } s;
  961. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn52xx;
  962. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn52xxp1;
  963. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn56xx;
  964. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn56xxp1;
  965. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn61xx;
  966. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn63xx;
  967. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn63xxp1;
  968. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn66xx;
  969. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn68xx;
  970. struct cvmx_pcsx_tx_rxx_polarity_reg_s cn68xxp1;
  971. struct cvmx_pcsx_tx_rxx_polarity_reg_s cnf71xx;
  972. };
  973. #endif