ef10_regs.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /****************************************************************************
  3. * Driver for Solarflare network controllers and boards
  4. * Copyright 2012-2017 Solarflare Communications Inc.
  5. */
  6. #ifndef EFX_EF10_REGS_H
  7. #define EFX_EF10_REGS_H
  8. /* EF10 hardware architecture definitions have a name prefix following
  9. * the format:
  10. *
  11. * E<type>_<min-rev><max-rev>_
  12. *
  13. * The following <type> strings are used:
  14. *
  15. * MMIO register Host memory structure
  16. * -------------------------------------------------------------
  17. * Address R
  18. * Bitfield RF SF
  19. * Enumerator FE SE
  20. *
  21. * <min-rev> is the first revision to which the definition applies:
  22. *
  23. * D: Huntington A0
  24. *
  25. * If the definition has been changed or removed in later revisions
  26. * then <max-rev> is the last revision to which the definition applies;
  27. * otherwise it is "Z".
  28. */
  29. /**************************************************************************
  30. *
  31. * EF10 registers and descriptors
  32. *
  33. **************************************************************************
  34. */
  35. /* BIU_HW_REV_ID_REG: */
  36. #define ER_DZ_BIU_HW_REV_ID 0x00000000
  37. #define ERF_DZ_HW_REV_ID_LBN 0
  38. #define ERF_DZ_HW_REV_ID_WIDTH 32
  39. /* BIU_MC_SFT_STATUS_REG: */
  40. #define ER_DZ_BIU_MC_SFT_STATUS 0x00000010
  41. #define ER_DZ_BIU_MC_SFT_STATUS_STEP 4
  42. #define ER_DZ_BIU_MC_SFT_STATUS_ROWS 8
  43. #define ERF_DZ_MC_SFT_STATUS_LBN 0
  44. #define ERF_DZ_MC_SFT_STATUS_WIDTH 32
  45. /* BIU_INT_ISR_REG: */
  46. #define ER_DZ_BIU_INT_ISR 0x00000090
  47. #define ERF_DZ_ISR_REG_LBN 0
  48. #define ERF_DZ_ISR_REG_WIDTH 32
  49. /* MC_DB_LWRD_REG: */
  50. #define ER_DZ_MC_DB_LWRD 0x00000200
  51. #define ERF_DZ_MC_DOORBELL_L_LBN 0
  52. #define ERF_DZ_MC_DOORBELL_L_WIDTH 32
  53. /* MC_DB_HWRD_REG: */
  54. #define ER_DZ_MC_DB_HWRD 0x00000204
  55. #define ERF_DZ_MC_DOORBELL_H_LBN 0
  56. #define ERF_DZ_MC_DOORBELL_H_WIDTH 32
  57. /* EVQ_RPTR_REG: */
  58. #define ER_DZ_EVQ_RPTR 0x00000400
  59. #define ER_DZ_EVQ_RPTR_STEP 8192
  60. #define ER_DZ_EVQ_RPTR_ROWS 2048
  61. #define ERF_DZ_EVQ_RPTR_VLD_LBN 15
  62. #define ERF_DZ_EVQ_RPTR_VLD_WIDTH 1
  63. #define ERF_DZ_EVQ_RPTR_LBN 0
  64. #define ERF_DZ_EVQ_RPTR_WIDTH 15
  65. /* EVQ_TMR_REG: */
  66. #define ER_DZ_EVQ_TMR 0x00000420
  67. #define ER_DZ_EVQ_TMR_STEP 8192
  68. #define ER_DZ_EVQ_TMR_ROWS 2048
  69. #define ERF_FZ_TC_TMR_REL_VAL_LBN 16
  70. #define ERF_FZ_TC_TMR_REL_VAL_WIDTH 14
  71. #define ERF_DZ_TC_TIMER_MODE_LBN 14
  72. #define ERF_DZ_TC_TIMER_MODE_WIDTH 2
  73. #define ERF_DZ_TC_TIMER_VAL_LBN 0
  74. #define ERF_DZ_TC_TIMER_VAL_WIDTH 14
  75. /* RX_DESC_UPD_REG: */
  76. #define ER_DZ_RX_DESC_UPD 0x00000830
  77. #define ER_DZ_RX_DESC_UPD_STEP 8192
  78. #define ER_DZ_RX_DESC_UPD_ROWS 2048
  79. #define ERF_DZ_RX_DESC_WPTR_LBN 0
  80. #define ERF_DZ_RX_DESC_WPTR_WIDTH 12
  81. /* TX_DESC_UPD_REG: */
  82. #define ER_DZ_TX_DESC_UPD 0x00000a10
  83. #define ER_DZ_TX_DESC_UPD_STEP 8192
  84. #define ER_DZ_TX_DESC_UPD_ROWS 2048
  85. #define ERF_DZ_RSVD_LBN 76
  86. #define ERF_DZ_RSVD_WIDTH 20
  87. #define ERF_DZ_TX_DESC_WPTR_LBN 64
  88. #define ERF_DZ_TX_DESC_WPTR_WIDTH 12
  89. #define ERF_DZ_TX_DESC_HWORD_LBN 32
  90. #define ERF_DZ_TX_DESC_HWORD_WIDTH 32
  91. #define ERF_DZ_TX_DESC_LWORD_LBN 0
  92. #define ERF_DZ_TX_DESC_LWORD_WIDTH 32
  93. /* DRIVER_EV */
  94. #define ESF_DZ_DRV_CODE_LBN 60
  95. #define ESF_DZ_DRV_CODE_WIDTH 4
  96. #define ESF_DZ_DRV_SUB_CODE_LBN 56
  97. #define ESF_DZ_DRV_SUB_CODE_WIDTH 4
  98. #define ESE_DZ_DRV_TIMER_EV 3
  99. #define ESE_DZ_DRV_START_UP_EV 2
  100. #define ESE_DZ_DRV_WAKE_UP_EV 1
  101. #define ESF_DZ_DRV_SUB_DATA_LBN 0
  102. #define ESF_DZ_DRV_SUB_DATA_WIDTH 56
  103. #define ESF_DZ_DRV_EVQ_ID_LBN 0
  104. #define ESF_DZ_DRV_EVQ_ID_WIDTH 14
  105. #define ESF_DZ_DRV_TMR_ID_LBN 0
  106. #define ESF_DZ_DRV_TMR_ID_WIDTH 14
  107. /* EVENT_ENTRY */
  108. #define ESF_DZ_EV_CODE_LBN 60
  109. #define ESF_DZ_EV_CODE_WIDTH 4
  110. #define ESE_DZ_EV_CODE_MCDI_EV 12
  111. #define ESE_DZ_EV_CODE_DRIVER_EV 5
  112. #define ESE_DZ_EV_CODE_TX_EV 2
  113. #define ESE_DZ_EV_CODE_RX_EV 0
  114. #define ESE_DZ_OTHER other
  115. #define ESF_DZ_EV_DATA_LBN 0
  116. #define ESF_DZ_EV_DATA_WIDTH 60
  117. /* MC_EVENT */
  118. #define ESF_DZ_MC_CODE_LBN 60
  119. #define ESF_DZ_MC_CODE_WIDTH 4
  120. #define ESF_DZ_MC_OVERRIDE_HOLDOFF_LBN 59
  121. #define ESF_DZ_MC_OVERRIDE_HOLDOFF_WIDTH 1
  122. #define ESF_DZ_MC_DROP_EVENT_LBN 58
  123. #define ESF_DZ_MC_DROP_EVENT_WIDTH 1
  124. #define ESF_DZ_MC_SOFT_LBN 0
  125. #define ESF_DZ_MC_SOFT_WIDTH 58
  126. /* RX_EVENT */
  127. #define ESF_DZ_RX_CODE_LBN 60
  128. #define ESF_DZ_RX_CODE_WIDTH 4
  129. #define ESF_DZ_RX_OVERRIDE_HOLDOFF_LBN 59
  130. #define ESF_DZ_RX_OVERRIDE_HOLDOFF_WIDTH 1
  131. #define ESF_DZ_RX_DROP_EVENT_LBN 58
  132. #define ESF_DZ_RX_DROP_EVENT_WIDTH 1
  133. #define ESF_DD_RX_EV_RSVD2_LBN 54
  134. #define ESF_DD_RX_EV_RSVD2_WIDTH 4
  135. #define ESF_EZ_RX_TCP_UDP_INNER_CHKSUM_ERR_LBN 57
  136. #define ESF_EZ_RX_TCP_UDP_INNER_CHKSUM_ERR_WIDTH 1
  137. #define ESF_EZ_RX_IP_INNER_CHKSUM_ERR_LBN 56
  138. #define ESF_EZ_RX_IP_INNER_CHKSUM_ERR_WIDTH 1
  139. #define ESF_EZ_RX_EV_RSVD2_LBN 54
  140. #define ESF_EZ_RX_EV_RSVD2_WIDTH 2
  141. #define ESF_DZ_RX_EV_SOFT2_LBN 52
  142. #define ESF_DZ_RX_EV_SOFT2_WIDTH 2
  143. #define ESF_DZ_RX_DSC_PTR_LBITS_LBN 48
  144. #define ESF_DZ_RX_DSC_PTR_LBITS_WIDTH 4
  145. #define ESF_DE_RX_L4_CLASS_LBN 45
  146. #define ESF_DE_RX_L4_CLASS_WIDTH 3
  147. #define ESE_DE_L4_CLASS_RSVD7 7
  148. #define ESE_DE_L4_CLASS_RSVD6 6
  149. #define ESE_DE_L4_CLASS_RSVD5 5
  150. #define ESE_DE_L4_CLASS_RSVD4 4
  151. #define ESE_DE_L4_CLASS_RSVD3 3
  152. #define ESE_DE_L4_CLASS_UDP 2
  153. #define ESE_DE_L4_CLASS_TCP 1
  154. #define ESE_DE_L4_CLASS_UNKNOWN 0
  155. #define ESF_FZ_RX_FASTPD_INDCTR_LBN 47
  156. #define ESF_FZ_RX_FASTPD_INDCTR_WIDTH 1
  157. #define ESF_FZ_RX_L4_CLASS_LBN 45
  158. #define ESF_FZ_RX_L4_CLASS_WIDTH 2
  159. #define ESE_FZ_L4_CLASS_RSVD3 3
  160. #define ESE_FZ_L4_CLASS_UDP 2
  161. #define ESE_FZ_L4_CLASS_TCP 1
  162. #define ESE_FZ_L4_CLASS_UNKNOWN 0
  163. #define ESF_DZ_RX_L3_CLASS_LBN 42
  164. #define ESF_DZ_RX_L3_CLASS_WIDTH 3
  165. #define ESE_DZ_L3_CLASS_RSVD7 7
  166. #define ESE_DZ_L3_CLASS_IP6_FRAG 6
  167. #define ESE_DZ_L3_CLASS_ARP 5
  168. #define ESE_DZ_L3_CLASS_IP4_FRAG 4
  169. #define ESE_DZ_L3_CLASS_FCOE 3
  170. #define ESE_DZ_L3_CLASS_IP6 2
  171. #define ESE_DZ_L3_CLASS_IP4 1
  172. #define ESE_DZ_L3_CLASS_UNKNOWN 0
  173. #define ESF_DZ_RX_ETH_TAG_CLASS_LBN 39
  174. #define ESF_DZ_RX_ETH_TAG_CLASS_WIDTH 3
  175. #define ESE_DZ_ETH_TAG_CLASS_RSVD7 7
  176. #define ESE_DZ_ETH_TAG_CLASS_RSVD6 6
  177. #define ESE_DZ_ETH_TAG_CLASS_RSVD5 5
  178. #define ESE_DZ_ETH_TAG_CLASS_RSVD4 4
  179. #define ESE_DZ_ETH_TAG_CLASS_RSVD3 3
  180. #define ESE_DZ_ETH_TAG_CLASS_VLAN2 2
  181. #define ESE_DZ_ETH_TAG_CLASS_VLAN1 1
  182. #define ESE_DZ_ETH_TAG_CLASS_NONE 0
  183. #define ESF_DZ_RX_ETH_BASE_CLASS_LBN 36
  184. #define ESF_DZ_RX_ETH_BASE_CLASS_WIDTH 3
  185. #define ESE_DZ_ETH_BASE_CLASS_LLC_SNAP 2
  186. #define ESE_DZ_ETH_BASE_CLASS_LLC 1
  187. #define ESE_DZ_ETH_BASE_CLASS_ETH2 0
  188. #define ESF_DZ_RX_MAC_CLASS_LBN 35
  189. #define ESF_DZ_RX_MAC_CLASS_WIDTH 1
  190. #define ESE_DZ_MAC_CLASS_MCAST 1
  191. #define ESE_DZ_MAC_CLASS_UCAST 0
  192. #define ESF_DD_RX_EV_SOFT1_LBN 32
  193. #define ESF_DD_RX_EV_SOFT1_WIDTH 3
  194. #define ESF_EZ_RX_EV_SOFT1_LBN 34
  195. #define ESF_EZ_RX_EV_SOFT1_WIDTH 1
  196. #define ESF_EZ_RX_ENCAP_HDR_LBN 32
  197. #define ESF_EZ_RX_ENCAP_HDR_WIDTH 2
  198. #define ESE_EZ_ENCAP_HDR_GRE 2
  199. #define ESE_EZ_ENCAP_HDR_VXLAN 1
  200. #define ESE_EZ_ENCAP_HDR_NONE 0
  201. #define ESF_DD_RX_EV_RSVD1_LBN 30
  202. #define ESF_DD_RX_EV_RSVD1_WIDTH 2
  203. #define ESF_EZ_RX_EV_RSVD1_LBN 31
  204. #define ESF_EZ_RX_EV_RSVD1_WIDTH 1
  205. #define ESF_EZ_RX_ABORT_LBN 30
  206. #define ESF_EZ_RX_ABORT_WIDTH 1
  207. #define ESF_DZ_RX_ECC_ERR_LBN 29
  208. #define ESF_DZ_RX_ECC_ERR_WIDTH 1
  209. #define ESF_DZ_RX_TRUNC_ERR_LBN 29
  210. #define ESF_DZ_RX_TRUNC_ERR_WIDTH 1
  211. #define ESF_DZ_RX_CRC1_ERR_LBN 28
  212. #define ESF_DZ_RX_CRC1_ERR_WIDTH 1
  213. #define ESF_DZ_RX_CRC0_ERR_LBN 27
  214. #define ESF_DZ_RX_CRC0_ERR_WIDTH 1
  215. #define ESF_DZ_RX_TCPUDP_CKSUM_ERR_LBN 26
  216. #define ESF_DZ_RX_TCPUDP_CKSUM_ERR_WIDTH 1
  217. #define ESF_DZ_RX_IPCKSUM_ERR_LBN 25
  218. #define ESF_DZ_RX_IPCKSUM_ERR_WIDTH 1
  219. #define ESF_DZ_RX_ECRC_ERR_LBN 24
  220. #define ESF_DZ_RX_ECRC_ERR_WIDTH 1
  221. #define ESF_DZ_RX_QLABEL_LBN 16
  222. #define ESF_DZ_RX_QLABEL_WIDTH 5
  223. #define ESF_DZ_RX_PARSE_INCOMPLETE_LBN 15
  224. #define ESF_DZ_RX_PARSE_INCOMPLETE_WIDTH 1
  225. #define ESF_DZ_RX_CONT_LBN 14
  226. #define ESF_DZ_RX_CONT_WIDTH 1
  227. #define ESF_DZ_RX_BYTES_LBN 0
  228. #define ESF_DZ_RX_BYTES_WIDTH 14
  229. /* RX_KER_DESC */
  230. #define ESF_DZ_RX_KER_RESERVED_LBN 62
  231. #define ESF_DZ_RX_KER_RESERVED_WIDTH 2
  232. #define ESF_DZ_RX_KER_BYTE_CNT_LBN 48
  233. #define ESF_DZ_RX_KER_BYTE_CNT_WIDTH 14
  234. #define ESF_DZ_RX_KER_BUF_ADDR_LBN 0
  235. #define ESF_DZ_RX_KER_BUF_ADDR_WIDTH 48
  236. /* TX_CSUM_TSTAMP_DESC */
  237. #define ESF_DZ_TX_DESC_IS_OPT_LBN 63
  238. #define ESF_DZ_TX_DESC_IS_OPT_WIDTH 1
  239. #define ESF_DZ_TX_OPTION_TYPE_LBN 60
  240. #define ESF_DZ_TX_OPTION_TYPE_WIDTH 3
  241. #define ESE_DZ_TX_OPTION_DESC_TSO 7
  242. #define ESE_DZ_TX_OPTION_DESC_VLAN 6
  243. #define ESE_DZ_TX_OPTION_DESC_CRC_CSUM 0
  244. #define ESF_DZ_TX_OPTION_TS_AT_TXDP_LBN 8
  245. #define ESF_DZ_TX_OPTION_TS_AT_TXDP_WIDTH 1
  246. #define ESF_DZ_TX_OPTION_INNER_UDP_TCP_CSUM_LBN 7
  247. #define ESF_DZ_TX_OPTION_INNER_UDP_TCP_CSUM_WIDTH 1
  248. #define ESF_DZ_TX_OPTION_INNER_IP_CSUM_LBN 6
  249. #define ESF_DZ_TX_OPTION_INNER_IP_CSUM_WIDTH 1
  250. #define ESF_DZ_TX_TIMESTAMP_LBN 5
  251. #define ESF_DZ_TX_TIMESTAMP_WIDTH 1
  252. #define ESF_DZ_TX_OPTION_CRC_MODE_LBN 2
  253. #define ESF_DZ_TX_OPTION_CRC_MODE_WIDTH 3
  254. #define ESE_DZ_TX_OPTION_CRC_FCOIP_MPA 5
  255. #define ESE_DZ_TX_OPTION_CRC_FCOIP_FCOE 4
  256. #define ESE_DZ_TX_OPTION_CRC_ISCSI_HDR_AND_PYLD 3
  257. #define ESE_DZ_TX_OPTION_CRC_ISCSI_HDR 2
  258. #define ESE_DZ_TX_OPTION_CRC_FCOE 1
  259. #define ESE_DZ_TX_OPTION_CRC_OFF 0
  260. #define ESF_DZ_TX_OPTION_UDP_TCP_CSUM_LBN 1
  261. #define ESF_DZ_TX_OPTION_UDP_TCP_CSUM_WIDTH 1
  262. #define ESF_DZ_TX_OPTION_IP_CSUM_LBN 0
  263. #define ESF_DZ_TX_OPTION_IP_CSUM_WIDTH 1
  264. /* TX_EVENT */
  265. #define ESF_DZ_TX_CODE_LBN 60
  266. #define ESF_DZ_TX_CODE_WIDTH 4
  267. #define ESF_DZ_TX_OVERRIDE_HOLDOFF_LBN 59
  268. #define ESF_DZ_TX_OVERRIDE_HOLDOFF_WIDTH 1
  269. #define ESF_DZ_TX_DROP_EVENT_LBN 58
  270. #define ESF_DZ_TX_DROP_EVENT_WIDTH 1
  271. #define ESF_DD_TX_EV_RSVD_LBN 48
  272. #define ESF_DD_TX_EV_RSVD_WIDTH 10
  273. #define ESF_EZ_TCP_UDP_INNER_CHKSUM_ERR_LBN 57
  274. #define ESF_EZ_TCP_UDP_INNER_CHKSUM_ERR_WIDTH 1
  275. #define ESF_EZ_IP_INNER_CHKSUM_ERR_LBN 56
  276. #define ESF_EZ_IP_INNER_CHKSUM_ERR_WIDTH 1
  277. #define ESF_EZ_TX_EV_RSVD_LBN 48
  278. #define ESF_EZ_TX_EV_RSVD_WIDTH 8
  279. #define ESF_DZ_TX_SOFT2_LBN 32
  280. #define ESF_DZ_TX_SOFT2_WIDTH 16
  281. #define ESF_DD_TX_SOFT1_LBN 24
  282. #define ESF_DD_TX_SOFT1_WIDTH 8
  283. #define ESF_EZ_TX_CAN_MERGE_LBN 31
  284. #define ESF_EZ_TX_CAN_MERGE_WIDTH 1
  285. #define ESF_EZ_TX_SOFT1_LBN 24
  286. #define ESF_EZ_TX_SOFT1_WIDTH 7
  287. #define ESF_DZ_TX_QLABEL_LBN 16
  288. #define ESF_DZ_TX_QLABEL_WIDTH 5
  289. #define ESF_DZ_TX_DESCR_INDX_LBN 0
  290. #define ESF_DZ_TX_DESCR_INDX_WIDTH 16
  291. /* TX_KER_DESC */
  292. #define ESF_DZ_TX_KER_TYPE_LBN 63
  293. #define ESF_DZ_TX_KER_TYPE_WIDTH 1
  294. #define ESF_DZ_TX_KER_CONT_LBN 62
  295. #define ESF_DZ_TX_KER_CONT_WIDTH 1
  296. #define ESF_DZ_TX_KER_BYTE_CNT_LBN 48
  297. #define ESF_DZ_TX_KER_BYTE_CNT_WIDTH 14
  298. #define ESF_DZ_TX_KER_BUF_ADDR_LBN 0
  299. #define ESF_DZ_TX_KER_BUF_ADDR_WIDTH 48
  300. /* TX_PIO_DESC */
  301. #define ESF_DZ_TX_PIO_TYPE_LBN 63
  302. #define ESF_DZ_TX_PIO_TYPE_WIDTH 1
  303. #define ESF_DZ_TX_PIO_OPT_LBN 60
  304. #define ESF_DZ_TX_PIO_OPT_WIDTH 3
  305. #define ESE_DZ_TX_OPTION_DESC_PIO 1
  306. #define ESF_DZ_TX_PIO_CONT_LBN 59
  307. #define ESF_DZ_TX_PIO_CONT_WIDTH 1
  308. #define ESF_DZ_TX_PIO_BYTE_CNT_LBN 32
  309. #define ESF_DZ_TX_PIO_BYTE_CNT_WIDTH 12
  310. #define ESF_DZ_TX_PIO_BUF_ADDR_LBN 0
  311. #define ESF_DZ_TX_PIO_BUF_ADDR_WIDTH 12
  312. /* TX_TSO_DESC */
  313. #define ESF_DZ_TX_DESC_IS_OPT_LBN 63
  314. #define ESF_DZ_TX_DESC_IS_OPT_WIDTH 1
  315. #define ESF_DZ_TX_OPTION_TYPE_LBN 60
  316. #define ESF_DZ_TX_OPTION_TYPE_WIDTH 3
  317. #define ESE_DZ_TX_OPTION_DESC_TSO 7
  318. #define ESE_DZ_TX_OPTION_DESC_VLAN 6
  319. #define ESE_DZ_TX_OPTION_DESC_CRC_CSUM 0
  320. #define ESF_DZ_TX_TSO_OPTION_TYPE_LBN 56
  321. #define ESF_DZ_TX_TSO_OPTION_TYPE_WIDTH 4
  322. #define ESE_DZ_TX_TSO_OPTION_DESC_FATSO2B 3
  323. #define ESE_DZ_TX_TSO_OPTION_DESC_FATSO2A 2
  324. #define ESE_DZ_TX_TSO_OPTION_DESC_ENCAP 1
  325. #define ESE_DZ_TX_TSO_OPTION_DESC_NORMAL 0
  326. #define ESF_DZ_TX_TSO_TCP_FLAGS_LBN 48
  327. #define ESF_DZ_TX_TSO_TCP_FLAGS_WIDTH 8
  328. #define ESF_DZ_TX_TSO_IP_ID_LBN 32
  329. #define ESF_DZ_TX_TSO_IP_ID_WIDTH 16
  330. #define ESF_DZ_TX_TSO_TCP_SEQNO_LBN 0
  331. #define ESF_DZ_TX_TSO_TCP_SEQNO_WIDTH 32
  332. /* TX_TSO_V2_DESC_A */
  333. #define ESF_DZ_TX_DESC_IS_OPT_LBN 63
  334. #define ESF_DZ_TX_DESC_IS_OPT_WIDTH 1
  335. #define ESF_DZ_TX_OPTION_TYPE_LBN 60
  336. #define ESF_DZ_TX_OPTION_TYPE_WIDTH 3
  337. #define ESE_DZ_TX_OPTION_DESC_TSO 7
  338. #define ESE_DZ_TX_OPTION_DESC_VLAN 6
  339. #define ESE_DZ_TX_OPTION_DESC_CRC_CSUM 0
  340. #define ESF_DZ_TX_TSO_OPTION_TYPE_LBN 56
  341. #define ESF_DZ_TX_TSO_OPTION_TYPE_WIDTH 4
  342. #define ESE_DZ_TX_TSO_OPTION_DESC_FATSO2B 3
  343. #define ESE_DZ_TX_TSO_OPTION_DESC_FATSO2A 2
  344. #define ESE_DZ_TX_TSO_OPTION_DESC_ENCAP 1
  345. #define ESE_DZ_TX_TSO_OPTION_DESC_NORMAL 0
  346. #define ESF_DZ_TX_TSO_IP_ID_LBN 32
  347. #define ESF_DZ_TX_TSO_IP_ID_WIDTH 16
  348. #define ESF_DZ_TX_TSO_TCP_SEQNO_LBN 0
  349. #define ESF_DZ_TX_TSO_TCP_SEQNO_WIDTH 32
  350. /* TX_TSO_V2_DESC_B */
  351. #define ESF_DZ_TX_DESC_IS_OPT_LBN 63
  352. #define ESF_DZ_TX_DESC_IS_OPT_WIDTH 1
  353. #define ESF_DZ_TX_OPTION_TYPE_LBN 60
  354. #define ESF_DZ_TX_OPTION_TYPE_WIDTH 3
  355. #define ESE_DZ_TX_OPTION_DESC_TSO 7
  356. #define ESE_DZ_TX_OPTION_DESC_VLAN 6
  357. #define ESE_DZ_TX_OPTION_DESC_CRC_CSUM 0
  358. #define ESF_DZ_TX_TSO_OPTION_TYPE_LBN 56
  359. #define ESF_DZ_TX_TSO_OPTION_TYPE_WIDTH 4
  360. #define ESE_DZ_TX_TSO_OPTION_DESC_FATSO2B 3
  361. #define ESE_DZ_TX_TSO_OPTION_DESC_FATSO2A 2
  362. #define ESE_DZ_TX_TSO_OPTION_DESC_ENCAP 1
  363. #define ESE_DZ_TX_TSO_OPTION_DESC_NORMAL 0
  364. #define ESF_DZ_TX_TSO_TCP_MSS_LBN 32
  365. #define ESF_DZ_TX_TSO_TCP_MSS_WIDTH 16
  366. #define ESF_DZ_TX_TSO_OUTER_IPID_LBN 0
  367. #define ESF_DZ_TX_TSO_OUTER_IPID_WIDTH 16
  368. /*************************************************************************/
  369. /* TX_DESC_UPD_REG: Transmit descriptor update register.
  370. * We may write just one dword of these registers.
  371. */
  372. #define ER_DZ_TX_DESC_UPD_DWORD (ER_DZ_TX_DESC_UPD + 2 * 4)
  373. #define ERF_DZ_TX_DESC_WPTR_DWORD_LBN (ERF_DZ_TX_DESC_WPTR_LBN - 2 * 32)
  374. #define ERF_DZ_TX_DESC_WPTR_DWORD_WIDTH ERF_DZ_TX_DESC_WPTR_WIDTH
  375. /* The workaround for bug 35388 requires multiplexing writes through
  376. * the TX_DESC_UPD_DWORD address.
  377. * TX_DESC_UPD: 0ppppppppppp (bit 11 lost)
  378. * EVQ_RPTR: 1000hhhhhhhh, 1001llllllll (split into high and low bits)
  379. * EVQ_TMR: 11mmvvvvvvvv (bits 8:13 of value lost)
  380. */
  381. #define ER_DD_EVQ_INDIRECT ER_DZ_TX_DESC_UPD_DWORD
  382. #define ERF_DD_EVQ_IND_RPTR_FLAGS_LBN 8
  383. #define ERF_DD_EVQ_IND_RPTR_FLAGS_WIDTH 4
  384. #define EFE_DD_EVQ_IND_RPTR_FLAGS_HIGH 8
  385. #define EFE_DD_EVQ_IND_RPTR_FLAGS_LOW 9
  386. #define ERF_DD_EVQ_IND_RPTR_LBN 0
  387. #define ERF_DD_EVQ_IND_RPTR_WIDTH 8
  388. #define ERF_DD_EVQ_IND_TIMER_FLAGS_LBN 10
  389. #define ERF_DD_EVQ_IND_TIMER_FLAGS_WIDTH 2
  390. #define EFE_DD_EVQ_IND_TIMER_FLAGS 3
  391. #define ERF_DD_EVQ_IND_TIMER_MODE_LBN 8
  392. #define ERF_DD_EVQ_IND_TIMER_MODE_WIDTH 2
  393. #define ERF_DD_EVQ_IND_TIMER_VAL_LBN 0
  394. #define ERF_DD_EVQ_IND_TIMER_VAL_WIDTH 8
  395. /* TX_PIOBUF
  396. * PIO buffer aperture (paged)
  397. */
  398. #define ER_DZ_TX_PIOBUF 4096
  399. #define ER_DZ_TX_PIOBUF_SIZE 2048
  400. /* RX packet prefix */
  401. #define ES_DZ_RX_PREFIX_HASH_OFST 0
  402. #define ES_DZ_RX_PREFIX_VLAN1_OFST 4
  403. #define ES_DZ_RX_PREFIX_VLAN2_OFST 6
  404. #define ES_DZ_RX_PREFIX_PKTLEN_OFST 8
  405. #define ES_DZ_RX_PREFIX_TSTAMP_OFST 10
  406. #define ES_DZ_RX_PREFIX_SIZE 14
  407. #endif /* EFX_EF10_REGS_H */