t4_regs.h 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886
  1. /*
  2. * This file is part of the Chelsio T4 Ethernet driver for Linux.
  3. *
  4. * Copyright (c) 2010 Chelsio Communications, Inc. All rights reserved.
  5. *
  6. * This software is available to you under a choice of one of two
  7. * licenses. You may choose to be licensed under the terms of the GNU
  8. * General Public License (GPL) Version 2, available from the file
  9. * COPYING in the main directory of this source tree, or the
  10. * OpenIB.org BSD license below:
  11. *
  12. * Redistribution and use in source and binary forms, with or
  13. * without modification, are permitted provided that the following
  14. * conditions are met:
  15. *
  16. * - Redistributions of source code must retain the above
  17. * copyright notice, this list of conditions and the following
  18. * disclaimer.
  19. *
  20. * - Redistributions in binary form must reproduce the above
  21. * copyright notice, this list of conditions and the following
  22. * disclaimer in the documentation and/or other materials
  23. * provided with the distribution.
  24. *
  25. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  26. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  27. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  28. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  29. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  30. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  31. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  32. * SOFTWARE.
  33. */
  34. #ifndef __T4_REGS_H
  35. #define __T4_REGS_H
  36. #define MYPF_BASE 0x1b000
  37. #define MYPF_REG(reg_addr) (MYPF_BASE + (reg_addr))
  38. #define PF0_BASE 0x1e000
  39. #define PF0_REG(reg_addr) (PF0_BASE + (reg_addr))
  40. #define PF_STRIDE 0x400
  41. #define PF_BASE(idx) (PF0_BASE + (idx) * PF_STRIDE)
  42. #define PF_REG(idx, reg) (PF_BASE(idx) + (reg))
  43. #define MYPORT_BASE 0x1c000
  44. #define MYPORT_REG(reg_addr) (MYPORT_BASE + (reg_addr))
  45. #define PORT0_BASE 0x20000
  46. #define PORT0_REG(reg_addr) (PORT0_BASE + (reg_addr))
  47. #define PORT_STRIDE 0x2000
  48. #define PORT_BASE(idx) (PORT0_BASE + (idx) * PORT_STRIDE)
  49. #define PORT_REG(idx, reg) (PORT_BASE(idx) + (reg))
  50. #define EDC_STRIDE (EDC_1_BASE_ADDR - EDC_0_BASE_ADDR)
  51. #define EDC_REG(reg, idx) (reg + EDC_STRIDE * idx)
  52. #define PCIE_MEM_ACCESS_REG(reg_addr, idx) ((reg_addr) + (idx) * 8)
  53. #define PCIE_MAILBOX_REG(reg_addr, idx) ((reg_addr) + (idx) * 8)
  54. #define MC_BIST_STATUS_REG(reg_addr, idx) ((reg_addr) + (idx) * 4)
  55. #define EDC_BIST_STATUS_REG(reg_addr, idx) ((reg_addr) + (idx) * 4)
  56. #define SGE_PF_KDOORBELL 0x0
  57. #define QID_MASK 0xffff8000U
  58. #define QID_SHIFT 15
  59. #define QID(x) ((x) << QID_SHIFT)
  60. #define DBPRIO 0x00004000U
  61. #define PIDX_MASK 0x00003fffU
  62. #define PIDX_SHIFT 0
  63. #define PIDX(x) ((x) << PIDX_SHIFT)
  64. #define SGE_PF_GTS 0x4
  65. #define INGRESSQID_MASK 0xffff0000U
  66. #define INGRESSQID_SHIFT 16
  67. #define INGRESSQID(x) ((x) << INGRESSQID_SHIFT)
  68. #define TIMERREG_MASK 0x0000e000U
  69. #define TIMERREG_SHIFT 13
  70. #define TIMERREG(x) ((x) << TIMERREG_SHIFT)
  71. #define SEINTARM_MASK 0x00001000U
  72. #define SEINTARM_SHIFT 12
  73. #define SEINTARM(x) ((x) << SEINTARM_SHIFT)
  74. #define CIDXINC_MASK 0x00000fffU
  75. #define CIDXINC_SHIFT 0
  76. #define CIDXINC(x) ((x) << CIDXINC_SHIFT)
  77. #define SGE_CONTROL 0x1008
  78. #define DCASYSTYPE 0x00080000U
  79. #define RXPKTCPLMODE 0x00040000U
  80. #define EGRSTATUSPAGESIZE 0x00020000U
  81. #define PKTSHIFT_MASK 0x00001c00U
  82. #define PKTSHIFT_SHIFT 10
  83. #define PKTSHIFT(x) ((x) << PKTSHIFT_SHIFT)
  84. #define PKTSHIFT_GET(x) (((x) & PKTSHIFT_MASK) >> PKTSHIFT_SHIFT)
  85. #define INGPCIEBOUNDARY_MASK 0x00000380U
  86. #define INGPCIEBOUNDARY_SHIFT 7
  87. #define INGPCIEBOUNDARY(x) ((x) << INGPCIEBOUNDARY_SHIFT)
  88. #define INGPADBOUNDARY_MASK 0x00000070U
  89. #define INGPADBOUNDARY_SHIFT 4
  90. #define INGPADBOUNDARY(x) ((x) << INGPADBOUNDARY_SHIFT)
  91. #define INGPADBOUNDARY_GET(x) (((x) & INGPADBOUNDARY_MASK) \
  92. >> INGPADBOUNDARY_SHIFT)
  93. #define EGRPCIEBOUNDARY_MASK 0x0000000eU
  94. #define EGRPCIEBOUNDARY_SHIFT 1
  95. #define EGRPCIEBOUNDARY(x) ((x) << EGRPCIEBOUNDARY_SHIFT)
  96. #define GLOBALENABLE 0x00000001U
  97. #define SGE_HOST_PAGE_SIZE 0x100c
  98. #define HOSTPAGESIZEPF0_MASK 0x0000000fU
  99. #define HOSTPAGESIZEPF0_SHIFT 0
  100. #define HOSTPAGESIZEPF0(x) ((x) << HOSTPAGESIZEPF0_SHIFT)
  101. #define SGE_EGRESS_QUEUES_PER_PAGE_PF 0x1010
  102. #define QUEUESPERPAGEPF0_MASK 0x0000000fU
  103. #define QUEUESPERPAGEPF0_GET(x) ((x) & QUEUESPERPAGEPF0_MASK)
  104. #define SGE_INT_CAUSE1 0x1024
  105. #define SGE_INT_CAUSE2 0x1030
  106. #define SGE_INT_CAUSE3 0x103c
  107. #define ERR_FLM_DBP 0x80000000U
  108. #define ERR_FLM_IDMA1 0x40000000U
  109. #define ERR_FLM_IDMA0 0x20000000U
  110. #define ERR_FLM_HINT 0x10000000U
  111. #define ERR_PCIE_ERROR3 0x08000000U
  112. #define ERR_PCIE_ERROR2 0x04000000U
  113. #define ERR_PCIE_ERROR1 0x02000000U
  114. #define ERR_PCIE_ERROR0 0x01000000U
  115. #define ERR_TIMER_ABOVE_MAX_QID 0x00800000U
  116. #define ERR_CPL_EXCEED_IQE_SIZE 0x00400000U
  117. #define ERR_INVALID_CIDX_INC 0x00200000U
  118. #define ERR_ITP_TIME_PAUSED 0x00100000U
  119. #define ERR_CPL_OPCODE_0 0x00080000U
  120. #define ERR_DROPPED_DB 0x00040000U
  121. #define ERR_DATA_CPL_ON_HIGH_QID1 0x00020000U
  122. #define ERR_DATA_CPL_ON_HIGH_QID0 0x00010000U
  123. #define ERR_BAD_DB_PIDX3 0x00008000U
  124. #define ERR_BAD_DB_PIDX2 0x00004000U
  125. #define ERR_BAD_DB_PIDX1 0x00002000U
  126. #define ERR_BAD_DB_PIDX0 0x00001000U
  127. #define ERR_ING_PCIE_CHAN 0x00000800U
  128. #define ERR_ING_CTXT_PRIO 0x00000400U
  129. #define ERR_EGR_CTXT_PRIO 0x00000200U
  130. #define DBFIFO_HP_INT 0x00000100U
  131. #define DBFIFO_LP_INT 0x00000080U
  132. #define REG_ADDRESS_ERR 0x00000040U
  133. #define INGRESS_SIZE_ERR 0x00000020U
  134. #define EGRESS_SIZE_ERR 0x00000010U
  135. #define ERR_INV_CTXT3 0x00000008U
  136. #define ERR_INV_CTXT2 0x00000004U
  137. #define ERR_INV_CTXT1 0x00000002U
  138. #define ERR_INV_CTXT0 0x00000001U
  139. #define SGE_INT_ENABLE3 0x1040
  140. #define SGE_FL_BUFFER_SIZE0 0x1044
  141. #define SGE_FL_BUFFER_SIZE1 0x1048
  142. #define SGE_INGRESS_RX_THRESHOLD 0x10a0
  143. #define THRESHOLD_0_MASK 0x3f000000U
  144. #define THRESHOLD_0_SHIFT 24
  145. #define THRESHOLD_0(x) ((x) << THRESHOLD_0_SHIFT)
  146. #define THRESHOLD_0_GET(x) (((x) & THRESHOLD_0_MASK) >> THRESHOLD_0_SHIFT)
  147. #define THRESHOLD_1_MASK 0x003f0000U
  148. #define THRESHOLD_1_SHIFT 16
  149. #define THRESHOLD_1(x) ((x) << THRESHOLD_1_SHIFT)
  150. #define THRESHOLD_1_GET(x) (((x) & THRESHOLD_1_MASK) >> THRESHOLD_1_SHIFT)
  151. #define THRESHOLD_2_MASK 0x00003f00U
  152. #define THRESHOLD_2_SHIFT 8
  153. #define THRESHOLD_2(x) ((x) << THRESHOLD_2_SHIFT)
  154. #define THRESHOLD_2_GET(x) (((x) & THRESHOLD_2_MASK) >> THRESHOLD_2_SHIFT)
  155. #define THRESHOLD_3_MASK 0x0000003fU
  156. #define THRESHOLD_3_SHIFT 0
  157. #define THRESHOLD_3(x) ((x) << THRESHOLD_3_SHIFT)
  158. #define THRESHOLD_3_GET(x) (((x) & THRESHOLD_3_MASK) >> THRESHOLD_3_SHIFT)
  159. #define SGE_TIMER_VALUE_0_AND_1 0x10b8
  160. #define TIMERVALUE0_MASK 0xffff0000U
  161. #define TIMERVALUE0_SHIFT 16
  162. #define TIMERVALUE0(x) ((x) << TIMERVALUE0_SHIFT)
  163. #define TIMERVALUE0_GET(x) (((x) & TIMERVALUE0_MASK) >> TIMERVALUE0_SHIFT)
  164. #define TIMERVALUE1_MASK 0x0000ffffU
  165. #define TIMERVALUE1_SHIFT 0
  166. #define TIMERVALUE1(x) ((x) << TIMERVALUE1_SHIFT)
  167. #define TIMERVALUE1_GET(x) (((x) & TIMERVALUE1_MASK) >> TIMERVALUE1_SHIFT)
  168. #define SGE_TIMER_VALUE_2_AND_3 0x10bc
  169. #define SGE_TIMER_VALUE_4_AND_5 0x10c0
  170. #define SGE_DEBUG_INDEX 0x10cc
  171. #define SGE_DEBUG_DATA_HIGH 0x10d0
  172. #define SGE_DEBUG_DATA_LOW 0x10d4
  173. #define SGE_INGRESS_QUEUES_PER_PAGE_PF 0x10f4
  174. #define PCIE_PF_CLI 0x44
  175. #define PCIE_INT_CAUSE 0x3004
  176. #define UNXSPLCPLERR 0x20000000U
  177. #define PCIEPINT 0x10000000U
  178. #define PCIESINT 0x08000000U
  179. #define RPLPERR 0x04000000U
  180. #define RXWRPERR 0x02000000U
  181. #define RXCPLPERR 0x01000000U
  182. #define PIOTAGPERR 0x00800000U
  183. #define MATAGPERR 0x00400000U
  184. #define INTXCLRPERR 0x00200000U
  185. #define FIDPERR 0x00100000U
  186. #define CFGSNPPERR 0x00080000U
  187. #define HRSPPERR 0x00040000U
  188. #define HREQPERR 0x00020000U
  189. #define HCNTPERR 0x00010000U
  190. #define DRSPPERR 0x00008000U
  191. #define DREQPERR 0x00004000U
  192. #define DCNTPERR 0x00002000U
  193. #define CRSPPERR 0x00001000U
  194. #define CREQPERR 0x00000800U
  195. #define CCNTPERR 0x00000400U
  196. #define TARTAGPERR 0x00000200U
  197. #define PIOREQPERR 0x00000100U
  198. #define PIOCPLPERR 0x00000080U
  199. #define MSIXDIPERR 0x00000040U
  200. #define MSIXDATAPERR 0x00000020U
  201. #define MSIXADDRHPERR 0x00000010U
  202. #define MSIXADDRLPERR 0x00000008U
  203. #define MSIDATAPERR 0x00000004U
  204. #define MSIADDRHPERR 0x00000002U
  205. #define MSIADDRLPERR 0x00000001U
  206. #define PCIE_NONFAT_ERR 0x3010
  207. #define PCIE_MEM_ACCESS_BASE_WIN 0x3068
  208. #define PCIEOFST_MASK 0xfffffc00U
  209. #define BIR_MASK 0x00000300U
  210. #define BIR_SHIFT 8
  211. #define BIR(x) ((x) << BIR_SHIFT)
  212. #define WINDOW_MASK 0x000000ffU
  213. #define WINDOW_SHIFT 0
  214. #define WINDOW(x) ((x) << WINDOW_SHIFT)
  215. #define PCIE_MEM_ACCESS_OFFSET 0x306c
  216. #define PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS 0x5908
  217. #define RNPP 0x80000000U
  218. #define RPCP 0x20000000U
  219. #define RCIP 0x08000000U
  220. #define RCCP 0x04000000U
  221. #define RFTP 0x00800000U
  222. #define PTRP 0x00100000U
  223. #define PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS 0x59a4
  224. #define TPCP 0x40000000U
  225. #define TNPP 0x20000000U
  226. #define TFTP 0x10000000U
  227. #define TCAP 0x08000000U
  228. #define TCIP 0x04000000U
  229. #define RCAP 0x02000000U
  230. #define PLUP 0x00800000U
  231. #define PLDN 0x00400000U
  232. #define OTDD 0x00200000U
  233. #define GTRP 0x00100000U
  234. #define RDPE 0x00040000U
  235. #define TDCE 0x00020000U
  236. #define TDUE 0x00010000U
  237. #define MC_INT_CAUSE 0x7518
  238. #define ECC_UE_INT_CAUSE 0x00000004U
  239. #define ECC_CE_INT_CAUSE 0x00000002U
  240. #define PERR_INT_CAUSE 0x00000001U
  241. #define MC_ECC_STATUS 0x751c
  242. #define ECC_CECNT_MASK 0xffff0000U
  243. #define ECC_CECNT_SHIFT 16
  244. #define ECC_CECNT(x) ((x) << ECC_CECNT_SHIFT)
  245. #define ECC_CECNT_GET(x) (((x) & ECC_CECNT_MASK) >> ECC_CECNT_SHIFT)
  246. #define ECC_UECNT_MASK 0x0000ffffU
  247. #define ECC_UECNT_SHIFT 0
  248. #define ECC_UECNT(x) ((x) << ECC_UECNT_SHIFT)
  249. #define ECC_UECNT_GET(x) (((x) & ECC_UECNT_MASK) >> ECC_UECNT_SHIFT)
  250. #define MC_BIST_CMD 0x7600
  251. #define START_BIST 0x80000000U
  252. #define BIST_CMD_GAP_MASK 0x0000ff00U
  253. #define BIST_CMD_GAP_SHIFT 8
  254. #define BIST_CMD_GAP(x) ((x) << BIST_CMD_GAP_SHIFT)
  255. #define BIST_OPCODE_MASK 0x00000003U
  256. #define BIST_OPCODE_SHIFT 0
  257. #define BIST_OPCODE(x) ((x) << BIST_OPCODE_SHIFT)
  258. #define MC_BIST_CMD_ADDR 0x7604
  259. #define MC_BIST_CMD_LEN 0x7608
  260. #define MC_BIST_DATA_PATTERN 0x760c
  261. #define BIST_DATA_TYPE_MASK 0x0000000fU
  262. #define BIST_DATA_TYPE_SHIFT 0
  263. #define BIST_DATA_TYPE(x) ((x) << BIST_DATA_TYPE_SHIFT)
  264. #define MC_BIST_STATUS_RDATA 0x7688
  265. #define MA_EXT_MEMORY_BAR 0x77c8
  266. #define EXT_MEM_SIZE_MASK 0x00000fffU
  267. #define EXT_MEM_SIZE_SHIFT 0
  268. #define EXT_MEM_SIZE_GET(x) (((x) & EXT_MEM_SIZE_MASK) >> EXT_MEM_SIZE_SHIFT)
  269. #define MA_TARGET_MEM_ENABLE 0x77d8
  270. #define EXT_MEM_ENABLE 0x00000004U
  271. #define EDRAM1_ENABLE 0x00000002U
  272. #define EDRAM0_ENABLE 0x00000001U
  273. #define MA_INT_CAUSE 0x77e0
  274. #define MEM_PERR_INT_CAUSE 0x00000002U
  275. #define MEM_WRAP_INT_CAUSE 0x00000001U
  276. #define MA_INT_WRAP_STATUS 0x77e4
  277. #define MEM_WRAP_ADDRESS_MASK 0xfffffff0U
  278. #define MEM_WRAP_ADDRESS_SHIFT 4
  279. #define MEM_WRAP_ADDRESS_GET(x) (((x) & MEM_WRAP_ADDRESS_MASK) >> MEM_WRAP_ADDRESS_SHIFT)
  280. #define MEM_WRAP_CLIENT_NUM_MASK 0x0000000fU
  281. #define MEM_WRAP_CLIENT_NUM_SHIFT 0
  282. #define MEM_WRAP_CLIENT_NUM_GET(x) (((x) & MEM_WRAP_CLIENT_NUM_MASK) >> MEM_WRAP_CLIENT_NUM_SHIFT)
  283. #define MA_PARITY_ERROR_STATUS 0x77f4
  284. #define EDC_0_BASE_ADDR 0x7900
  285. #define EDC_BIST_CMD 0x7904
  286. #define EDC_BIST_CMD_ADDR 0x7908
  287. #define EDC_BIST_CMD_LEN 0x790c
  288. #define EDC_BIST_DATA_PATTERN 0x7910
  289. #define EDC_BIST_STATUS_RDATA 0x7928
  290. #define EDC_INT_CAUSE 0x7978
  291. #define ECC_UE_PAR 0x00000020U
  292. #define ECC_CE_PAR 0x00000010U
  293. #define PERR_PAR_CAUSE 0x00000008U
  294. #define EDC_ECC_STATUS 0x797c
  295. #define EDC_1_BASE_ADDR 0x7980
  296. #define CIM_BOOT_CFG 0x7b00
  297. #define BOOTADDR_MASK 0xffffff00U
  298. #define CIM_PF_MAILBOX_DATA 0x240
  299. #define CIM_PF_MAILBOX_CTRL 0x280
  300. #define MBMSGVALID 0x00000008U
  301. #define MBINTREQ 0x00000004U
  302. #define MBOWNER_MASK 0x00000003U
  303. #define MBOWNER_SHIFT 0
  304. #define MBOWNER(x) ((x) << MBOWNER_SHIFT)
  305. #define MBOWNER_GET(x) (((x) & MBOWNER_MASK) >> MBOWNER_SHIFT)
  306. #define CIM_PF_HOST_INT_CAUSE 0x28c
  307. #define MBMSGRDYINT 0x00080000U
  308. #define CIM_HOST_INT_CAUSE 0x7b2c
  309. #define TIEQOUTPARERRINT 0x00100000U
  310. #define TIEQINPARERRINT 0x00080000U
  311. #define MBHOSTPARERR 0x00040000U
  312. #define MBUPPARERR 0x00020000U
  313. #define IBQPARERR 0x0001f800U
  314. #define IBQTP0PARERR 0x00010000U
  315. #define IBQTP1PARERR 0x00008000U
  316. #define IBQULPPARERR 0x00004000U
  317. #define IBQSGELOPARERR 0x00002000U
  318. #define IBQSGEHIPARERR 0x00001000U
  319. #define IBQNCSIPARERR 0x00000800U
  320. #define OBQPARERR 0x000007e0U
  321. #define OBQULP0PARERR 0x00000400U
  322. #define OBQULP1PARERR 0x00000200U
  323. #define OBQULP2PARERR 0x00000100U
  324. #define OBQULP3PARERR 0x00000080U
  325. #define OBQSGEPARERR 0x00000040U
  326. #define OBQNCSIPARERR 0x00000020U
  327. #define PREFDROPINT 0x00000002U
  328. #define UPACCNONZERO 0x00000001U
  329. #define CIM_HOST_UPACC_INT_CAUSE 0x7b34
  330. #define EEPROMWRINT 0x40000000U
  331. #define TIMEOUTMAINT 0x20000000U
  332. #define TIMEOUTINT 0x10000000U
  333. #define RSPOVRLOOKUPINT 0x08000000U
  334. #define REQOVRLOOKUPINT 0x04000000U
  335. #define BLKWRPLINT 0x02000000U
  336. #define BLKRDPLINT 0x01000000U
  337. #define SGLWRPLINT 0x00800000U
  338. #define SGLRDPLINT 0x00400000U
  339. #define BLKWRCTLINT 0x00200000U
  340. #define BLKRDCTLINT 0x00100000U
  341. #define SGLWRCTLINT 0x00080000U
  342. #define SGLRDCTLINT 0x00040000U
  343. #define BLKWREEPROMINT 0x00020000U
  344. #define BLKRDEEPROMINT 0x00010000U
  345. #define SGLWREEPROMINT 0x00008000U
  346. #define SGLRDEEPROMINT 0x00004000U
  347. #define BLKWRFLASHINT 0x00002000U
  348. #define BLKRDFLASHINT 0x00001000U
  349. #define SGLWRFLASHINT 0x00000800U
  350. #define SGLRDFLASHINT 0x00000400U
  351. #define BLKWRBOOTINT 0x00000200U
  352. #define BLKRDBOOTINT 0x00000100U
  353. #define SGLWRBOOTINT 0x00000080U
  354. #define SGLRDBOOTINT 0x00000040U
  355. #define ILLWRBEINT 0x00000020U
  356. #define ILLRDBEINT 0x00000010U
  357. #define ILLRDINT 0x00000008U
  358. #define ILLWRINT 0x00000004U
  359. #define ILLTRANSINT 0x00000002U
  360. #define RSVDSPACEINT 0x00000001U
  361. #define TP_OUT_CONFIG 0x7d04
  362. #define VLANEXTENABLE_MASK 0x0000f000U
  363. #define VLANEXTENABLE_SHIFT 12
  364. #define TP_PARA_REG2 0x7d68
  365. #define MAXRXDATA_MASK 0xffff0000U
  366. #define MAXRXDATA_SHIFT 16
  367. #define MAXRXDATA_GET(x) (((x) & MAXRXDATA_MASK) >> MAXRXDATA_SHIFT)
  368. #define TP_TIMER_RESOLUTION 0x7d90
  369. #define TIMERRESOLUTION_MASK 0x00ff0000U
  370. #define TIMERRESOLUTION_SHIFT 16
  371. #define TIMERRESOLUTION_GET(x) (((x) & TIMERRESOLUTION_MASK) >> TIMERRESOLUTION_SHIFT)
  372. #define TP_SHIFT_CNT 0x7dc0
  373. #define TP_CCTRL_TABLE 0x7ddc
  374. #define TP_MTU_TABLE 0x7de4
  375. #define MTUINDEX_MASK 0xff000000U
  376. #define MTUINDEX_SHIFT 24
  377. #define MTUINDEX(x) ((x) << MTUINDEX_SHIFT)
  378. #define MTUWIDTH_MASK 0x000f0000U
  379. #define MTUWIDTH_SHIFT 16
  380. #define MTUWIDTH(x) ((x) << MTUWIDTH_SHIFT)
  381. #define MTUWIDTH_GET(x) (((x) & MTUWIDTH_MASK) >> MTUWIDTH_SHIFT)
  382. #define MTUVALUE_MASK 0x00003fffU
  383. #define MTUVALUE_SHIFT 0
  384. #define MTUVALUE(x) ((x) << MTUVALUE_SHIFT)
  385. #define MTUVALUE_GET(x) (((x) & MTUVALUE_MASK) >> MTUVALUE_SHIFT)
  386. #define TP_RSS_LKP_TABLE 0x7dec
  387. #define LKPTBLROWVLD 0x80000000U
  388. #define LKPTBLQUEUE1_MASK 0x000ffc00U
  389. #define LKPTBLQUEUE1_SHIFT 10
  390. #define LKPTBLQUEUE1(x) ((x) << LKPTBLQUEUE1_SHIFT)
  391. #define LKPTBLQUEUE1_GET(x) (((x) & LKPTBLQUEUE1_MASK) >> LKPTBLQUEUE1_SHIFT)
  392. #define LKPTBLQUEUE0_MASK 0x000003ffU
  393. #define LKPTBLQUEUE0_SHIFT 0
  394. #define LKPTBLQUEUE0(x) ((x) << LKPTBLQUEUE0_SHIFT)
  395. #define LKPTBLQUEUE0_GET(x) (((x) & LKPTBLQUEUE0_MASK) >> LKPTBLQUEUE0_SHIFT)
  396. #define TP_PIO_ADDR 0x7e40
  397. #define TP_PIO_DATA 0x7e44
  398. #define TP_MIB_INDEX 0x7e50
  399. #define TP_MIB_DATA 0x7e54
  400. #define TP_INT_CAUSE 0x7e74
  401. #define FLMTXFLSTEMPTY 0x40000000U
  402. #define TP_INGRESS_CONFIG 0x141
  403. #define VNIC 0x00000800U
  404. #define CSUM_HAS_PSEUDO_HDR 0x00000400U
  405. #define RM_OVLAN 0x00000200U
  406. #define LOOKUPEVERYPKT 0x00000100U
  407. #define TP_MIB_MAC_IN_ERR_0 0x0
  408. #define TP_MIB_TCP_OUT_RST 0xc
  409. #define TP_MIB_TCP_IN_SEG_HI 0x10
  410. #define TP_MIB_TCP_IN_SEG_LO 0x11
  411. #define TP_MIB_TCP_OUT_SEG_HI 0x12
  412. #define TP_MIB_TCP_OUT_SEG_LO 0x13
  413. #define TP_MIB_TCP_RXT_SEG_HI 0x14
  414. #define TP_MIB_TCP_RXT_SEG_LO 0x15
  415. #define TP_MIB_TNL_CNG_DROP_0 0x18
  416. #define TP_MIB_TCP_V6IN_ERR_0 0x28
  417. #define TP_MIB_TCP_V6OUT_RST 0x2c
  418. #define TP_MIB_OFD_ARP_DROP 0x36
  419. #define TP_MIB_TNL_DROP_0 0x44
  420. #define TP_MIB_OFD_VLN_DROP_0 0x58
  421. #define ULP_TX_INT_CAUSE 0x8dcc
  422. #define PBL_BOUND_ERR_CH3 0x80000000U
  423. #define PBL_BOUND_ERR_CH2 0x40000000U
  424. #define PBL_BOUND_ERR_CH1 0x20000000U
  425. #define PBL_BOUND_ERR_CH0 0x10000000U
  426. #define PM_RX_INT_CAUSE 0x8fdc
  427. #define ZERO_E_CMD_ERROR 0x00400000U
  428. #define PMRX_FRAMING_ERROR 0x003ffff0U
  429. #define OCSPI_PAR_ERROR 0x00000008U
  430. #define DB_OPTIONS_PAR_ERROR 0x00000004U
  431. #define IESPI_PAR_ERROR 0x00000002U
  432. #define E_PCMD_PAR_ERROR 0x00000001U
  433. #define PM_TX_INT_CAUSE 0x8ffc
  434. #define PCMD_LEN_OVFL0 0x80000000U
  435. #define PCMD_LEN_OVFL1 0x40000000U
  436. #define PCMD_LEN_OVFL2 0x20000000U
  437. #define ZERO_C_CMD_ERROR 0x10000000U
  438. #define PMTX_FRAMING_ERROR 0x0ffffff0U
  439. #define OESPI_PAR_ERROR 0x00000008U
  440. #define ICSPI_PAR_ERROR 0x00000002U
  441. #define C_PCMD_PAR_ERROR 0x00000001U
  442. #define MPS_PORT_STAT_TX_PORT_BYTES_L 0x400
  443. #define MPS_PORT_STAT_TX_PORT_BYTES_H 0x404
  444. #define MPS_PORT_STAT_TX_PORT_FRAMES_L 0x408
  445. #define MPS_PORT_STAT_TX_PORT_FRAMES_H 0x40c
  446. #define MPS_PORT_STAT_TX_PORT_BCAST_L 0x410
  447. #define MPS_PORT_STAT_TX_PORT_BCAST_H 0x414
  448. #define MPS_PORT_STAT_TX_PORT_MCAST_L 0x418
  449. #define MPS_PORT_STAT_TX_PORT_MCAST_H 0x41c
  450. #define MPS_PORT_STAT_TX_PORT_UCAST_L 0x420
  451. #define MPS_PORT_STAT_TX_PORT_UCAST_H 0x424
  452. #define MPS_PORT_STAT_TX_PORT_ERROR_L 0x428
  453. #define MPS_PORT_STAT_TX_PORT_ERROR_H 0x42c
  454. #define MPS_PORT_STAT_TX_PORT_64B_L 0x430
  455. #define MPS_PORT_STAT_TX_PORT_64B_H 0x434
  456. #define MPS_PORT_STAT_TX_PORT_65B_127B_L 0x438
  457. #define MPS_PORT_STAT_TX_PORT_65B_127B_H 0x43c
  458. #define MPS_PORT_STAT_TX_PORT_128B_255B_L 0x440
  459. #define MPS_PORT_STAT_TX_PORT_128B_255B_H 0x444
  460. #define MPS_PORT_STAT_TX_PORT_256B_511B_L 0x448
  461. #define MPS_PORT_STAT_TX_PORT_256B_511B_H 0x44c
  462. #define MPS_PORT_STAT_TX_PORT_512B_1023B_L 0x450
  463. #define MPS_PORT_STAT_TX_PORT_512B_1023B_H 0x454
  464. #define MPS_PORT_STAT_TX_PORT_1024B_1518B_L 0x458
  465. #define MPS_PORT_STAT_TX_PORT_1024B_1518B_H 0x45c
  466. #define MPS_PORT_STAT_TX_PORT_1519B_MAX_L 0x460
  467. #define MPS_PORT_STAT_TX_PORT_1519B_MAX_H 0x464
  468. #define MPS_PORT_STAT_TX_PORT_DROP_L 0x468
  469. #define MPS_PORT_STAT_TX_PORT_DROP_H 0x46c
  470. #define MPS_PORT_STAT_TX_PORT_PAUSE_L 0x470
  471. #define MPS_PORT_STAT_TX_PORT_PAUSE_H 0x474
  472. #define MPS_PORT_STAT_TX_PORT_PPP0_L 0x478
  473. #define MPS_PORT_STAT_TX_PORT_PPP0_H 0x47c
  474. #define MPS_PORT_STAT_TX_PORT_PPP1_L 0x480
  475. #define MPS_PORT_STAT_TX_PORT_PPP1_H 0x484
  476. #define MPS_PORT_STAT_TX_PORT_PPP2_L 0x488
  477. #define MPS_PORT_STAT_TX_PORT_PPP2_H 0x48c
  478. #define MPS_PORT_STAT_TX_PORT_PPP3_L 0x490
  479. #define MPS_PORT_STAT_TX_PORT_PPP3_H 0x494
  480. #define MPS_PORT_STAT_TX_PORT_PPP4_L 0x498
  481. #define MPS_PORT_STAT_TX_PORT_PPP4_H 0x49c
  482. #define MPS_PORT_STAT_TX_PORT_PPP5_L 0x4a0
  483. #define MPS_PORT_STAT_TX_PORT_PPP5_H 0x4a4
  484. #define MPS_PORT_STAT_TX_PORT_PPP6_L 0x4a8
  485. #define MPS_PORT_STAT_TX_PORT_PPP6_H 0x4ac
  486. #define MPS_PORT_STAT_TX_PORT_PPP7_L 0x4b0
  487. #define MPS_PORT_STAT_TX_PORT_PPP7_H 0x4b4
  488. #define MPS_PORT_STAT_LB_PORT_BYTES_L 0x4c0
  489. #define MPS_PORT_STAT_LB_PORT_BYTES_H 0x4c4
  490. #define MPS_PORT_STAT_LB_PORT_FRAMES_L 0x4c8
  491. #define MPS_PORT_STAT_LB_PORT_FRAMES_H 0x4cc
  492. #define MPS_PORT_STAT_LB_PORT_BCAST_L 0x4d0
  493. #define MPS_PORT_STAT_LB_PORT_BCAST_H 0x4d4
  494. #define MPS_PORT_STAT_LB_PORT_MCAST_L 0x4d8
  495. #define MPS_PORT_STAT_LB_PORT_MCAST_H 0x4dc
  496. #define MPS_PORT_STAT_LB_PORT_UCAST_L 0x4e0
  497. #define MPS_PORT_STAT_LB_PORT_UCAST_H 0x4e4
  498. #define MPS_PORT_STAT_LB_PORT_ERROR_L 0x4e8
  499. #define MPS_PORT_STAT_LB_PORT_ERROR_H 0x4ec
  500. #define MPS_PORT_STAT_LB_PORT_64B_L 0x4f0
  501. #define MPS_PORT_STAT_LB_PORT_64B_H 0x4f4
  502. #define MPS_PORT_STAT_LB_PORT_65B_127B_L 0x4f8
  503. #define MPS_PORT_STAT_LB_PORT_65B_127B_H 0x4fc
  504. #define MPS_PORT_STAT_LB_PORT_128B_255B_L 0x500
  505. #define MPS_PORT_STAT_LB_PORT_128B_255B_H 0x504
  506. #define MPS_PORT_STAT_LB_PORT_256B_511B_L 0x508
  507. #define MPS_PORT_STAT_LB_PORT_256B_511B_H 0x50c
  508. #define MPS_PORT_STAT_LB_PORT_512B_1023B_L 0x510
  509. #define MPS_PORT_STAT_LB_PORT_512B_1023B_H 0x514
  510. #define MPS_PORT_STAT_LB_PORT_1024B_1518B_L 0x518
  511. #define MPS_PORT_STAT_LB_PORT_1024B_1518B_H 0x51c
  512. #define MPS_PORT_STAT_LB_PORT_1519B_MAX_L 0x520
  513. #define MPS_PORT_STAT_LB_PORT_1519B_MAX_H 0x524
  514. #define MPS_PORT_STAT_LB_PORT_DROP_FRAMES 0x528
  515. #define MPS_PORT_STAT_RX_PORT_BYTES_L 0x540
  516. #define MPS_PORT_STAT_RX_PORT_BYTES_H 0x544
  517. #define MPS_PORT_STAT_RX_PORT_FRAMES_L 0x548
  518. #define MPS_PORT_STAT_RX_PORT_FRAMES_H 0x54c
  519. #define MPS_PORT_STAT_RX_PORT_BCAST_L 0x550
  520. #define MPS_PORT_STAT_RX_PORT_BCAST_H 0x554
  521. #define MPS_PORT_STAT_RX_PORT_MCAST_L 0x558
  522. #define MPS_PORT_STAT_RX_PORT_MCAST_H 0x55c
  523. #define MPS_PORT_STAT_RX_PORT_UCAST_L 0x560
  524. #define MPS_PORT_STAT_RX_PORT_UCAST_H 0x564
  525. #define MPS_PORT_STAT_RX_PORT_MTU_ERROR_L 0x568
  526. #define MPS_PORT_STAT_RX_PORT_MTU_ERROR_H 0x56c
  527. #define MPS_PORT_STAT_RX_PORT_MTU_CRC_ERROR_L 0x570
  528. #define MPS_PORT_STAT_RX_PORT_MTU_CRC_ERROR_H 0x574
  529. #define MPS_PORT_STAT_RX_PORT_CRC_ERROR_L 0x578
  530. #define MPS_PORT_STAT_RX_PORT_CRC_ERROR_H 0x57c
  531. #define MPS_PORT_STAT_RX_PORT_LEN_ERROR_L 0x580
  532. #define MPS_PORT_STAT_RX_PORT_LEN_ERROR_H 0x584
  533. #define MPS_PORT_STAT_RX_PORT_SYM_ERROR_L 0x588
  534. #define MPS_PORT_STAT_RX_PORT_SYM_ERROR_H 0x58c
  535. #define MPS_PORT_STAT_RX_PORT_64B_L 0x590
  536. #define MPS_PORT_STAT_RX_PORT_64B_H 0x594
  537. #define MPS_PORT_STAT_RX_PORT_65B_127B_L 0x598
  538. #define MPS_PORT_STAT_RX_PORT_65B_127B_H 0x59c
  539. #define MPS_PORT_STAT_RX_PORT_128B_255B_L 0x5a0
  540. #define MPS_PORT_STAT_RX_PORT_128B_255B_H 0x5a4
  541. #define MPS_PORT_STAT_RX_PORT_256B_511B_L 0x5a8
  542. #define MPS_PORT_STAT_RX_PORT_256B_511B_H 0x5ac
  543. #define MPS_PORT_STAT_RX_PORT_512B_1023B_L 0x5b0
  544. #define MPS_PORT_STAT_RX_PORT_512B_1023B_H 0x5b4
  545. #define MPS_PORT_STAT_RX_PORT_1024B_1518B_L 0x5b8
  546. #define MPS_PORT_STAT_RX_PORT_1024B_1518B_H 0x5bc
  547. #define MPS_PORT_STAT_RX_PORT_1519B_MAX_L 0x5c0
  548. #define MPS_PORT_STAT_RX_PORT_1519B_MAX_H 0x5c4
  549. #define MPS_PORT_STAT_RX_PORT_PAUSE_L 0x5c8
  550. #define MPS_PORT_STAT_RX_PORT_PAUSE_H 0x5cc
  551. #define MPS_PORT_STAT_RX_PORT_PPP0_L 0x5d0
  552. #define MPS_PORT_STAT_RX_PORT_PPP0_H 0x5d4
  553. #define MPS_PORT_STAT_RX_PORT_PPP1_L 0x5d8
  554. #define MPS_PORT_STAT_RX_PORT_PPP1_H 0x5dc
  555. #define MPS_PORT_STAT_RX_PORT_PPP2_L 0x5e0
  556. #define MPS_PORT_STAT_RX_PORT_PPP2_H 0x5e4
  557. #define MPS_PORT_STAT_RX_PORT_PPP3_L 0x5e8
  558. #define MPS_PORT_STAT_RX_PORT_PPP3_H 0x5ec
  559. #define MPS_PORT_STAT_RX_PORT_PPP4_L 0x5f0
  560. #define MPS_PORT_STAT_RX_PORT_PPP4_H 0x5f4
  561. #define MPS_PORT_STAT_RX_PORT_PPP5_L 0x5f8
  562. #define MPS_PORT_STAT_RX_PORT_PPP5_H 0x5fc
  563. #define MPS_PORT_STAT_RX_PORT_PPP6_L 0x600
  564. #define MPS_PORT_STAT_RX_PORT_PPP6_H 0x604
  565. #define MPS_PORT_STAT_RX_PORT_PPP7_L 0x608
  566. #define MPS_PORT_STAT_RX_PORT_PPP7_H 0x60c
  567. #define MPS_PORT_STAT_RX_PORT_LESS_64B_L 0x610
  568. #define MPS_PORT_STAT_RX_PORT_LESS_64B_H 0x614
  569. #define MPS_CMN_CTL 0x9000
  570. #define NUMPORTS_MASK 0x00000003U
  571. #define NUMPORTS_SHIFT 0
  572. #define NUMPORTS_GET(x) (((x) & NUMPORTS_MASK) >> NUMPORTS_SHIFT)
  573. #define MPS_INT_CAUSE 0x9008
  574. #define STATINT 0x00000020U
  575. #define TXINT 0x00000010U
  576. #define RXINT 0x00000008U
  577. #define TRCINT 0x00000004U
  578. #define CLSINT 0x00000002U
  579. #define PLINT 0x00000001U
  580. #define MPS_TX_INT_CAUSE 0x9408
  581. #define PORTERR 0x00010000U
  582. #define FRMERR 0x00008000U
  583. #define SECNTERR 0x00004000U
  584. #define BUBBLE 0x00002000U
  585. #define TXDESCFIFO 0x00001e00U
  586. #define TXDATAFIFO 0x000001e0U
  587. #define NCSIFIFO 0x00000010U
  588. #define TPFIFO 0x0000000fU
  589. #define MPS_STAT_PERR_INT_CAUSE_SRAM 0x9614
  590. #define MPS_STAT_PERR_INT_CAUSE_TX_FIFO 0x9620
  591. #define MPS_STAT_PERR_INT_CAUSE_RX_FIFO 0x962c
  592. #define MPS_STAT_RX_BG_0_MAC_DROP_FRAME_L 0x9640
  593. #define MPS_STAT_RX_BG_0_MAC_DROP_FRAME_H 0x9644
  594. #define MPS_STAT_RX_BG_1_MAC_DROP_FRAME_L 0x9648
  595. #define MPS_STAT_RX_BG_1_MAC_DROP_FRAME_H 0x964c
  596. #define MPS_STAT_RX_BG_2_MAC_DROP_FRAME_L 0x9650
  597. #define MPS_STAT_RX_BG_2_MAC_DROP_FRAME_H 0x9654
  598. #define MPS_STAT_RX_BG_3_MAC_DROP_FRAME_L 0x9658
  599. #define MPS_STAT_RX_BG_3_MAC_DROP_FRAME_H 0x965c
  600. #define MPS_STAT_RX_BG_0_LB_DROP_FRAME_L 0x9660
  601. #define MPS_STAT_RX_BG_0_LB_DROP_FRAME_H 0x9664
  602. #define MPS_STAT_RX_BG_1_LB_DROP_FRAME_L 0x9668
  603. #define MPS_STAT_RX_BG_1_LB_DROP_FRAME_H 0x966c
  604. #define MPS_STAT_RX_BG_2_LB_DROP_FRAME_L 0x9670
  605. #define MPS_STAT_RX_BG_2_LB_DROP_FRAME_H 0x9674
  606. #define MPS_STAT_RX_BG_3_LB_DROP_FRAME_L 0x9678
  607. #define MPS_STAT_RX_BG_3_LB_DROP_FRAME_H 0x967c
  608. #define MPS_STAT_RX_BG_0_MAC_TRUNC_FRAME_L 0x9680
  609. #define MPS_STAT_RX_BG_0_MAC_TRUNC_FRAME_H 0x9684
  610. #define MPS_STAT_RX_BG_1_MAC_TRUNC_FRAME_L 0x9688
  611. #define MPS_STAT_RX_BG_1_MAC_TRUNC_FRAME_H 0x968c
  612. #define MPS_STAT_RX_BG_2_MAC_TRUNC_FRAME_L 0x9690
  613. #define MPS_STAT_RX_BG_2_MAC_TRUNC_FRAME_H 0x9694
  614. #define MPS_STAT_RX_BG_3_MAC_TRUNC_FRAME_L 0x9698
  615. #define MPS_STAT_RX_BG_3_MAC_TRUNC_FRAME_H 0x969c
  616. #define MPS_STAT_RX_BG_0_LB_TRUNC_FRAME_L 0x96a0
  617. #define MPS_STAT_RX_BG_0_LB_TRUNC_FRAME_H 0x96a4
  618. #define MPS_STAT_RX_BG_1_LB_TRUNC_FRAME_L 0x96a8
  619. #define MPS_STAT_RX_BG_1_LB_TRUNC_FRAME_H 0x96ac
  620. #define MPS_STAT_RX_BG_2_LB_TRUNC_FRAME_L 0x96b0
  621. #define MPS_STAT_RX_BG_2_LB_TRUNC_FRAME_H 0x96b4
  622. #define MPS_STAT_RX_BG_3_LB_TRUNC_FRAME_L 0x96b8
  623. #define MPS_STAT_RX_BG_3_LB_TRUNC_FRAME_H 0x96bc
  624. #define MPS_TRC_CFG 0x9800
  625. #define TRCFIFOEMPTY 0x00000010U
  626. #define TRCIGNOREDROPINPUT 0x00000008U
  627. #define TRCKEEPDUPLICATES 0x00000004U
  628. #define TRCEN 0x00000002U
  629. #define TRCMULTIFILTER 0x00000001U
  630. #define MPS_TRC_RSS_CONTROL 0x9808
  631. #define RSSCONTROL_MASK 0x00ff0000U
  632. #define RSSCONTROL_SHIFT 16
  633. #define RSSCONTROL(x) ((x) << RSSCONTROL_SHIFT)
  634. #define QUEUENUMBER_MASK 0x0000ffffU
  635. #define QUEUENUMBER_SHIFT 0
  636. #define QUEUENUMBER(x) ((x) << QUEUENUMBER_SHIFT)
  637. #define MPS_TRC_FILTER_MATCH_CTL_A 0x9810
  638. #define TFINVERTMATCH 0x01000000U
  639. #define TFPKTTOOLARGE 0x00800000U
  640. #define TFEN 0x00400000U
  641. #define TFPORT_MASK 0x003c0000U
  642. #define TFPORT_SHIFT 18
  643. #define TFPORT(x) ((x) << TFPORT_SHIFT)
  644. #define TFPORT_GET(x) (((x) & TFPORT_MASK) >> TFPORT_SHIFT)
  645. #define TFDROP 0x00020000U
  646. #define TFSOPEOPERR 0x00010000U
  647. #define TFLENGTH_MASK 0x00001f00U
  648. #define TFLENGTH_SHIFT 8
  649. #define TFLENGTH(x) ((x) << TFLENGTH_SHIFT)
  650. #define TFLENGTH_GET(x) (((x) & TFLENGTH_MASK) >> TFLENGTH_SHIFT)
  651. #define TFOFFSET_MASK 0x0000001fU
  652. #define TFOFFSET_SHIFT 0
  653. #define TFOFFSET(x) ((x) << TFOFFSET_SHIFT)
  654. #define TFOFFSET_GET(x) (((x) & TFOFFSET_MASK) >> TFOFFSET_SHIFT)
  655. #define MPS_TRC_FILTER_MATCH_CTL_B 0x9820
  656. #define TFMINPKTSIZE_MASK 0x01ff0000U
  657. #define TFMINPKTSIZE_SHIFT 16
  658. #define TFMINPKTSIZE(x) ((x) << TFMINPKTSIZE_SHIFT)
  659. #define TFMINPKTSIZE_GET(x) (((x) & TFMINPKTSIZE_MASK) >> TFMINPKTSIZE_SHIFT)
  660. #define TFCAPTUREMAX_MASK 0x00003fffU
  661. #define TFCAPTUREMAX_SHIFT 0
  662. #define TFCAPTUREMAX(x) ((x) << TFCAPTUREMAX_SHIFT)
  663. #define TFCAPTUREMAX_GET(x) (((x) & TFCAPTUREMAX_MASK) >> TFCAPTUREMAX_SHIFT)
  664. #define MPS_TRC_INT_CAUSE 0x985c
  665. #define MISCPERR 0x00000100U
  666. #define PKTFIFO 0x000000f0U
  667. #define FILTMEM 0x0000000fU
  668. #define MPS_TRC_FILTER0_MATCH 0x9c00
  669. #define MPS_TRC_FILTER0_DONT_CARE 0x9c80
  670. #define MPS_TRC_FILTER1_MATCH 0x9d00
  671. #define MPS_CLS_INT_CAUSE 0xd028
  672. #define PLERRENB 0x00000008U
  673. #define HASHSRAM 0x00000004U
  674. #define MATCHTCAM 0x00000002U
  675. #define MATCHSRAM 0x00000001U
  676. #define MPS_RX_PERR_INT_CAUSE 0x11074
  677. #define CPL_INTR_CAUSE 0x19054
  678. #define CIM_OP_MAP_PERR 0x00000020U
  679. #define CIM_OVFL_ERROR 0x00000010U
  680. #define TP_FRAMING_ERROR 0x00000008U
  681. #define SGE_FRAMING_ERROR 0x00000004U
  682. #define CIM_FRAMING_ERROR 0x00000002U
  683. #define ZERO_SWITCH_ERROR 0x00000001U
  684. #define SMB_INT_CAUSE 0x19090
  685. #define MSTTXFIFOPARINT 0x00200000U
  686. #define MSTRXFIFOPARINT 0x00100000U
  687. #define SLVFIFOPARINT 0x00080000U
  688. #define ULP_RX_INT_CAUSE 0x19158
  689. #define ULP_RX_ISCSI_TAGMASK 0x19164
  690. #define ULP_RX_ISCSI_PSZ 0x19168
  691. #define HPZ3_MASK 0x0f000000U
  692. #define HPZ3_SHIFT 24
  693. #define HPZ3(x) ((x) << HPZ3_SHIFT)
  694. #define HPZ2_MASK 0x000f0000U
  695. #define HPZ2_SHIFT 16
  696. #define HPZ2(x) ((x) << HPZ2_SHIFT)
  697. #define HPZ1_MASK 0x00000f00U
  698. #define HPZ1_SHIFT 8
  699. #define HPZ1(x) ((x) << HPZ1_SHIFT)
  700. #define HPZ0_MASK 0x0000000fU
  701. #define HPZ0_SHIFT 0
  702. #define HPZ0(x) ((x) << HPZ0_SHIFT)
  703. #define ULP_RX_TDDP_PSZ 0x19178
  704. #define SF_DATA 0x193f8
  705. #define SF_OP 0x193fc
  706. #define BUSY 0x80000000U
  707. #define SF_LOCK 0x00000010U
  708. #define SF_CONT 0x00000008U
  709. #define BYTECNT_MASK 0x00000006U
  710. #define BYTECNT_SHIFT 1
  711. #define BYTECNT(x) ((x) << BYTECNT_SHIFT)
  712. #define OP_WR 0x00000001U
  713. #define PL_PF_INT_CAUSE 0x3c0
  714. #define PFSW 0x00000008U
  715. #define PFSGE 0x00000004U
  716. #define PFCIM 0x00000002U
  717. #define PFMPS 0x00000001U
  718. #define PL_PF_INT_ENABLE 0x3c4
  719. #define PL_PF_CTL 0x3c8
  720. #define SWINT 0x00000001U
  721. #define PL_WHOAMI 0x19400
  722. #define SOURCEPF_MASK 0x00000700U
  723. #define SOURCEPF_SHIFT 8
  724. #define SOURCEPF(x) ((x) << SOURCEPF_SHIFT)
  725. #define SOURCEPF_GET(x) (((x) & SOURCEPF_MASK) >> SOURCEPF_SHIFT)
  726. #define ISVF 0x00000080U
  727. #define VFID_MASK 0x0000007fU
  728. #define VFID_SHIFT 0
  729. #define VFID(x) ((x) << VFID_SHIFT)
  730. #define VFID_GET(x) (((x) & VFID_MASK) >> VFID_SHIFT)
  731. #define PL_INT_CAUSE 0x1940c
  732. #define ULP_TX 0x08000000U
  733. #define SGE 0x04000000U
  734. #define HMA 0x02000000U
  735. #define CPL_SWITCH 0x01000000U
  736. #define ULP_RX 0x00800000U
  737. #define PM_RX 0x00400000U
  738. #define PM_TX 0x00200000U
  739. #define MA 0x00100000U
  740. #define TP 0x00080000U
  741. #define LE 0x00040000U
  742. #define EDC1 0x00020000U
  743. #define EDC0 0x00010000U
  744. #define MC 0x00008000U
  745. #define PCIE 0x00004000U
  746. #define PMU 0x00002000U
  747. #define XGMAC_KR1 0x00001000U
  748. #define XGMAC_KR0 0x00000800U
  749. #define XGMAC1 0x00000400U
  750. #define XGMAC0 0x00000200U
  751. #define SMB 0x00000100U
  752. #define SF 0x00000080U
  753. #define PL 0x00000040U
  754. #define NCSI 0x00000020U
  755. #define MPS 0x00000010U
  756. #define MI 0x00000008U
  757. #define DBG 0x00000004U
  758. #define I2CM 0x00000002U
  759. #define CIM 0x00000001U
  760. #define PL_INT_MAP0 0x19414
  761. #define PL_RST 0x19428
  762. #define PIORST 0x00000002U
  763. #define PIORSTMODE 0x00000001U
  764. #define PL_PL_INT_CAUSE 0x19430
  765. #define FATALPERR 0x00000010U
  766. #define PERRVFID 0x00000001U
  767. #define PL_REV 0x1943c
  768. #define LE_DB_CONFIG 0x19c04
  769. #define HASHEN 0x00100000U
  770. #define LE_DB_SERVER_INDEX 0x19c18
  771. #define LE_DB_ACT_CNT_IPV4 0x19c20
  772. #define LE_DB_ACT_CNT_IPV6 0x19c24
  773. #define LE_DB_INT_CAUSE 0x19c3c
  774. #define REQQPARERR 0x00010000U
  775. #define UNKNOWNCMD 0x00008000U
  776. #define PARITYERR 0x00000040U
  777. #define LIPMISS 0x00000020U
  778. #define LIP0 0x00000010U
  779. #define LE_DB_TID_HASHBASE 0x19df8
  780. #define NCSI_INT_CAUSE 0x1a0d8
  781. #define CIM_DM_PRTY_ERR 0x00000100U
  782. #define MPS_DM_PRTY_ERR 0x00000080U
  783. #define TXFIFO_PRTY_ERR 0x00000002U
  784. #define RXFIFO_PRTY_ERR 0x00000001U
  785. #define XGMAC_PORT_CFG2 0x1018
  786. #define PATEN 0x00040000U
  787. #define MAGICEN 0x00020000U
  788. #define XGMAC_PORT_MAGIC_MACID_LO 0x1024
  789. #define XGMAC_PORT_MAGIC_MACID_HI 0x1028
  790. #define XGMAC_PORT_EPIO_DATA0 0x10c0
  791. #define XGMAC_PORT_EPIO_DATA1 0x10c4
  792. #define XGMAC_PORT_EPIO_DATA2 0x10c8
  793. #define XGMAC_PORT_EPIO_DATA3 0x10cc
  794. #define XGMAC_PORT_EPIO_OP 0x10d0
  795. #define EPIOWR 0x00000100U
  796. #define ADDRESS_MASK 0x000000ffU
  797. #define ADDRESS_SHIFT 0
  798. #define ADDRESS(x) ((x) << ADDRESS_SHIFT)
  799. #define XGMAC_PORT_INT_CAUSE 0x10dc
  800. #endif /* __T4_REGS_H */