ipath_registers.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. /*
  2. * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
  3. *
  4. * This software is available to you under a choice of one of two
  5. * licenses. You may choose to be licensed under the terms of the GNU
  6. * General Public License (GPL) Version 2, available from the file
  7. * COPYING in the main directory of this source tree, or the
  8. * OpenIB.org BSD license below:
  9. *
  10. * Redistribution and use in source and binary forms, with or
  11. * without modification, are permitted provided that the following
  12. * conditions are met:
  13. *
  14. * - Redistributions of source code must retain the above
  15. * copyright notice, this list of conditions and the following
  16. * disclaimer.
  17. *
  18. * - Redistributions in binary form must reproduce the above
  19. * copyright notice, this list of conditions and the following
  20. * disclaimer in the documentation and/or other materials
  21. * provided with the distribution.
  22. *
  23. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  24. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  25. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  26. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  27. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  28. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  29. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  30. * SOFTWARE.
  31. */
  32. #ifndef _IPATH_REGISTERS_H
  33. #define _IPATH_REGISTERS_H
  34. /*
  35. * This file should only be included by kernel source, and by the diags. It
  36. * defines the registers, and their contents, for the InfiniPath HT-400
  37. * chip.
  38. */
  39. /*
  40. * These are the InfiniPath register and buffer bit definitions,
  41. * that are visible to software, and needed only by the kernel
  42. * and diag code. A few, that are visible to protocol and user
  43. * code are in ipath_common.h. Some bits are specific
  44. * to a given chip implementation, and have been moved to the
  45. * chip-specific source file
  46. */
  47. /* kr_revision bits */
  48. #define INFINIPATH_R_CHIPREVMINOR_MASK 0xFF
  49. #define INFINIPATH_R_CHIPREVMINOR_SHIFT 0
  50. #define INFINIPATH_R_CHIPREVMAJOR_MASK 0xFF
  51. #define INFINIPATH_R_CHIPREVMAJOR_SHIFT 8
  52. #define INFINIPATH_R_ARCH_MASK 0xFF
  53. #define INFINIPATH_R_ARCH_SHIFT 16
  54. #define INFINIPATH_R_SOFTWARE_MASK 0xFF
  55. #define INFINIPATH_R_SOFTWARE_SHIFT 24
  56. #define INFINIPATH_R_BOARDID_MASK 0xFF
  57. #define INFINIPATH_R_BOARDID_SHIFT 32
  58. /* kr_control bits */
  59. #define INFINIPATH_C_FREEZEMODE 0x00000002
  60. #define INFINIPATH_C_LINKENABLE 0x00000004
  61. #define INFINIPATH_C_RESET 0x00000001
  62. /* kr_sendctrl bits */
  63. #define INFINIPATH_S_DISARMPIOBUF_SHIFT 16
  64. #define IPATH_S_ABORT 0
  65. #define IPATH_S_PIOINTBUFAVAIL 1
  66. #define IPATH_S_PIOBUFAVAILUPD 2
  67. #define IPATH_S_PIOENABLE 3
  68. #define IPATH_S_DISARM 31
  69. #define INFINIPATH_S_ABORT (1U << IPATH_S_ABORT)
  70. #define INFINIPATH_S_PIOINTBUFAVAIL (1U << IPATH_S_PIOINTBUFAVAIL)
  71. #define INFINIPATH_S_PIOBUFAVAILUPD (1U << IPATH_S_PIOBUFAVAILUPD)
  72. #define INFINIPATH_S_PIOENABLE (1U << IPATH_S_PIOENABLE)
  73. #define INFINIPATH_S_DISARM (1U << IPATH_S_DISARM)
  74. /* kr_rcvctrl bits */
  75. #define INFINIPATH_R_PORTENABLE_SHIFT 0
  76. #define INFINIPATH_R_INTRAVAIL_SHIFT 16
  77. #define INFINIPATH_R_TAILUPD 0x80000000
  78. /* kr_intstatus, kr_intclear, kr_intmask bits */
  79. #define INFINIPATH_I_RCVURG_SHIFT 0
  80. #define INFINIPATH_I_RCVAVAIL_SHIFT 12
  81. #define INFINIPATH_I_ERROR 0x80000000
  82. #define INFINIPATH_I_SPIOSENT 0x40000000
  83. #define INFINIPATH_I_SPIOBUFAVAIL 0x20000000
  84. #define INFINIPATH_I_GPIO 0x10000000
  85. /* kr_errorstatus, kr_errorclear, kr_errormask bits */
  86. #define INFINIPATH_E_RFORMATERR 0x0000000000000001ULL
  87. #define INFINIPATH_E_RVCRC 0x0000000000000002ULL
  88. #define INFINIPATH_E_RICRC 0x0000000000000004ULL
  89. #define INFINIPATH_E_RMINPKTLEN 0x0000000000000008ULL
  90. #define INFINIPATH_E_RMAXPKTLEN 0x0000000000000010ULL
  91. #define INFINIPATH_E_RLONGPKTLEN 0x0000000000000020ULL
  92. #define INFINIPATH_E_RSHORTPKTLEN 0x0000000000000040ULL
  93. #define INFINIPATH_E_RUNEXPCHAR 0x0000000000000080ULL
  94. #define INFINIPATH_E_RUNSUPVL 0x0000000000000100ULL
  95. #define INFINIPATH_E_REBP 0x0000000000000200ULL
  96. #define INFINIPATH_E_RIBFLOW 0x0000000000000400ULL
  97. #define INFINIPATH_E_RBADVERSION 0x0000000000000800ULL
  98. #define INFINIPATH_E_RRCVEGRFULL 0x0000000000001000ULL
  99. #define INFINIPATH_E_RRCVHDRFULL 0x0000000000002000ULL
  100. #define INFINIPATH_E_RBADTID 0x0000000000004000ULL
  101. #define INFINIPATH_E_RHDRLEN 0x0000000000008000ULL
  102. #define INFINIPATH_E_RHDR 0x0000000000010000ULL
  103. #define INFINIPATH_E_RIBLOSTLINK 0x0000000000020000ULL
  104. #define INFINIPATH_E_SMINPKTLEN 0x0000000020000000ULL
  105. #define INFINIPATH_E_SMAXPKTLEN 0x0000000040000000ULL
  106. #define INFINIPATH_E_SUNDERRUN 0x0000000080000000ULL
  107. #define INFINIPATH_E_SPKTLEN 0x0000000100000000ULL
  108. #define INFINIPATH_E_SDROPPEDSMPPKT 0x0000000200000000ULL
  109. #define INFINIPATH_E_SDROPPEDDATAPKT 0x0000000400000000ULL
  110. #define INFINIPATH_E_SPIOARMLAUNCH 0x0000000800000000ULL
  111. #define INFINIPATH_E_SUNEXPERRPKTNUM 0x0000001000000000ULL
  112. #define INFINIPATH_E_SUNSUPVL 0x0000002000000000ULL
  113. #define INFINIPATH_E_IBSTATUSCHANGED 0x0001000000000000ULL
  114. #define INFINIPATH_E_INVALIDADDR 0x0002000000000000ULL
  115. #define INFINIPATH_E_RESET 0x0004000000000000ULL
  116. #define INFINIPATH_E_HARDWARE 0x0008000000000000ULL
  117. /* kr_hwerrclear, kr_hwerrmask, kr_hwerrstatus, bits */
  118. /* TXEMEMPARITYERR bit 0: PIObuf, 1: PIOpbc, 2: launchfifo
  119. * RXEMEMPARITYERR bit 0: rcvbuf, 1: lookupq, 2: eagerTID, 3: expTID
  120. * bit 4: flag buffer, 5: datainfo, 6: header info */
  121. #define INFINIPATH_HWE_TXEMEMPARITYERR_MASK 0xFULL
  122. #define INFINIPATH_HWE_TXEMEMPARITYERR_SHIFT 40
  123. #define INFINIPATH_HWE_RXEMEMPARITYERR_MASK 0x7FULL
  124. #define INFINIPATH_HWE_RXEMEMPARITYERR_SHIFT 44
  125. #define INFINIPATH_HWE_RXDSYNCMEMPARITYERR 0x0000000400000000ULL
  126. #define INFINIPATH_HWE_MEMBISTFAILED 0x0040000000000000ULL
  127. #define INFINIPATH_HWE_IBCBUSTOSPCPARITYERR 0x4000000000000000ULL
  128. #define INFINIPATH_HWE_IBCBUSFRSPCPARITYERR 0x8000000000000000ULL
  129. /* kr_hwdiagctrl bits */
  130. #define INFINIPATH_DC_FORCETXEMEMPARITYERR_MASK 0xFULL
  131. #define INFINIPATH_DC_FORCETXEMEMPARITYERR_SHIFT 40
  132. #define INFINIPATH_DC_FORCERXEMEMPARITYERR_MASK 0x7FULL
  133. #define INFINIPATH_DC_FORCERXEMEMPARITYERR_SHIFT 44
  134. #define INFINIPATH_DC_FORCERXDSYNCMEMPARITYERR 0x0000000400000000ULL
  135. #define INFINIPATH_DC_COUNTERDISABLE 0x1000000000000000ULL
  136. #define INFINIPATH_DC_COUNTERWREN 0x2000000000000000ULL
  137. #define INFINIPATH_DC_FORCEIBCBUSTOSPCPARITYERR 0x4000000000000000ULL
  138. #define INFINIPATH_DC_FORCEIBCBUSFRSPCPARITYERR 0x8000000000000000ULL
  139. /* kr_ibcctrl bits */
  140. #define INFINIPATH_IBCC_FLOWCTRLPERIOD_MASK 0xFFULL
  141. #define INFINIPATH_IBCC_FLOWCTRLPERIOD_SHIFT 0
  142. #define INFINIPATH_IBCC_FLOWCTRLWATERMARK_MASK 0xFFULL
  143. #define INFINIPATH_IBCC_FLOWCTRLWATERMARK_SHIFT 8
  144. #define INFINIPATH_IBCC_LINKINITCMD_MASK 0x3ULL
  145. #define INFINIPATH_IBCC_LINKINITCMD_DISABLE 1
  146. /* cycle through TS1/TS2 till OK */
  147. #define INFINIPATH_IBCC_LINKINITCMD_POLL 2
  148. /* wait for TS1, then go on */
  149. #define INFINIPATH_IBCC_LINKINITCMD_SLEEP 3
  150. #define INFINIPATH_IBCC_LINKINITCMD_SHIFT 16
  151. #define INFINIPATH_IBCC_LINKCMD_MASK 0x3ULL
  152. #define INFINIPATH_IBCC_LINKCMD_INIT 1 /* move to 0x11 */
  153. #define INFINIPATH_IBCC_LINKCMD_ARMED 2 /* move to 0x21 */
  154. #define INFINIPATH_IBCC_LINKCMD_ACTIVE 3 /* move to 0x31 */
  155. #define INFINIPATH_IBCC_LINKCMD_SHIFT 18
  156. #define INFINIPATH_IBCC_MAXPKTLEN_MASK 0x7FFULL
  157. #define INFINIPATH_IBCC_MAXPKTLEN_SHIFT 20
  158. #define INFINIPATH_IBCC_PHYERRTHRESHOLD_MASK 0xFULL
  159. #define INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT 32
  160. #define INFINIPATH_IBCC_OVERRUNTHRESHOLD_MASK 0xFULL
  161. #define INFINIPATH_IBCC_OVERRUNTHRESHOLD_SHIFT 36
  162. #define INFINIPATH_IBCC_CREDITSCALE_MASK 0x7ULL
  163. #define INFINIPATH_IBCC_CREDITSCALE_SHIFT 40
  164. #define INFINIPATH_IBCC_LOOPBACK 0x8000000000000000ULL
  165. #define INFINIPATH_IBCC_LINKDOWNDEFAULTSTATE 0x4000000000000000ULL
  166. /* kr_ibcstatus bits */
  167. #define INFINIPATH_IBCS_LINKTRAININGSTATE_MASK 0xF
  168. #define INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT 0
  169. #define INFINIPATH_IBCS_LINKSTATE_MASK 0x7
  170. #define INFINIPATH_IBCS_LINKSTATE_SHIFT 4
  171. #define INFINIPATH_IBCS_TXREADY 0x40000000
  172. #define INFINIPATH_IBCS_TXCREDITOK 0x80000000
  173. /* link training states (shift by
  174. INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) */
  175. #define INFINIPATH_IBCS_LT_STATE_DISABLED 0x00
  176. #define INFINIPATH_IBCS_LT_STATE_LINKUP 0x01
  177. #define INFINIPATH_IBCS_LT_STATE_POLLACTIVE 0x02
  178. #define INFINIPATH_IBCS_LT_STATE_POLLQUIET 0x03
  179. #define INFINIPATH_IBCS_LT_STATE_SLEEPDELAY 0x04
  180. #define INFINIPATH_IBCS_LT_STATE_SLEEPQUIET 0x05
  181. #define INFINIPATH_IBCS_LT_STATE_CFGDEBOUNCE 0x08
  182. #define INFINIPATH_IBCS_LT_STATE_CFGRCVFCFG 0x09
  183. #define INFINIPATH_IBCS_LT_STATE_CFGWAITRMT 0x0a
  184. #define INFINIPATH_IBCS_LT_STATE_CFGIDLE 0x0b
  185. #define INFINIPATH_IBCS_LT_STATE_RECOVERRETRAIN 0x0c
  186. #define INFINIPATH_IBCS_LT_STATE_RECOVERWAITRMT 0x0e
  187. #define INFINIPATH_IBCS_LT_STATE_RECOVERIDLE 0x0f
  188. /* link state machine states (shift by INFINIPATH_IBCS_LINKSTATE_SHIFT) */
  189. #define INFINIPATH_IBCS_L_STATE_DOWN 0x0
  190. #define INFINIPATH_IBCS_L_STATE_INIT 0x1
  191. #define INFINIPATH_IBCS_L_STATE_ARM 0x2
  192. #define INFINIPATH_IBCS_L_STATE_ACTIVE 0x3
  193. #define INFINIPATH_IBCS_L_STATE_ACT_DEFER 0x4
  194. /* combination link status states that we use with some frequency */
  195. #define IPATH_IBSTATE_MASK ((INFINIPATH_IBCS_LINKTRAININGSTATE_MASK \
  196. << INFINIPATH_IBCS_LINKSTATE_SHIFT) | \
  197. (INFINIPATH_IBCS_LINKSTATE_MASK \
  198. <<INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT))
  199. #define IPATH_IBSTATE_INIT ((INFINIPATH_IBCS_L_STATE_INIT \
  200. << INFINIPATH_IBCS_LINKSTATE_SHIFT) | \
  201. (INFINIPATH_IBCS_LT_STATE_LINKUP \
  202. <<INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT))
  203. #define IPATH_IBSTATE_ARM ((INFINIPATH_IBCS_L_STATE_ARM \
  204. << INFINIPATH_IBCS_LINKSTATE_SHIFT) | \
  205. (INFINIPATH_IBCS_LT_STATE_LINKUP \
  206. <<INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT))
  207. #define IPATH_IBSTATE_ACTIVE ((INFINIPATH_IBCS_L_STATE_ACTIVE \
  208. << INFINIPATH_IBCS_LINKSTATE_SHIFT) | \
  209. (INFINIPATH_IBCS_LT_STATE_LINKUP \
  210. <<INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT))
  211. /* kr_extstatus bits */
  212. #define INFINIPATH_EXTS_SERDESPLLLOCK 0x1
  213. #define INFINIPATH_EXTS_GPIOIN_MASK 0xFFFFULL
  214. #define INFINIPATH_EXTS_GPIOIN_SHIFT 48
  215. /* kr_extctrl bits */
  216. #define INFINIPATH_EXTC_GPIOINVERT_MASK 0xFFFFULL
  217. #define INFINIPATH_EXTC_GPIOINVERT_SHIFT 32
  218. #define INFINIPATH_EXTC_GPIOOE_MASK 0xFFFFULL
  219. #define INFINIPATH_EXTC_GPIOOE_SHIFT 48
  220. #define INFINIPATH_EXTC_SERDESENABLE 0x80000000ULL
  221. #define INFINIPATH_EXTC_SERDESCONNECT 0x40000000ULL
  222. #define INFINIPATH_EXTC_SERDESENTRUNKING 0x20000000ULL
  223. #define INFINIPATH_EXTC_SERDESDISRXFIFO 0x10000000ULL
  224. #define INFINIPATH_EXTC_SERDESENPLPBK1 0x08000000ULL
  225. #define INFINIPATH_EXTC_SERDESENPLPBK2 0x04000000ULL
  226. #define INFINIPATH_EXTC_SERDESENENCDEC 0x02000000ULL
  227. #define INFINIPATH_EXTC_LED1SECPORT_ON 0x00000020ULL
  228. #define INFINIPATH_EXTC_LED2SECPORT_ON 0x00000010ULL
  229. #define INFINIPATH_EXTC_LED1PRIPORT_ON 0x00000008ULL
  230. #define INFINIPATH_EXTC_LED2PRIPORT_ON 0x00000004ULL
  231. #define INFINIPATH_EXTC_LEDGBLOK_ON 0x00000002ULL
  232. #define INFINIPATH_EXTC_LEDGBLERR_OFF 0x00000001ULL
  233. /* kr_mdio bits */
  234. #define INFINIPATH_MDIO_CLKDIV_MASK 0x7FULL
  235. #define INFINIPATH_MDIO_CLKDIV_SHIFT 32
  236. #define INFINIPATH_MDIO_COMMAND_MASK 0x7ULL
  237. #define INFINIPATH_MDIO_COMMAND_SHIFT 26
  238. #define INFINIPATH_MDIO_DEVADDR_MASK 0x1FULL
  239. #define INFINIPATH_MDIO_DEVADDR_SHIFT 21
  240. #define INFINIPATH_MDIO_REGADDR_MASK 0x1FULL
  241. #define INFINIPATH_MDIO_REGADDR_SHIFT 16
  242. #define INFINIPATH_MDIO_DATA_MASK 0xFFFFULL
  243. #define INFINIPATH_MDIO_DATA_SHIFT 0
  244. #define INFINIPATH_MDIO_CMDVALID 0x0000000040000000ULL
  245. #define INFINIPATH_MDIO_RDDATAVALID 0x0000000080000000ULL
  246. /* kr_partitionkey bits */
  247. #define INFINIPATH_PKEY_SIZE 16
  248. #define INFINIPATH_PKEY_MASK 0xFFFF
  249. #define INFINIPATH_PKEY_DEFAULT_PKEY 0xFFFF
  250. /* kr_serdesconfig0 bits */
  251. #define INFINIPATH_SERDC0_RESET_MASK 0xfULL /* overal reset bits */
  252. #define INFINIPATH_SERDC0_RESET_PLL 0x10000000ULL /* pll reset */
  253. /* tx idle enables (per lane) */
  254. #define INFINIPATH_SERDC0_TXIDLE 0xF000ULL
  255. /* rx detect enables (per lane) */
  256. #define INFINIPATH_SERDC0_RXDETECT_EN 0xF0000ULL
  257. /* L1 Power down; use with RXDETECT, Otherwise not used on IB side */
  258. #define INFINIPATH_SERDC0_L1PWR_DN 0xF0ULL
  259. /* kr_xgxsconfig bits */
  260. #define INFINIPATH_XGXS_RESET 0x7ULL
  261. #define INFINIPATH_XGXS_MDIOADDR_MASK 0xfULL
  262. #define INFINIPATH_XGXS_MDIOADDR_SHIFT 4
  263. #define INFINIPATH_RT_ADDR_MASK 0xFFFFFFFFFFULL /* 40 bits valid */
  264. /* TID entries (memory), HT400-only */
  265. #define INFINIPATH_RT_VALID 0x8000000000000000ULL
  266. #define INFINIPATH_RT_ADDR_SHIFT 0
  267. #define INFINIPATH_RT_BUFSIZE_MASK 0x3FFF
  268. #define INFINIPATH_RT_BUFSIZE_SHIFT 48
  269. /*
  270. * IPATH_PIO_MAXIBHDR is the max IB header size allowed for in our
  271. * PIO send buffers. This is well beyond anything currently
  272. * defined in the InfiniBand spec.
  273. */
  274. #define IPATH_PIO_MAXIBHDR 128
  275. typedef u64 ipath_err_t;
  276. /* mask of defined bits for various registers */
  277. extern u64 infinipath_i_bitsextant;
  278. extern ipath_err_t infinipath_e_bitsextant, infinipath_hwe_bitsextant;
  279. /* masks that are different in various chips, or only exist in some chips */
  280. extern u32 infinipath_i_rcvavail_mask, infinipath_i_rcvurg_mask;
  281. /*
  282. * register bits for selecting i2c direction and values, used for I2C serial
  283. * flash
  284. */
  285. extern u16 ipath_gpio_sda_num, ipath_gpio_scl_num;
  286. extern u64 ipath_gpio_sda, ipath_gpio_scl;
  287. /*
  288. * These are the infinipath general register numbers (not offsets).
  289. * The kernel registers are used directly, those beyond the kernel
  290. * registers are calculated from one of the base registers. The use of
  291. * an integer type doesn't allow type-checking as thorough as, say,
  292. * an enum but allows for better hiding of chip differences.
  293. */
  294. typedef const u16 ipath_kreg, /* infinipath general registers */
  295. ipath_creg, /* infinipath counter registers */
  296. ipath_sreg; /* kernel-only, infinipath send registers */
  297. /*
  298. * These are the chip registers common to all infinipath chips, and
  299. * used both by the kernel and the diagnostics or other user code.
  300. * They are all implemented such that 64 bit accesses work.
  301. * Some implement no more than 32 bits. Because 64 bit reads
  302. * require 2 HT cmds on opteron, we access those with 32 bit
  303. * reads for efficiency (they are written as 64 bits, since
  304. * the extra 32 bits are nearly free on writes, and it slightly reduces
  305. * complexity). The rest are all accessed as 64 bits.
  306. */
  307. struct ipath_kregs {
  308. /* These are the 32 bit group */
  309. ipath_kreg kr_control;
  310. ipath_kreg kr_counterregbase;
  311. ipath_kreg kr_intmask;
  312. ipath_kreg kr_intstatus;
  313. ipath_kreg kr_pagealign;
  314. ipath_kreg kr_portcnt;
  315. ipath_kreg kr_rcvtidbase;
  316. ipath_kreg kr_rcvtidcnt;
  317. ipath_kreg kr_rcvegrbase;
  318. ipath_kreg kr_rcvegrcnt;
  319. ipath_kreg kr_scratch;
  320. ipath_kreg kr_sendctrl;
  321. ipath_kreg kr_sendpiobufbase;
  322. ipath_kreg kr_sendpiobufcnt;
  323. ipath_kreg kr_sendpiosize;
  324. ipath_kreg kr_sendregbase;
  325. ipath_kreg kr_userregbase;
  326. /* These are the 64 bit group */
  327. ipath_kreg kr_debugport;
  328. ipath_kreg kr_debugportselect;
  329. ipath_kreg kr_errorclear;
  330. ipath_kreg kr_errormask;
  331. ipath_kreg kr_errorstatus;
  332. ipath_kreg kr_extctrl;
  333. ipath_kreg kr_extstatus;
  334. ipath_kreg kr_gpio_clear;
  335. ipath_kreg kr_gpio_mask;
  336. ipath_kreg kr_gpio_out;
  337. ipath_kreg kr_gpio_status;
  338. ipath_kreg kr_hwdiagctrl;
  339. ipath_kreg kr_hwerrclear;
  340. ipath_kreg kr_hwerrmask;
  341. ipath_kreg kr_hwerrstatus;
  342. ipath_kreg kr_ibcctrl;
  343. ipath_kreg kr_ibcstatus;
  344. ipath_kreg kr_intblocked;
  345. ipath_kreg kr_intclear;
  346. ipath_kreg kr_interruptconfig;
  347. ipath_kreg kr_mdio;
  348. ipath_kreg kr_partitionkey;
  349. ipath_kreg kr_rcvbthqp;
  350. ipath_kreg kr_rcvbufbase;
  351. ipath_kreg kr_rcvbufsize;
  352. ipath_kreg kr_rcvctrl;
  353. ipath_kreg kr_rcvhdrcnt;
  354. ipath_kreg kr_rcvhdrentsize;
  355. ipath_kreg kr_rcvhdrsize;
  356. ipath_kreg kr_rcvintmembase;
  357. ipath_kreg kr_rcvintmemsize;
  358. ipath_kreg kr_revision;
  359. ipath_kreg kr_sendbuffererror;
  360. ipath_kreg kr_sendpioavailaddr;
  361. ipath_kreg kr_serdesconfig0;
  362. ipath_kreg kr_serdesconfig1;
  363. ipath_kreg kr_serdesstatus;
  364. ipath_kreg kr_txintmembase;
  365. ipath_kreg kr_txintmemsize;
  366. ipath_kreg kr_xgxsconfig;
  367. ipath_kreg kr_ibpllcfg;
  368. /* use these two (and the following N ports) only with
  369. * ipath_k*_kreg64_port(); not *kreg64() */
  370. ipath_kreg kr_rcvhdraddr;
  371. ipath_kreg kr_rcvhdrtailaddr;
  372. /* remaining registers are not present on all types of infinipath
  373. chips */
  374. ipath_kreg kr_rcvpktledcnt;
  375. ipath_kreg kr_pcierbuftestreg0;
  376. ipath_kreg kr_pcierbuftestreg1;
  377. ipath_kreg kr_pcieq0serdesconfig0;
  378. ipath_kreg kr_pcieq0serdesconfig1;
  379. ipath_kreg kr_pcieq0serdesstatus;
  380. ipath_kreg kr_pcieq1serdesconfig0;
  381. ipath_kreg kr_pcieq1serdesconfig1;
  382. ipath_kreg kr_pcieq1serdesstatus;
  383. };
  384. struct ipath_cregs {
  385. ipath_creg cr_badformatcnt;
  386. ipath_creg cr_erricrccnt;
  387. ipath_creg cr_errlinkcnt;
  388. ipath_creg cr_errlpcrccnt;
  389. ipath_creg cr_errpkey;
  390. ipath_creg cr_errrcvflowctrlcnt;
  391. ipath_creg cr_err_rlencnt;
  392. ipath_creg cr_errslencnt;
  393. ipath_creg cr_errtidfull;
  394. ipath_creg cr_errtidvalid;
  395. ipath_creg cr_errvcrccnt;
  396. ipath_creg cr_ibstatuschange;
  397. ipath_creg cr_intcnt;
  398. ipath_creg cr_invalidrlencnt;
  399. ipath_creg cr_invalidslencnt;
  400. ipath_creg cr_lbflowstallcnt;
  401. ipath_creg cr_iblinkdowncnt;
  402. ipath_creg cr_iblinkerrrecovcnt;
  403. ipath_creg cr_ibsymbolerrcnt;
  404. ipath_creg cr_pktrcvcnt;
  405. ipath_creg cr_pktrcvflowctrlcnt;
  406. ipath_creg cr_pktsendcnt;
  407. ipath_creg cr_pktsendflowcnt;
  408. ipath_creg cr_portovflcnt;
  409. ipath_creg cr_rcvebpcnt;
  410. ipath_creg cr_rcvovflcnt;
  411. ipath_creg cr_rxdroppktcnt;
  412. ipath_creg cr_senddropped;
  413. ipath_creg cr_sendstallcnt;
  414. ipath_creg cr_sendunderruncnt;
  415. ipath_creg cr_unsupvlcnt;
  416. ipath_creg cr_wordrcvcnt;
  417. ipath_creg cr_wordsendcnt;
  418. };
  419. #endif /* _IPATH_REGISTERS_H */