regs.h 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167
  1. /*****************************************************************************
  2. * *
  3. * File: regs.h *
  4. * $Revision: 1.8 $ *
  5. * $Date: 2005/06/21 18:29:48 $ *
  6. * Description: *
  7. * part of the Chelsio 10Gb Ethernet Driver. *
  8. * *
  9. * This program 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. * You should have received a copy of the GNU General Public License along *
  14. * with this program; if not, see <http://www.gnu.org/licenses/>. *
  15. * *
  16. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED *
  17. * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF *
  18. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. *
  19. * *
  20. * http://www.chelsio.com *
  21. * *
  22. * Copyright (c) 2003 - 2005 Chelsio Communications, Inc. *
  23. * All rights reserved. *
  24. * *
  25. * Maintainers: maintainers@chelsio.com *
  26. * *
  27. * Authors: Dimitrios Michailidis <dm@chelsio.com> *
  28. * Tina Yang <tainay@chelsio.com> *
  29. * Felix Marti <felix@chelsio.com> *
  30. * Scott Bardone <sbardone@chelsio.com> *
  31. * Kurt Ottaway <kottaway@chelsio.com> *
  32. * Frank DiMambro <frank@chelsio.com> *
  33. * *
  34. * History: *
  35. * *
  36. ****************************************************************************/
  37. #ifndef _CXGB_REGS_H_
  38. #define _CXGB_REGS_H_
  39. /* SGE registers */
  40. #define A_SG_CONTROL 0x0
  41. #define S_CMDQ0_ENABLE 0
  42. #define V_CMDQ0_ENABLE(x) ((x) << S_CMDQ0_ENABLE)
  43. #define F_CMDQ0_ENABLE V_CMDQ0_ENABLE(1U)
  44. #define S_CMDQ1_ENABLE 1
  45. #define V_CMDQ1_ENABLE(x) ((x) << S_CMDQ1_ENABLE)
  46. #define F_CMDQ1_ENABLE V_CMDQ1_ENABLE(1U)
  47. #define S_FL0_ENABLE 2
  48. #define V_FL0_ENABLE(x) ((x) << S_FL0_ENABLE)
  49. #define F_FL0_ENABLE V_FL0_ENABLE(1U)
  50. #define S_FL1_ENABLE 3
  51. #define V_FL1_ENABLE(x) ((x) << S_FL1_ENABLE)
  52. #define F_FL1_ENABLE V_FL1_ENABLE(1U)
  53. #define S_CPL_ENABLE 4
  54. #define V_CPL_ENABLE(x) ((x) << S_CPL_ENABLE)
  55. #define F_CPL_ENABLE V_CPL_ENABLE(1U)
  56. #define S_RESPONSE_QUEUE_ENABLE 5
  57. #define V_RESPONSE_QUEUE_ENABLE(x) ((x) << S_RESPONSE_QUEUE_ENABLE)
  58. #define F_RESPONSE_QUEUE_ENABLE V_RESPONSE_QUEUE_ENABLE(1U)
  59. #define S_CMDQ_PRIORITY 6
  60. #define M_CMDQ_PRIORITY 0x3
  61. #define V_CMDQ_PRIORITY(x) ((x) << S_CMDQ_PRIORITY)
  62. #define G_CMDQ_PRIORITY(x) (((x) >> S_CMDQ_PRIORITY) & M_CMDQ_PRIORITY)
  63. #define S_DISABLE_CMDQ0_GTS 8
  64. #define V_DISABLE_CMDQ0_GTS(x) ((x) << S_DISABLE_CMDQ0_GTS)
  65. #define F_DISABLE_CMDQ0_GTS V_DISABLE_CMDQ0_GTS(1U)
  66. #define S_DISABLE_CMDQ1_GTS 9
  67. #define V_DISABLE_CMDQ1_GTS(x) ((x) << S_DISABLE_CMDQ1_GTS)
  68. #define F_DISABLE_CMDQ1_GTS V_DISABLE_CMDQ1_GTS(1U)
  69. #define S_DISABLE_FL0_GTS 10
  70. #define V_DISABLE_FL0_GTS(x) ((x) << S_DISABLE_FL0_GTS)
  71. #define F_DISABLE_FL0_GTS V_DISABLE_FL0_GTS(1U)
  72. #define S_DISABLE_FL1_GTS 11
  73. #define V_DISABLE_FL1_GTS(x) ((x) << S_DISABLE_FL1_GTS)
  74. #define F_DISABLE_FL1_GTS V_DISABLE_FL1_GTS(1U)
  75. #define S_ENABLE_BIG_ENDIAN 12
  76. #define V_ENABLE_BIG_ENDIAN(x) ((x) << S_ENABLE_BIG_ENDIAN)
  77. #define F_ENABLE_BIG_ENDIAN V_ENABLE_BIG_ENDIAN(1U)
  78. #define S_FL_SELECTION_CRITERIA 13
  79. #define V_FL_SELECTION_CRITERIA(x) ((x) << S_FL_SELECTION_CRITERIA)
  80. #define F_FL_SELECTION_CRITERIA V_FL_SELECTION_CRITERIA(1U)
  81. #define S_ISCSI_COALESCE 14
  82. #define V_ISCSI_COALESCE(x) ((x) << S_ISCSI_COALESCE)
  83. #define F_ISCSI_COALESCE V_ISCSI_COALESCE(1U)
  84. #define S_RX_PKT_OFFSET 15
  85. #define M_RX_PKT_OFFSET 0x7
  86. #define V_RX_PKT_OFFSET(x) ((x) << S_RX_PKT_OFFSET)
  87. #define G_RX_PKT_OFFSET(x) (((x) >> S_RX_PKT_OFFSET) & M_RX_PKT_OFFSET)
  88. #define S_VLAN_XTRACT 18
  89. #define V_VLAN_XTRACT(x) ((x) << S_VLAN_XTRACT)
  90. #define F_VLAN_XTRACT V_VLAN_XTRACT(1U)
  91. #define A_SG_DOORBELL 0x4
  92. #define A_SG_CMD0BASELWR 0x8
  93. #define A_SG_CMD0BASEUPR 0xc
  94. #define A_SG_CMD1BASELWR 0x10
  95. #define A_SG_CMD1BASEUPR 0x14
  96. #define A_SG_FL0BASELWR 0x18
  97. #define A_SG_FL0BASEUPR 0x1c
  98. #define A_SG_FL1BASELWR 0x20
  99. #define A_SG_FL1BASEUPR 0x24
  100. #define A_SG_CMD0SIZE 0x28
  101. #define S_CMDQ0_SIZE 0
  102. #define M_CMDQ0_SIZE 0x1ffff
  103. #define V_CMDQ0_SIZE(x) ((x) << S_CMDQ0_SIZE)
  104. #define G_CMDQ0_SIZE(x) (((x) >> S_CMDQ0_SIZE) & M_CMDQ0_SIZE)
  105. #define A_SG_FL0SIZE 0x2c
  106. #define S_FL0_SIZE 0
  107. #define M_FL0_SIZE 0x1ffff
  108. #define V_FL0_SIZE(x) ((x) << S_FL0_SIZE)
  109. #define G_FL0_SIZE(x) (((x) >> S_FL0_SIZE) & M_FL0_SIZE)
  110. #define A_SG_RSPSIZE 0x30
  111. #define S_RESPQ_SIZE 0
  112. #define M_RESPQ_SIZE 0x1ffff
  113. #define V_RESPQ_SIZE(x) ((x) << S_RESPQ_SIZE)
  114. #define G_RESPQ_SIZE(x) (((x) >> S_RESPQ_SIZE) & M_RESPQ_SIZE)
  115. #define A_SG_RSPBASELWR 0x34
  116. #define A_SG_RSPBASEUPR 0x38
  117. #define A_SG_FLTHRESHOLD 0x3c
  118. #define S_FL_THRESHOLD 0
  119. #define M_FL_THRESHOLD 0xffff
  120. #define V_FL_THRESHOLD(x) ((x) << S_FL_THRESHOLD)
  121. #define G_FL_THRESHOLD(x) (((x) >> S_FL_THRESHOLD) & M_FL_THRESHOLD)
  122. #define A_SG_RSPQUEUECREDIT 0x40
  123. #define S_RESPQ_CREDIT 0
  124. #define M_RESPQ_CREDIT 0x1ffff
  125. #define V_RESPQ_CREDIT(x) ((x) << S_RESPQ_CREDIT)
  126. #define G_RESPQ_CREDIT(x) (((x) >> S_RESPQ_CREDIT) & M_RESPQ_CREDIT)
  127. #define A_SG_SLEEPING 0x48
  128. #define S_SLEEPING 0
  129. #define M_SLEEPING 0xffff
  130. #define V_SLEEPING(x) ((x) << S_SLEEPING)
  131. #define G_SLEEPING(x) (((x) >> S_SLEEPING) & M_SLEEPING)
  132. #define A_SG_INTRTIMER 0x4c
  133. #define S_INTERRUPT_TIMER_COUNT 0
  134. #define M_INTERRUPT_TIMER_COUNT 0xffffff
  135. #define V_INTERRUPT_TIMER_COUNT(x) ((x) << S_INTERRUPT_TIMER_COUNT)
  136. #define G_INTERRUPT_TIMER_COUNT(x) (((x) >> S_INTERRUPT_TIMER_COUNT) & M_INTERRUPT_TIMER_COUNT)
  137. #define A_SG_CMD0PTR 0x50
  138. #define S_CMDQ0_POINTER 0
  139. #define M_CMDQ0_POINTER 0xffff
  140. #define V_CMDQ0_POINTER(x) ((x) << S_CMDQ0_POINTER)
  141. #define G_CMDQ0_POINTER(x) (((x) >> S_CMDQ0_POINTER) & M_CMDQ0_POINTER)
  142. #define S_CURRENT_GENERATION_BIT 16
  143. #define V_CURRENT_GENERATION_BIT(x) ((x) << S_CURRENT_GENERATION_BIT)
  144. #define F_CURRENT_GENERATION_BIT V_CURRENT_GENERATION_BIT(1U)
  145. #define A_SG_CMD1PTR 0x54
  146. #define S_CMDQ1_POINTER 0
  147. #define M_CMDQ1_POINTER 0xffff
  148. #define V_CMDQ1_POINTER(x) ((x) << S_CMDQ1_POINTER)
  149. #define G_CMDQ1_POINTER(x) (((x) >> S_CMDQ1_POINTER) & M_CMDQ1_POINTER)
  150. #define A_SG_FL0PTR 0x58
  151. #define S_FL0_POINTER 0
  152. #define M_FL0_POINTER 0xffff
  153. #define V_FL0_POINTER(x) ((x) << S_FL0_POINTER)
  154. #define G_FL0_POINTER(x) (((x) >> S_FL0_POINTER) & M_FL0_POINTER)
  155. #define A_SG_FL1PTR 0x5c
  156. #define S_FL1_POINTER 0
  157. #define M_FL1_POINTER 0xffff
  158. #define V_FL1_POINTER(x) ((x) << S_FL1_POINTER)
  159. #define G_FL1_POINTER(x) (((x) >> S_FL1_POINTER) & M_FL1_POINTER)
  160. #define A_SG_VERSION 0x6c
  161. #define S_DAY 0
  162. #define M_DAY 0x1f
  163. #define V_DAY(x) ((x) << S_DAY)
  164. #define G_DAY(x) (((x) >> S_DAY) & M_DAY)
  165. #define S_MONTH 5
  166. #define M_MONTH 0xf
  167. #define V_MONTH(x) ((x) << S_MONTH)
  168. #define G_MONTH(x) (((x) >> S_MONTH) & M_MONTH)
  169. #define A_SG_CMD1SIZE 0xb0
  170. #define S_CMDQ1_SIZE 0
  171. #define M_CMDQ1_SIZE 0x1ffff
  172. #define V_CMDQ1_SIZE(x) ((x) << S_CMDQ1_SIZE)
  173. #define G_CMDQ1_SIZE(x) (((x) >> S_CMDQ1_SIZE) & M_CMDQ1_SIZE)
  174. #define A_SG_FL1SIZE 0xb4
  175. #define S_FL1_SIZE 0
  176. #define M_FL1_SIZE 0x1ffff
  177. #define V_FL1_SIZE(x) ((x) << S_FL1_SIZE)
  178. #define G_FL1_SIZE(x) (((x) >> S_FL1_SIZE) & M_FL1_SIZE)
  179. #define A_SG_INT_ENABLE 0xb8
  180. #define S_RESPQ_EXHAUSTED 0
  181. #define V_RESPQ_EXHAUSTED(x) ((x) << S_RESPQ_EXHAUSTED)
  182. #define F_RESPQ_EXHAUSTED V_RESPQ_EXHAUSTED(1U)
  183. #define S_RESPQ_OVERFLOW 1
  184. #define V_RESPQ_OVERFLOW(x) ((x) << S_RESPQ_OVERFLOW)
  185. #define F_RESPQ_OVERFLOW V_RESPQ_OVERFLOW(1U)
  186. #define S_FL_EXHAUSTED 2
  187. #define V_FL_EXHAUSTED(x) ((x) << S_FL_EXHAUSTED)
  188. #define F_FL_EXHAUSTED V_FL_EXHAUSTED(1U)
  189. #define S_PACKET_TOO_BIG 3
  190. #define V_PACKET_TOO_BIG(x) ((x) << S_PACKET_TOO_BIG)
  191. #define F_PACKET_TOO_BIG V_PACKET_TOO_BIG(1U)
  192. #define S_PACKET_MISMATCH 4
  193. #define V_PACKET_MISMATCH(x) ((x) << S_PACKET_MISMATCH)
  194. #define F_PACKET_MISMATCH V_PACKET_MISMATCH(1U)
  195. #define A_SG_INT_CAUSE 0xbc
  196. #define A_SG_RESPACCUTIMER 0xc0
  197. /* MC3 registers */
  198. #define A_MC3_CFG 0x100
  199. #define S_CLK_ENABLE 0
  200. #define V_CLK_ENABLE(x) ((x) << S_CLK_ENABLE)
  201. #define F_CLK_ENABLE V_CLK_ENABLE(1U)
  202. #define S_READY 1
  203. #define V_READY(x) ((x) << S_READY)
  204. #define F_READY V_READY(1U)
  205. #define S_READ_TO_WRITE_DELAY 2
  206. #define M_READ_TO_WRITE_DELAY 0x7
  207. #define V_READ_TO_WRITE_DELAY(x) ((x) << S_READ_TO_WRITE_DELAY)
  208. #define G_READ_TO_WRITE_DELAY(x) (((x) >> S_READ_TO_WRITE_DELAY) & M_READ_TO_WRITE_DELAY)
  209. #define S_WRITE_TO_READ_DELAY 5
  210. #define M_WRITE_TO_READ_DELAY 0x7
  211. #define V_WRITE_TO_READ_DELAY(x) ((x) << S_WRITE_TO_READ_DELAY)
  212. #define G_WRITE_TO_READ_DELAY(x) (((x) >> S_WRITE_TO_READ_DELAY) & M_WRITE_TO_READ_DELAY)
  213. #define S_MC3_BANK_CYCLE 8
  214. #define M_MC3_BANK_CYCLE 0xf
  215. #define V_MC3_BANK_CYCLE(x) ((x) << S_MC3_BANK_CYCLE)
  216. #define G_MC3_BANK_CYCLE(x) (((x) >> S_MC3_BANK_CYCLE) & M_MC3_BANK_CYCLE)
  217. #define S_REFRESH_CYCLE 12
  218. #define M_REFRESH_CYCLE 0xf
  219. #define V_REFRESH_CYCLE(x) ((x) << S_REFRESH_CYCLE)
  220. #define G_REFRESH_CYCLE(x) (((x) >> S_REFRESH_CYCLE) & M_REFRESH_CYCLE)
  221. #define S_PRECHARGE_CYCLE 16
  222. #define M_PRECHARGE_CYCLE 0x3
  223. #define V_PRECHARGE_CYCLE(x) ((x) << S_PRECHARGE_CYCLE)
  224. #define G_PRECHARGE_CYCLE(x) (((x) >> S_PRECHARGE_CYCLE) & M_PRECHARGE_CYCLE)
  225. #define S_ACTIVE_TO_READ_WRITE_DELAY 18
  226. #define V_ACTIVE_TO_READ_WRITE_DELAY(x) ((x) << S_ACTIVE_TO_READ_WRITE_DELAY)
  227. #define F_ACTIVE_TO_READ_WRITE_DELAY V_ACTIVE_TO_READ_WRITE_DELAY(1U)
  228. #define S_ACTIVE_TO_PRECHARGE_DELAY 19
  229. #define M_ACTIVE_TO_PRECHARGE_DELAY 0x7
  230. #define V_ACTIVE_TO_PRECHARGE_DELAY(x) ((x) << S_ACTIVE_TO_PRECHARGE_DELAY)
  231. #define G_ACTIVE_TO_PRECHARGE_DELAY(x) (((x) >> S_ACTIVE_TO_PRECHARGE_DELAY) & M_ACTIVE_TO_PRECHARGE_DELAY)
  232. #define S_WRITE_RECOVERY_DELAY 22
  233. #define M_WRITE_RECOVERY_DELAY 0x3
  234. #define V_WRITE_RECOVERY_DELAY(x) ((x) << S_WRITE_RECOVERY_DELAY)
  235. #define G_WRITE_RECOVERY_DELAY(x) (((x) >> S_WRITE_RECOVERY_DELAY) & M_WRITE_RECOVERY_DELAY)
  236. #define S_DENSITY 24
  237. #define M_DENSITY 0x3
  238. #define V_DENSITY(x) ((x) << S_DENSITY)
  239. #define G_DENSITY(x) (((x) >> S_DENSITY) & M_DENSITY)
  240. #define S_ORGANIZATION 26
  241. #define V_ORGANIZATION(x) ((x) << S_ORGANIZATION)
  242. #define F_ORGANIZATION V_ORGANIZATION(1U)
  243. #define S_BANKS 27
  244. #define V_BANKS(x) ((x) << S_BANKS)
  245. #define F_BANKS V_BANKS(1U)
  246. #define S_UNREGISTERED 28
  247. #define V_UNREGISTERED(x) ((x) << S_UNREGISTERED)
  248. #define F_UNREGISTERED V_UNREGISTERED(1U)
  249. #define S_MC3_WIDTH 29
  250. #define M_MC3_WIDTH 0x3
  251. #define V_MC3_WIDTH(x) ((x) << S_MC3_WIDTH)
  252. #define G_MC3_WIDTH(x) (((x) >> S_MC3_WIDTH) & M_MC3_WIDTH)
  253. #define S_MC3_SLOW 31
  254. #define V_MC3_SLOW(x) ((x) << S_MC3_SLOW)
  255. #define F_MC3_SLOW V_MC3_SLOW(1U)
  256. #define A_MC3_MODE 0x104
  257. #define S_MC3_MODE 0
  258. #define M_MC3_MODE 0x3fff
  259. #define V_MC3_MODE(x) ((x) << S_MC3_MODE)
  260. #define G_MC3_MODE(x) (((x) >> S_MC3_MODE) & M_MC3_MODE)
  261. #define S_BUSY 31
  262. #define V_BUSY(x) ((x) << S_BUSY)
  263. #define F_BUSY V_BUSY(1U)
  264. #define A_MC3_EXT_MODE 0x108
  265. #define S_MC3_EXTENDED_MODE 0
  266. #define M_MC3_EXTENDED_MODE 0x3fff
  267. #define V_MC3_EXTENDED_MODE(x) ((x) << S_MC3_EXTENDED_MODE)
  268. #define G_MC3_EXTENDED_MODE(x) (((x) >> S_MC3_EXTENDED_MODE) & M_MC3_EXTENDED_MODE)
  269. #define A_MC3_PRECHARG 0x10c
  270. #define A_MC3_REFRESH 0x110
  271. #define S_REFRESH_ENABLE 0
  272. #define V_REFRESH_ENABLE(x) ((x) << S_REFRESH_ENABLE)
  273. #define F_REFRESH_ENABLE V_REFRESH_ENABLE(1U)
  274. #define S_REFRESH_DIVISOR 1
  275. #define M_REFRESH_DIVISOR 0x3fff
  276. #define V_REFRESH_DIVISOR(x) ((x) << S_REFRESH_DIVISOR)
  277. #define G_REFRESH_DIVISOR(x) (((x) >> S_REFRESH_DIVISOR) & M_REFRESH_DIVISOR)
  278. #define A_MC3_STROBE 0x114
  279. #define S_MASTER_DLL_RESET 0
  280. #define V_MASTER_DLL_RESET(x) ((x) << S_MASTER_DLL_RESET)
  281. #define F_MASTER_DLL_RESET V_MASTER_DLL_RESET(1U)
  282. #define S_MASTER_DLL_TAP_COUNT 1
  283. #define M_MASTER_DLL_TAP_COUNT 0xff
  284. #define V_MASTER_DLL_TAP_COUNT(x) ((x) << S_MASTER_DLL_TAP_COUNT)
  285. #define G_MASTER_DLL_TAP_COUNT(x) (((x) >> S_MASTER_DLL_TAP_COUNT) & M_MASTER_DLL_TAP_COUNT)
  286. #define S_MASTER_DLL_LOCKED 9
  287. #define V_MASTER_DLL_LOCKED(x) ((x) << S_MASTER_DLL_LOCKED)
  288. #define F_MASTER_DLL_LOCKED V_MASTER_DLL_LOCKED(1U)
  289. #define S_MASTER_DLL_MAX_TAP_COUNT 10
  290. #define V_MASTER_DLL_MAX_TAP_COUNT(x) ((x) << S_MASTER_DLL_MAX_TAP_COUNT)
  291. #define F_MASTER_DLL_MAX_TAP_COUNT V_MASTER_DLL_MAX_TAP_COUNT(1U)
  292. #define S_MASTER_DLL_TAP_COUNT_OFFSET 11
  293. #define M_MASTER_DLL_TAP_COUNT_OFFSET 0x3f
  294. #define V_MASTER_DLL_TAP_COUNT_OFFSET(x) ((x) << S_MASTER_DLL_TAP_COUNT_OFFSET)
  295. #define G_MASTER_DLL_TAP_COUNT_OFFSET(x) (((x) >> S_MASTER_DLL_TAP_COUNT_OFFSET) & M_MASTER_DLL_TAP_COUNT_OFFSET)
  296. #define S_SLAVE_DLL_RESET 11
  297. #define V_SLAVE_DLL_RESET(x) ((x) << S_SLAVE_DLL_RESET)
  298. #define F_SLAVE_DLL_RESET V_SLAVE_DLL_RESET(1U)
  299. #define S_SLAVE_DLL_DELTA 12
  300. #define M_SLAVE_DLL_DELTA 0xf
  301. #define V_SLAVE_DLL_DELTA(x) ((x) << S_SLAVE_DLL_DELTA)
  302. #define G_SLAVE_DLL_DELTA(x) (((x) >> S_SLAVE_DLL_DELTA) & M_SLAVE_DLL_DELTA)
  303. #define S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT 17
  304. #define M_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT 0x3f
  305. #define V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT(x) ((x) << S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT)
  306. #define G_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT(x) (((x) >> S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT) & M_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT)
  307. #define S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE 23
  308. #define V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE(x) ((x) << S_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE)
  309. #define F_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE V_SLAVE_DELAY_LINE_MANUAL_TAP_COUNT_ENABLE(1U)
  310. #define S_SLAVE_DELAY_LINE_TAP_COUNT 24
  311. #define M_SLAVE_DELAY_LINE_TAP_COUNT 0x3f
  312. #define V_SLAVE_DELAY_LINE_TAP_COUNT(x) ((x) << S_SLAVE_DELAY_LINE_TAP_COUNT)
  313. #define G_SLAVE_DELAY_LINE_TAP_COUNT(x) (((x) >> S_SLAVE_DELAY_LINE_TAP_COUNT) & M_SLAVE_DELAY_LINE_TAP_COUNT)
  314. #define A_MC3_ECC_CNTL 0x118
  315. #define S_ECC_GENERATION_ENABLE 0
  316. #define V_ECC_GENERATION_ENABLE(x) ((x) << S_ECC_GENERATION_ENABLE)
  317. #define F_ECC_GENERATION_ENABLE V_ECC_GENERATION_ENABLE(1U)
  318. #define S_ECC_CHECK_ENABLE 1
  319. #define V_ECC_CHECK_ENABLE(x) ((x) << S_ECC_CHECK_ENABLE)
  320. #define F_ECC_CHECK_ENABLE V_ECC_CHECK_ENABLE(1U)
  321. #define S_CORRECTABLE_ERROR_COUNT 2
  322. #define M_CORRECTABLE_ERROR_COUNT 0xff
  323. #define V_CORRECTABLE_ERROR_COUNT(x) ((x) << S_CORRECTABLE_ERROR_COUNT)
  324. #define G_CORRECTABLE_ERROR_COUNT(x) (((x) >> S_CORRECTABLE_ERROR_COUNT) & M_CORRECTABLE_ERROR_COUNT)
  325. #define S_UNCORRECTABLE_ERROR_COUNT 10
  326. #define M_UNCORRECTABLE_ERROR_COUNT 0xff
  327. #define V_UNCORRECTABLE_ERROR_COUNT(x) ((x) << S_UNCORRECTABLE_ERROR_COUNT)
  328. #define G_UNCORRECTABLE_ERROR_COUNT(x) (((x) >> S_UNCORRECTABLE_ERROR_COUNT) & M_UNCORRECTABLE_ERROR_COUNT)
  329. #define A_MC3_CE_ADDR 0x11c
  330. #define S_MC3_CE_ADDR 4
  331. #define M_MC3_CE_ADDR 0xfffffff
  332. #define V_MC3_CE_ADDR(x) ((x) << S_MC3_CE_ADDR)
  333. #define G_MC3_CE_ADDR(x) (((x) >> S_MC3_CE_ADDR) & M_MC3_CE_ADDR)
  334. #define A_MC3_CE_DATA0 0x120
  335. #define A_MC3_CE_DATA1 0x124
  336. #define A_MC3_CE_DATA2 0x128
  337. #define A_MC3_CE_DATA3 0x12c
  338. #define A_MC3_CE_DATA4 0x130
  339. #define A_MC3_UE_ADDR 0x134
  340. #define S_MC3_UE_ADDR 4
  341. #define M_MC3_UE_ADDR 0xfffffff
  342. #define V_MC3_UE_ADDR(x) ((x) << S_MC3_UE_ADDR)
  343. #define G_MC3_UE_ADDR(x) (((x) >> S_MC3_UE_ADDR) & M_MC3_UE_ADDR)
  344. #define A_MC3_UE_DATA0 0x138
  345. #define A_MC3_UE_DATA1 0x13c
  346. #define A_MC3_UE_DATA2 0x140
  347. #define A_MC3_UE_DATA3 0x144
  348. #define A_MC3_UE_DATA4 0x148
  349. #define A_MC3_BD_ADDR 0x14c
  350. #define A_MC3_BD_DATA0 0x150
  351. #define A_MC3_BD_DATA1 0x154
  352. #define A_MC3_BD_DATA2 0x158
  353. #define A_MC3_BD_DATA3 0x15c
  354. #define A_MC3_BD_DATA4 0x160
  355. #define A_MC3_BD_OP 0x164
  356. #define S_BACK_DOOR_OPERATION 0
  357. #define V_BACK_DOOR_OPERATION(x) ((x) << S_BACK_DOOR_OPERATION)
  358. #define F_BACK_DOOR_OPERATION V_BACK_DOOR_OPERATION(1U)
  359. #define A_MC3_BIST_ADDR_BEG 0x168
  360. #define A_MC3_BIST_ADDR_END 0x16c
  361. #define A_MC3_BIST_DATA 0x170
  362. #define A_MC3_BIST_OP 0x174
  363. #define S_OP 0
  364. #define V_OP(x) ((x) << S_OP)
  365. #define F_OP V_OP(1U)
  366. #define S_DATA_PATTERN 1
  367. #define M_DATA_PATTERN 0x3
  368. #define V_DATA_PATTERN(x) ((x) << S_DATA_PATTERN)
  369. #define G_DATA_PATTERN(x) (((x) >> S_DATA_PATTERN) & M_DATA_PATTERN)
  370. #define S_CONTINUOUS 3
  371. #define V_CONTINUOUS(x) ((x) << S_CONTINUOUS)
  372. #define F_CONTINUOUS V_CONTINUOUS(1U)
  373. #define A_MC3_INT_ENABLE 0x178
  374. #define S_MC3_CORR_ERR 0
  375. #define V_MC3_CORR_ERR(x) ((x) << S_MC3_CORR_ERR)
  376. #define F_MC3_CORR_ERR V_MC3_CORR_ERR(1U)
  377. #define S_MC3_UNCORR_ERR 1
  378. #define V_MC3_UNCORR_ERR(x) ((x) << S_MC3_UNCORR_ERR)
  379. #define F_MC3_UNCORR_ERR V_MC3_UNCORR_ERR(1U)
  380. #define S_MC3_PARITY_ERR 2
  381. #define M_MC3_PARITY_ERR 0xff
  382. #define V_MC3_PARITY_ERR(x) ((x) << S_MC3_PARITY_ERR)
  383. #define G_MC3_PARITY_ERR(x) (((x) >> S_MC3_PARITY_ERR) & M_MC3_PARITY_ERR)
  384. #define S_MC3_ADDR_ERR 10
  385. #define V_MC3_ADDR_ERR(x) ((x) << S_MC3_ADDR_ERR)
  386. #define F_MC3_ADDR_ERR V_MC3_ADDR_ERR(1U)
  387. #define A_MC3_INT_CAUSE 0x17c
  388. /* MC4 registers */
  389. #define A_MC4_CFG 0x180
  390. #define S_POWER_UP 0
  391. #define V_POWER_UP(x) ((x) << S_POWER_UP)
  392. #define F_POWER_UP V_POWER_UP(1U)
  393. #define S_MC4_BANK_CYCLE 8
  394. #define M_MC4_BANK_CYCLE 0x7
  395. #define V_MC4_BANK_CYCLE(x) ((x) << S_MC4_BANK_CYCLE)
  396. #define G_MC4_BANK_CYCLE(x) (((x) >> S_MC4_BANK_CYCLE) & M_MC4_BANK_CYCLE)
  397. #define S_MC4_NARROW 24
  398. #define V_MC4_NARROW(x) ((x) << S_MC4_NARROW)
  399. #define F_MC4_NARROW V_MC4_NARROW(1U)
  400. #define S_MC4_SLOW 25
  401. #define V_MC4_SLOW(x) ((x) << S_MC4_SLOW)
  402. #define F_MC4_SLOW V_MC4_SLOW(1U)
  403. #define S_MC4A_WIDTH 24
  404. #define M_MC4A_WIDTH 0x3
  405. #define V_MC4A_WIDTH(x) ((x) << S_MC4A_WIDTH)
  406. #define G_MC4A_WIDTH(x) (((x) >> S_MC4A_WIDTH) & M_MC4A_WIDTH)
  407. #define S_MC4A_SLOW 26
  408. #define V_MC4A_SLOW(x) ((x) << S_MC4A_SLOW)
  409. #define F_MC4A_SLOW V_MC4A_SLOW(1U)
  410. #define A_MC4_MODE 0x184
  411. #define S_MC4_MODE 0
  412. #define M_MC4_MODE 0x7fff
  413. #define V_MC4_MODE(x) ((x) << S_MC4_MODE)
  414. #define G_MC4_MODE(x) (((x) >> S_MC4_MODE) & M_MC4_MODE)
  415. #define A_MC4_EXT_MODE 0x188
  416. #define S_MC4_EXTENDED_MODE 0
  417. #define M_MC4_EXTENDED_MODE 0x7fff
  418. #define V_MC4_EXTENDED_MODE(x) ((x) << S_MC4_EXTENDED_MODE)
  419. #define G_MC4_EXTENDED_MODE(x) (((x) >> S_MC4_EXTENDED_MODE) & M_MC4_EXTENDED_MODE)
  420. #define A_MC4_REFRESH 0x190
  421. #define A_MC4_STROBE 0x194
  422. #define A_MC4_ECC_CNTL 0x198
  423. #define A_MC4_CE_ADDR 0x19c
  424. #define S_MC4_CE_ADDR 4
  425. #define M_MC4_CE_ADDR 0xffffff
  426. #define V_MC4_CE_ADDR(x) ((x) << S_MC4_CE_ADDR)
  427. #define G_MC4_CE_ADDR(x) (((x) >> S_MC4_CE_ADDR) & M_MC4_CE_ADDR)
  428. #define A_MC4_CE_DATA0 0x1a0
  429. #define A_MC4_CE_DATA1 0x1a4
  430. #define A_MC4_CE_DATA2 0x1a8
  431. #define A_MC4_CE_DATA3 0x1ac
  432. #define A_MC4_CE_DATA4 0x1b0
  433. #define A_MC4_UE_ADDR 0x1b4
  434. #define S_MC4_UE_ADDR 4
  435. #define M_MC4_UE_ADDR 0xffffff
  436. #define V_MC4_UE_ADDR(x) ((x) << S_MC4_UE_ADDR)
  437. #define G_MC4_UE_ADDR(x) (((x) >> S_MC4_UE_ADDR) & M_MC4_UE_ADDR)
  438. #define A_MC4_UE_DATA0 0x1b8
  439. #define A_MC4_UE_DATA1 0x1bc
  440. #define A_MC4_UE_DATA2 0x1c0
  441. #define A_MC4_UE_DATA3 0x1c4
  442. #define A_MC4_UE_DATA4 0x1c8
  443. #define A_MC4_BD_ADDR 0x1cc
  444. #define S_MC4_BACK_DOOR_ADDR 0
  445. #define M_MC4_BACK_DOOR_ADDR 0xfffffff
  446. #define V_MC4_BACK_DOOR_ADDR(x) ((x) << S_MC4_BACK_DOOR_ADDR)
  447. #define G_MC4_BACK_DOOR_ADDR(x) (((x) >> S_MC4_BACK_DOOR_ADDR) & M_MC4_BACK_DOOR_ADDR)
  448. #define A_MC4_BD_DATA0 0x1d0
  449. #define A_MC4_BD_DATA1 0x1d4
  450. #define A_MC4_BD_DATA2 0x1d8
  451. #define A_MC4_BD_DATA3 0x1dc
  452. #define A_MC4_BD_DATA4 0x1e0
  453. #define A_MC4_BD_OP 0x1e4
  454. #define S_OPERATION 0
  455. #define V_OPERATION(x) ((x) << S_OPERATION)
  456. #define F_OPERATION V_OPERATION(1U)
  457. #define A_MC4_BIST_ADDR_BEG 0x1e8
  458. #define A_MC4_BIST_ADDR_END 0x1ec
  459. #define A_MC4_BIST_DATA 0x1f0
  460. #define A_MC4_BIST_OP 0x1f4
  461. #define A_MC4_INT_ENABLE 0x1f8
  462. #define S_MC4_CORR_ERR 0
  463. #define V_MC4_CORR_ERR(x) ((x) << S_MC4_CORR_ERR)
  464. #define F_MC4_CORR_ERR V_MC4_CORR_ERR(1U)
  465. #define S_MC4_UNCORR_ERR 1
  466. #define V_MC4_UNCORR_ERR(x) ((x) << S_MC4_UNCORR_ERR)
  467. #define F_MC4_UNCORR_ERR V_MC4_UNCORR_ERR(1U)
  468. #define S_MC4_ADDR_ERR 2
  469. #define V_MC4_ADDR_ERR(x) ((x) << S_MC4_ADDR_ERR)
  470. #define F_MC4_ADDR_ERR V_MC4_ADDR_ERR(1U)
  471. #define A_MC4_INT_CAUSE 0x1fc
  472. /* TPI registers */
  473. #define A_TPI_ADDR 0x280
  474. #define S_TPI_ADDRESS 0
  475. #define M_TPI_ADDRESS 0xffffff
  476. #define V_TPI_ADDRESS(x) ((x) << S_TPI_ADDRESS)
  477. #define G_TPI_ADDRESS(x) (((x) >> S_TPI_ADDRESS) & M_TPI_ADDRESS)
  478. #define A_TPI_WR_DATA 0x284
  479. #define A_TPI_RD_DATA 0x288
  480. #define A_TPI_CSR 0x28c
  481. #define S_TPIWR 0
  482. #define V_TPIWR(x) ((x) << S_TPIWR)
  483. #define F_TPIWR V_TPIWR(1U)
  484. #define S_TPIRDY 1
  485. #define V_TPIRDY(x) ((x) << S_TPIRDY)
  486. #define F_TPIRDY V_TPIRDY(1U)
  487. #define S_INT_DIR 31
  488. #define V_INT_DIR(x) ((x) << S_INT_DIR)
  489. #define F_INT_DIR V_INT_DIR(1U)
  490. #define A_TPI_PAR 0x29c
  491. #define S_TPIPAR 0
  492. #define M_TPIPAR 0x7f
  493. #define V_TPIPAR(x) ((x) << S_TPIPAR)
  494. #define G_TPIPAR(x) (((x) >> S_TPIPAR) & M_TPIPAR)
  495. /* TP registers */
  496. #define A_TP_IN_CONFIG 0x300
  497. #define S_TP_IN_CSPI_TUNNEL 0
  498. #define V_TP_IN_CSPI_TUNNEL(x) ((x) << S_TP_IN_CSPI_TUNNEL)
  499. #define F_TP_IN_CSPI_TUNNEL V_TP_IN_CSPI_TUNNEL(1U)
  500. #define S_TP_IN_CSPI_ETHERNET 1
  501. #define V_TP_IN_CSPI_ETHERNET(x) ((x) << S_TP_IN_CSPI_ETHERNET)
  502. #define F_TP_IN_CSPI_ETHERNET V_TP_IN_CSPI_ETHERNET(1U)
  503. #define S_TP_IN_CSPI_CPL 3
  504. #define V_TP_IN_CSPI_CPL(x) ((x) << S_TP_IN_CSPI_CPL)
  505. #define F_TP_IN_CSPI_CPL V_TP_IN_CSPI_CPL(1U)
  506. #define S_TP_IN_CSPI_POS 4
  507. #define V_TP_IN_CSPI_POS(x) ((x) << S_TP_IN_CSPI_POS)
  508. #define F_TP_IN_CSPI_POS V_TP_IN_CSPI_POS(1U)
  509. #define S_TP_IN_CSPI_CHECK_IP_CSUM 5
  510. #define V_TP_IN_CSPI_CHECK_IP_CSUM(x) ((x) << S_TP_IN_CSPI_CHECK_IP_CSUM)
  511. #define F_TP_IN_CSPI_CHECK_IP_CSUM V_TP_IN_CSPI_CHECK_IP_CSUM(1U)
  512. #define S_TP_IN_CSPI_CHECK_TCP_CSUM 6
  513. #define V_TP_IN_CSPI_CHECK_TCP_CSUM(x) ((x) << S_TP_IN_CSPI_CHECK_TCP_CSUM)
  514. #define F_TP_IN_CSPI_CHECK_TCP_CSUM V_TP_IN_CSPI_CHECK_TCP_CSUM(1U)
  515. #define S_TP_IN_ESPI_TUNNEL 7
  516. #define V_TP_IN_ESPI_TUNNEL(x) ((x) << S_TP_IN_ESPI_TUNNEL)
  517. #define F_TP_IN_ESPI_TUNNEL V_TP_IN_ESPI_TUNNEL(1U)
  518. #define S_TP_IN_ESPI_ETHERNET 8
  519. #define V_TP_IN_ESPI_ETHERNET(x) ((x) << S_TP_IN_ESPI_ETHERNET)
  520. #define F_TP_IN_ESPI_ETHERNET V_TP_IN_ESPI_ETHERNET(1U)
  521. #define S_TP_IN_ESPI_CPL 10
  522. #define V_TP_IN_ESPI_CPL(x) ((x) << S_TP_IN_ESPI_CPL)
  523. #define F_TP_IN_ESPI_CPL V_TP_IN_ESPI_CPL(1U)
  524. #define S_TP_IN_ESPI_POS 11
  525. #define V_TP_IN_ESPI_POS(x) ((x) << S_TP_IN_ESPI_POS)
  526. #define F_TP_IN_ESPI_POS V_TP_IN_ESPI_POS(1U)
  527. #define S_TP_IN_ESPI_CHECK_IP_CSUM 12
  528. #define V_TP_IN_ESPI_CHECK_IP_CSUM(x) ((x) << S_TP_IN_ESPI_CHECK_IP_CSUM)
  529. #define F_TP_IN_ESPI_CHECK_IP_CSUM V_TP_IN_ESPI_CHECK_IP_CSUM(1U)
  530. #define S_TP_IN_ESPI_CHECK_TCP_CSUM 13
  531. #define V_TP_IN_ESPI_CHECK_TCP_CSUM(x) ((x) << S_TP_IN_ESPI_CHECK_TCP_CSUM)
  532. #define F_TP_IN_ESPI_CHECK_TCP_CSUM V_TP_IN_ESPI_CHECK_TCP_CSUM(1U)
  533. #define S_OFFLOAD_DISABLE 14
  534. #define V_OFFLOAD_DISABLE(x) ((x) << S_OFFLOAD_DISABLE)
  535. #define F_OFFLOAD_DISABLE V_OFFLOAD_DISABLE(1U)
  536. #define A_TP_OUT_CONFIG 0x304
  537. #define S_TP_OUT_C_ETH 0
  538. #define V_TP_OUT_C_ETH(x) ((x) << S_TP_OUT_C_ETH)
  539. #define F_TP_OUT_C_ETH V_TP_OUT_C_ETH(1U)
  540. #define S_TP_OUT_CSPI_CPL 2
  541. #define V_TP_OUT_CSPI_CPL(x) ((x) << S_TP_OUT_CSPI_CPL)
  542. #define F_TP_OUT_CSPI_CPL V_TP_OUT_CSPI_CPL(1U)
  543. #define S_TP_OUT_CSPI_POS 3
  544. #define V_TP_OUT_CSPI_POS(x) ((x) << S_TP_OUT_CSPI_POS)
  545. #define F_TP_OUT_CSPI_POS V_TP_OUT_CSPI_POS(1U)
  546. #define S_TP_OUT_CSPI_GENERATE_IP_CSUM 4
  547. #define V_TP_OUT_CSPI_GENERATE_IP_CSUM(x) ((x) << S_TP_OUT_CSPI_GENERATE_IP_CSUM)
  548. #define F_TP_OUT_CSPI_GENERATE_IP_CSUM V_TP_OUT_CSPI_GENERATE_IP_CSUM(1U)
  549. #define S_TP_OUT_CSPI_GENERATE_TCP_CSUM 5
  550. #define V_TP_OUT_CSPI_GENERATE_TCP_CSUM(x) ((x) << S_TP_OUT_CSPI_GENERATE_TCP_CSUM)
  551. #define F_TP_OUT_CSPI_GENERATE_TCP_CSUM V_TP_OUT_CSPI_GENERATE_TCP_CSUM(1U)
  552. #define S_TP_OUT_ESPI_ETHERNET 6
  553. #define V_TP_OUT_ESPI_ETHERNET(x) ((x) << S_TP_OUT_ESPI_ETHERNET)
  554. #define F_TP_OUT_ESPI_ETHERNET V_TP_OUT_ESPI_ETHERNET(1U)
  555. #define S_TP_OUT_ESPI_TAG_ETHERNET 7
  556. #define V_TP_OUT_ESPI_TAG_ETHERNET(x) ((x) << S_TP_OUT_ESPI_TAG_ETHERNET)
  557. #define F_TP_OUT_ESPI_TAG_ETHERNET V_TP_OUT_ESPI_TAG_ETHERNET(1U)
  558. #define S_TP_OUT_ESPI_CPL 8
  559. #define V_TP_OUT_ESPI_CPL(x) ((x) << S_TP_OUT_ESPI_CPL)
  560. #define F_TP_OUT_ESPI_CPL V_TP_OUT_ESPI_CPL(1U)
  561. #define S_TP_OUT_ESPI_POS 9
  562. #define V_TP_OUT_ESPI_POS(x) ((x) << S_TP_OUT_ESPI_POS)
  563. #define F_TP_OUT_ESPI_POS V_TP_OUT_ESPI_POS(1U)
  564. #define S_TP_OUT_ESPI_GENERATE_IP_CSUM 10
  565. #define V_TP_OUT_ESPI_GENERATE_IP_CSUM(x) ((x) << S_TP_OUT_ESPI_GENERATE_IP_CSUM)
  566. #define F_TP_OUT_ESPI_GENERATE_IP_CSUM V_TP_OUT_ESPI_GENERATE_IP_CSUM(1U)
  567. #define S_TP_OUT_ESPI_GENERATE_TCP_CSUM 11
  568. #define V_TP_OUT_ESPI_GENERATE_TCP_CSUM(x) ((x) << S_TP_OUT_ESPI_GENERATE_TCP_CSUM)
  569. #define F_TP_OUT_ESPI_GENERATE_TCP_CSUM V_TP_OUT_ESPI_GENERATE_TCP_CSUM(1U)
  570. #define A_TP_GLOBAL_CONFIG 0x308
  571. #define S_IP_TTL 0
  572. #define M_IP_TTL 0xff
  573. #define V_IP_TTL(x) ((x) << S_IP_TTL)
  574. #define G_IP_TTL(x) (((x) >> S_IP_TTL) & M_IP_TTL)
  575. #define S_TCAM_SERVER_REGION_USAGE 8
  576. #define M_TCAM_SERVER_REGION_USAGE 0x3
  577. #define V_TCAM_SERVER_REGION_USAGE(x) ((x) << S_TCAM_SERVER_REGION_USAGE)
  578. #define G_TCAM_SERVER_REGION_USAGE(x) (((x) >> S_TCAM_SERVER_REGION_USAGE) & M_TCAM_SERVER_REGION_USAGE)
  579. #define S_QOS_MAPPING 10
  580. #define V_QOS_MAPPING(x) ((x) << S_QOS_MAPPING)
  581. #define F_QOS_MAPPING V_QOS_MAPPING(1U)
  582. #define S_TCP_CSUM 11
  583. #define V_TCP_CSUM(x) ((x) << S_TCP_CSUM)
  584. #define F_TCP_CSUM V_TCP_CSUM(1U)
  585. #define S_UDP_CSUM 12
  586. #define V_UDP_CSUM(x) ((x) << S_UDP_CSUM)
  587. #define F_UDP_CSUM V_UDP_CSUM(1U)
  588. #define S_IP_CSUM 13
  589. #define V_IP_CSUM(x) ((x) << S_IP_CSUM)
  590. #define F_IP_CSUM V_IP_CSUM(1U)
  591. #define S_IP_ID_SPLIT 14
  592. #define V_IP_ID_SPLIT(x) ((x) << S_IP_ID_SPLIT)
  593. #define F_IP_ID_SPLIT V_IP_ID_SPLIT(1U)
  594. #define S_PATH_MTU 15
  595. #define V_PATH_MTU(x) ((x) << S_PATH_MTU)
  596. #define F_PATH_MTU V_PATH_MTU(1U)
  597. #define S_5TUPLE_LOOKUP 17
  598. #define M_5TUPLE_LOOKUP 0x3
  599. #define V_5TUPLE_LOOKUP(x) ((x) << S_5TUPLE_LOOKUP)
  600. #define G_5TUPLE_LOOKUP(x) (((x) >> S_5TUPLE_LOOKUP) & M_5TUPLE_LOOKUP)
  601. #define S_IP_FRAGMENT_DROP 19
  602. #define V_IP_FRAGMENT_DROP(x) ((x) << S_IP_FRAGMENT_DROP)
  603. #define F_IP_FRAGMENT_DROP V_IP_FRAGMENT_DROP(1U)
  604. #define S_PING_DROP 20
  605. #define V_PING_DROP(x) ((x) << S_PING_DROP)
  606. #define F_PING_DROP V_PING_DROP(1U)
  607. #define S_PROTECT_MODE 21
  608. #define V_PROTECT_MODE(x) ((x) << S_PROTECT_MODE)
  609. #define F_PROTECT_MODE V_PROTECT_MODE(1U)
  610. #define S_SYN_COOKIE_ALGORITHM 22
  611. #define V_SYN_COOKIE_ALGORITHM(x) ((x) << S_SYN_COOKIE_ALGORITHM)
  612. #define F_SYN_COOKIE_ALGORITHM V_SYN_COOKIE_ALGORITHM(1U)
  613. #define S_ATTACK_FILTER 23
  614. #define V_ATTACK_FILTER(x) ((x) << S_ATTACK_FILTER)
  615. #define F_ATTACK_FILTER V_ATTACK_FILTER(1U)
  616. #define S_INTERFACE_TYPE 24
  617. #define V_INTERFACE_TYPE(x) ((x) << S_INTERFACE_TYPE)
  618. #define F_INTERFACE_TYPE V_INTERFACE_TYPE(1U)
  619. #define S_DISABLE_RX_FLOW_CONTROL 25
  620. #define V_DISABLE_RX_FLOW_CONTROL(x) ((x) << S_DISABLE_RX_FLOW_CONTROL)
  621. #define F_DISABLE_RX_FLOW_CONTROL V_DISABLE_RX_FLOW_CONTROL(1U)
  622. #define S_SYN_COOKIE_PARAMETER 26
  623. #define M_SYN_COOKIE_PARAMETER 0x3f
  624. #define V_SYN_COOKIE_PARAMETER(x) ((x) << S_SYN_COOKIE_PARAMETER)
  625. #define G_SYN_COOKIE_PARAMETER(x) (((x) >> S_SYN_COOKIE_PARAMETER) & M_SYN_COOKIE_PARAMETER)
  626. #define A_TP_GLOBAL_RX_CREDITS 0x30c
  627. #define A_TP_CM_SIZE 0x310
  628. #define A_TP_CM_MM_BASE 0x314
  629. #define S_CM_MEMMGR_BASE 0
  630. #define M_CM_MEMMGR_BASE 0xfffffff
  631. #define V_CM_MEMMGR_BASE(x) ((x) << S_CM_MEMMGR_BASE)
  632. #define G_CM_MEMMGR_BASE(x) (((x) >> S_CM_MEMMGR_BASE) & M_CM_MEMMGR_BASE)
  633. #define A_TP_CM_TIMER_BASE 0x318
  634. #define S_CM_TIMER_BASE 0
  635. #define M_CM_TIMER_BASE 0xfffffff
  636. #define V_CM_TIMER_BASE(x) ((x) << S_CM_TIMER_BASE)
  637. #define G_CM_TIMER_BASE(x) (((x) >> S_CM_TIMER_BASE) & M_CM_TIMER_BASE)
  638. #define A_TP_PM_SIZE 0x31c
  639. #define A_TP_PM_TX_BASE 0x320
  640. #define A_TP_PM_DEFRAG_BASE 0x324
  641. #define A_TP_PM_RX_BASE 0x328
  642. #define A_TP_PM_RX_PG_SIZE 0x32c
  643. #define A_TP_PM_RX_MAX_PGS 0x330
  644. #define A_TP_PM_TX_PG_SIZE 0x334
  645. #define A_TP_PM_TX_MAX_PGS 0x338
  646. #define A_TP_TCP_OPTIONS 0x340
  647. #define S_TIMESTAMP 0
  648. #define M_TIMESTAMP 0x3
  649. #define V_TIMESTAMP(x) ((x) << S_TIMESTAMP)
  650. #define G_TIMESTAMP(x) (((x) >> S_TIMESTAMP) & M_TIMESTAMP)
  651. #define S_WINDOW_SCALE 2
  652. #define M_WINDOW_SCALE 0x3
  653. #define V_WINDOW_SCALE(x) ((x) << S_WINDOW_SCALE)
  654. #define G_WINDOW_SCALE(x) (((x) >> S_WINDOW_SCALE) & M_WINDOW_SCALE)
  655. #define S_SACK 4
  656. #define M_SACK 0x3
  657. #define V_SACK(x) ((x) << S_SACK)
  658. #define G_SACK(x) (((x) >> S_SACK) & M_SACK)
  659. #define S_ECN 6
  660. #define M_ECN 0x3
  661. #define V_ECN(x) ((x) << S_ECN)
  662. #define G_ECN(x) (((x) >> S_ECN) & M_ECN)
  663. #define S_SACK_ALGORITHM 8
  664. #define M_SACK_ALGORITHM 0x3
  665. #define V_SACK_ALGORITHM(x) ((x) << S_SACK_ALGORITHM)
  666. #define G_SACK_ALGORITHM(x) (((x) >> S_SACK_ALGORITHM) & M_SACK_ALGORITHM)
  667. #define S_MSS 10
  668. #define V_MSS(x) ((x) << S_MSS)
  669. #define F_MSS V_MSS(1U)
  670. #define S_DEFAULT_PEER_MSS 16
  671. #define M_DEFAULT_PEER_MSS 0xffff
  672. #define V_DEFAULT_PEER_MSS(x) ((x) << S_DEFAULT_PEER_MSS)
  673. #define G_DEFAULT_PEER_MSS(x) (((x) >> S_DEFAULT_PEER_MSS) & M_DEFAULT_PEER_MSS)
  674. #define A_TP_DACK_CONFIG 0x344
  675. #define S_DACK_MODE 0
  676. #define V_DACK_MODE(x) ((x) << S_DACK_MODE)
  677. #define F_DACK_MODE V_DACK_MODE(1U)
  678. #define S_DACK_AUTO_MGMT 1
  679. #define V_DACK_AUTO_MGMT(x) ((x) << S_DACK_AUTO_MGMT)
  680. #define F_DACK_AUTO_MGMT V_DACK_AUTO_MGMT(1U)
  681. #define S_DACK_AUTO_CAREFUL 2
  682. #define V_DACK_AUTO_CAREFUL(x) ((x) << S_DACK_AUTO_CAREFUL)
  683. #define F_DACK_AUTO_CAREFUL V_DACK_AUTO_CAREFUL(1U)
  684. #define S_DACK_MSS_SELECTOR 3
  685. #define M_DACK_MSS_SELECTOR 0x3
  686. #define V_DACK_MSS_SELECTOR(x) ((x) << S_DACK_MSS_SELECTOR)
  687. #define G_DACK_MSS_SELECTOR(x) (((x) >> S_DACK_MSS_SELECTOR) & M_DACK_MSS_SELECTOR)
  688. #define S_DACK_BYTE_THRESHOLD 5
  689. #define M_DACK_BYTE_THRESHOLD 0xfffff
  690. #define V_DACK_BYTE_THRESHOLD(x) ((x) << S_DACK_BYTE_THRESHOLD)
  691. #define G_DACK_BYTE_THRESHOLD(x) (((x) >> S_DACK_BYTE_THRESHOLD) & M_DACK_BYTE_THRESHOLD)
  692. #define A_TP_PC_CONFIG 0x348
  693. #define S_TP_ACCESS_LATENCY 0
  694. #define M_TP_ACCESS_LATENCY 0xf
  695. #define V_TP_ACCESS_LATENCY(x) ((x) << S_TP_ACCESS_LATENCY)
  696. #define G_TP_ACCESS_LATENCY(x) (((x) >> S_TP_ACCESS_LATENCY) & M_TP_ACCESS_LATENCY)
  697. #define S_HELD_FIN_DISABLE 4
  698. #define V_HELD_FIN_DISABLE(x) ((x) << S_HELD_FIN_DISABLE)
  699. #define F_HELD_FIN_DISABLE V_HELD_FIN_DISABLE(1U)
  700. #define S_DDP_FC_ENABLE 5
  701. #define V_DDP_FC_ENABLE(x) ((x) << S_DDP_FC_ENABLE)
  702. #define F_DDP_FC_ENABLE V_DDP_FC_ENABLE(1U)
  703. #define S_RDMA_ERR_ENABLE 6
  704. #define V_RDMA_ERR_ENABLE(x) ((x) << S_RDMA_ERR_ENABLE)
  705. #define F_RDMA_ERR_ENABLE V_RDMA_ERR_ENABLE(1U)
  706. #define S_FAST_PDU_DELIVERY 7
  707. #define V_FAST_PDU_DELIVERY(x) ((x) << S_FAST_PDU_DELIVERY)
  708. #define F_FAST_PDU_DELIVERY V_FAST_PDU_DELIVERY(1U)
  709. #define S_CLEAR_FIN 8
  710. #define V_CLEAR_FIN(x) ((x) << S_CLEAR_FIN)
  711. #define F_CLEAR_FIN V_CLEAR_FIN(1U)
  712. #define S_DIS_TX_FILL_WIN_PUSH 12
  713. #define V_DIS_TX_FILL_WIN_PUSH(x) ((x) << S_DIS_TX_FILL_WIN_PUSH)
  714. #define F_DIS_TX_FILL_WIN_PUSH V_DIS_TX_FILL_WIN_PUSH(1U)
  715. #define S_TP_PC_REV 30
  716. #define M_TP_PC_REV 0x3
  717. #define V_TP_PC_REV(x) ((x) << S_TP_PC_REV)
  718. #define G_TP_PC_REV(x) (((x) >> S_TP_PC_REV) & M_TP_PC_REV)
  719. #define A_TP_BACKOFF0 0x350
  720. #define S_ELEMENT0 0
  721. #define M_ELEMENT0 0xff
  722. #define V_ELEMENT0(x) ((x) << S_ELEMENT0)
  723. #define G_ELEMENT0(x) (((x) >> S_ELEMENT0) & M_ELEMENT0)
  724. #define S_ELEMENT1 8
  725. #define M_ELEMENT1 0xff
  726. #define V_ELEMENT1(x) ((x) << S_ELEMENT1)
  727. #define G_ELEMENT1(x) (((x) >> S_ELEMENT1) & M_ELEMENT1)
  728. #define S_ELEMENT2 16
  729. #define M_ELEMENT2 0xff
  730. #define V_ELEMENT2(x) ((x) << S_ELEMENT2)
  731. #define G_ELEMENT2(x) (((x) >> S_ELEMENT2) & M_ELEMENT2)
  732. #define S_ELEMENT3 24
  733. #define M_ELEMENT3 0xff
  734. #define V_ELEMENT3(x) ((x) << S_ELEMENT3)
  735. #define G_ELEMENT3(x) (((x) >> S_ELEMENT3) & M_ELEMENT3)
  736. #define A_TP_BACKOFF1 0x354
  737. #define A_TP_BACKOFF2 0x358
  738. #define A_TP_BACKOFF3 0x35c
  739. #define A_TP_PARA_REG0 0x360
  740. #define S_VAR_MULT 0
  741. #define M_VAR_MULT 0xf
  742. #define V_VAR_MULT(x) ((x) << S_VAR_MULT)
  743. #define G_VAR_MULT(x) (((x) >> S_VAR_MULT) & M_VAR_MULT)
  744. #define S_VAR_GAIN 4
  745. #define M_VAR_GAIN 0xf
  746. #define V_VAR_GAIN(x) ((x) << S_VAR_GAIN)
  747. #define G_VAR_GAIN(x) (((x) >> S_VAR_GAIN) & M_VAR_GAIN)
  748. #define S_SRTT_GAIN 8
  749. #define M_SRTT_GAIN 0xf
  750. #define V_SRTT_GAIN(x) ((x) << S_SRTT_GAIN)
  751. #define G_SRTT_GAIN(x) (((x) >> S_SRTT_GAIN) & M_SRTT_GAIN)
  752. #define S_RTTVAR_INIT 12
  753. #define M_RTTVAR_INIT 0xf
  754. #define V_RTTVAR_INIT(x) ((x) << S_RTTVAR_INIT)
  755. #define G_RTTVAR_INIT(x) (((x) >> S_RTTVAR_INIT) & M_RTTVAR_INIT)
  756. #define S_DUP_THRESH 20
  757. #define M_DUP_THRESH 0xf
  758. #define V_DUP_THRESH(x) ((x) << S_DUP_THRESH)
  759. #define G_DUP_THRESH(x) (((x) >> S_DUP_THRESH) & M_DUP_THRESH)
  760. #define S_INIT_CONG_WIN 24
  761. #define M_INIT_CONG_WIN 0x7
  762. #define V_INIT_CONG_WIN(x) ((x) << S_INIT_CONG_WIN)
  763. #define G_INIT_CONG_WIN(x) (((x) >> S_INIT_CONG_WIN) & M_INIT_CONG_WIN)
  764. #define A_TP_PARA_REG1 0x364
  765. #define S_INITIAL_SLOW_START_THRESHOLD 0
  766. #define M_INITIAL_SLOW_START_THRESHOLD 0xffff
  767. #define V_INITIAL_SLOW_START_THRESHOLD(x) ((x) << S_INITIAL_SLOW_START_THRESHOLD)
  768. #define G_INITIAL_SLOW_START_THRESHOLD(x) (((x) >> S_INITIAL_SLOW_START_THRESHOLD) & M_INITIAL_SLOW_START_THRESHOLD)
  769. #define S_RECEIVE_BUFFER_SIZE 16
  770. #define M_RECEIVE_BUFFER_SIZE 0xffff
  771. #define V_RECEIVE_BUFFER_SIZE(x) ((x) << S_RECEIVE_BUFFER_SIZE)
  772. #define G_RECEIVE_BUFFER_SIZE(x) (((x) >> S_RECEIVE_BUFFER_SIZE) & M_RECEIVE_BUFFER_SIZE)
  773. #define A_TP_PARA_REG2 0x368
  774. #define S_RX_COALESCE_SIZE 0
  775. #define M_RX_COALESCE_SIZE 0xffff
  776. #define V_RX_COALESCE_SIZE(x) ((x) << S_RX_COALESCE_SIZE)
  777. #define G_RX_COALESCE_SIZE(x) (((x) >> S_RX_COALESCE_SIZE) & M_RX_COALESCE_SIZE)
  778. #define S_MAX_RX_SIZE 16
  779. #define M_MAX_RX_SIZE 0xffff
  780. #define V_MAX_RX_SIZE(x) ((x) << S_MAX_RX_SIZE)
  781. #define G_MAX_RX_SIZE(x) (((x) >> S_MAX_RX_SIZE) & M_MAX_RX_SIZE)
  782. #define A_TP_PARA_REG3 0x36c
  783. #define S_RX_COALESCING_PSH_DELIVER 0
  784. #define V_RX_COALESCING_PSH_DELIVER(x) ((x) << S_RX_COALESCING_PSH_DELIVER)
  785. #define F_RX_COALESCING_PSH_DELIVER V_RX_COALESCING_PSH_DELIVER(1U)
  786. #define S_RX_COALESCING_ENABLE 1
  787. #define V_RX_COALESCING_ENABLE(x) ((x) << S_RX_COALESCING_ENABLE)
  788. #define F_RX_COALESCING_ENABLE V_RX_COALESCING_ENABLE(1U)
  789. #define S_TAHOE_ENABLE 2
  790. #define V_TAHOE_ENABLE(x) ((x) << S_TAHOE_ENABLE)
  791. #define F_TAHOE_ENABLE V_TAHOE_ENABLE(1U)
  792. #define S_MAX_REORDER_FRAGMENTS 12
  793. #define M_MAX_REORDER_FRAGMENTS 0x7
  794. #define V_MAX_REORDER_FRAGMENTS(x) ((x) << S_MAX_REORDER_FRAGMENTS)
  795. #define G_MAX_REORDER_FRAGMENTS(x) (((x) >> S_MAX_REORDER_FRAGMENTS) & M_MAX_REORDER_FRAGMENTS)
  796. #define A_TP_TIMER_RESOLUTION 0x390
  797. #define S_DELAYED_ACK_TIMER_RESOLUTION 0
  798. #define M_DELAYED_ACK_TIMER_RESOLUTION 0x3f
  799. #define V_DELAYED_ACK_TIMER_RESOLUTION(x) ((x) << S_DELAYED_ACK_TIMER_RESOLUTION)
  800. #define G_DELAYED_ACK_TIMER_RESOLUTION(x) (((x) >> S_DELAYED_ACK_TIMER_RESOLUTION) & M_DELAYED_ACK_TIMER_RESOLUTION)
  801. #define S_GENERIC_TIMER_RESOLUTION 16
  802. #define M_GENERIC_TIMER_RESOLUTION 0x3f
  803. #define V_GENERIC_TIMER_RESOLUTION(x) ((x) << S_GENERIC_TIMER_RESOLUTION)
  804. #define G_GENERIC_TIMER_RESOLUTION(x) (((x) >> S_GENERIC_TIMER_RESOLUTION) & M_GENERIC_TIMER_RESOLUTION)
  805. #define A_TP_2MSL 0x394
  806. #define S_2MSL 0
  807. #define M_2MSL 0x3fffffff
  808. #define V_2MSL(x) ((x) << S_2MSL)
  809. #define G_2MSL(x) (((x) >> S_2MSL) & M_2MSL)
  810. #define A_TP_RXT_MIN 0x398
  811. #define S_RETRANSMIT_TIMER_MIN 0
  812. #define M_RETRANSMIT_TIMER_MIN 0xffff
  813. #define V_RETRANSMIT_TIMER_MIN(x) ((x) << S_RETRANSMIT_TIMER_MIN)
  814. #define G_RETRANSMIT_TIMER_MIN(x) (((x) >> S_RETRANSMIT_TIMER_MIN) & M_RETRANSMIT_TIMER_MIN)
  815. #define A_TP_RXT_MAX 0x39c
  816. #define S_RETRANSMIT_TIMER_MAX 0
  817. #define M_RETRANSMIT_TIMER_MAX 0x3fffffff
  818. #define V_RETRANSMIT_TIMER_MAX(x) ((x) << S_RETRANSMIT_TIMER_MAX)
  819. #define G_RETRANSMIT_TIMER_MAX(x) (((x) >> S_RETRANSMIT_TIMER_MAX) & M_RETRANSMIT_TIMER_MAX)
  820. #define A_TP_PERS_MIN 0x3a0
  821. #define S_PERSIST_TIMER_MIN 0
  822. #define M_PERSIST_TIMER_MIN 0xffff
  823. #define V_PERSIST_TIMER_MIN(x) ((x) << S_PERSIST_TIMER_MIN)
  824. #define G_PERSIST_TIMER_MIN(x) (((x) >> S_PERSIST_TIMER_MIN) & M_PERSIST_TIMER_MIN)
  825. #define A_TP_PERS_MAX 0x3a4
  826. #define S_PERSIST_TIMER_MAX 0
  827. #define M_PERSIST_TIMER_MAX 0x3fffffff
  828. #define V_PERSIST_TIMER_MAX(x) ((x) << S_PERSIST_TIMER_MAX)
  829. #define G_PERSIST_TIMER_MAX(x) (((x) >> S_PERSIST_TIMER_MAX) & M_PERSIST_TIMER_MAX)
  830. #define A_TP_KEEP_IDLE 0x3ac
  831. #define S_KEEP_ALIVE_IDLE_TIME 0
  832. #define M_KEEP_ALIVE_IDLE_TIME 0x3fffffff
  833. #define V_KEEP_ALIVE_IDLE_TIME(x) ((x) << S_KEEP_ALIVE_IDLE_TIME)
  834. #define G_KEEP_ALIVE_IDLE_TIME(x) (((x) >> S_KEEP_ALIVE_IDLE_TIME) & M_KEEP_ALIVE_IDLE_TIME)
  835. #define A_TP_KEEP_INTVL 0x3b0
  836. #define S_KEEP_ALIVE_INTERVAL_TIME 0
  837. #define M_KEEP_ALIVE_INTERVAL_TIME 0x3fffffff
  838. #define V_KEEP_ALIVE_INTERVAL_TIME(x) ((x) << S_KEEP_ALIVE_INTERVAL_TIME)
  839. #define G_KEEP_ALIVE_INTERVAL_TIME(x) (((x) >> S_KEEP_ALIVE_INTERVAL_TIME) & M_KEEP_ALIVE_INTERVAL_TIME)
  840. #define A_TP_INIT_SRTT 0x3b4
  841. #define S_INITIAL_SRTT 0
  842. #define M_INITIAL_SRTT 0xffff
  843. #define V_INITIAL_SRTT(x) ((x) << S_INITIAL_SRTT)
  844. #define G_INITIAL_SRTT(x) (((x) >> S_INITIAL_SRTT) & M_INITIAL_SRTT)
  845. #define A_TP_DACK_TIME 0x3b8
  846. #define S_DELAYED_ACK_TIME 0
  847. #define M_DELAYED_ACK_TIME 0x7ff
  848. #define V_DELAYED_ACK_TIME(x) ((x) << S_DELAYED_ACK_TIME)
  849. #define G_DELAYED_ACK_TIME(x) (((x) >> S_DELAYED_ACK_TIME) & M_DELAYED_ACK_TIME)
  850. #define A_TP_FINWAIT2_TIME 0x3bc
  851. #define S_FINWAIT2_TIME 0
  852. #define M_FINWAIT2_TIME 0x3fffffff
  853. #define V_FINWAIT2_TIME(x) ((x) << S_FINWAIT2_TIME)
  854. #define G_FINWAIT2_TIME(x) (((x) >> S_FINWAIT2_TIME) & M_FINWAIT2_TIME)
  855. #define A_TP_FAST_FINWAIT2_TIME 0x3c0
  856. #define S_FAST_FINWAIT2_TIME 0
  857. #define M_FAST_FINWAIT2_TIME 0x3fffffff
  858. #define V_FAST_FINWAIT2_TIME(x) ((x) << S_FAST_FINWAIT2_TIME)
  859. #define G_FAST_FINWAIT2_TIME(x) (((x) >> S_FAST_FINWAIT2_TIME) & M_FAST_FINWAIT2_TIME)
  860. #define A_TP_SHIFT_CNT 0x3c4
  861. #define S_KEEPALIVE_MAX 0
  862. #define M_KEEPALIVE_MAX 0xff
  863. #define V_KEEPALIVE_MAX(x) ((x) << S_KEEPALIVE_MAX)
  864. #define G_KEEPALIVE_MAX(x) (((x) >> S_KEEPALIVE_MAX) & M_KEEPALIVE_MAX)
  865. #define S_WINDOWPROBE_MAX 8
  866. #define M_WINDOWPROBE_MAX 0xff
  867. #define V_WINDOWPROBE_MAX(x) ((x) << S_WINDOWPROBE_MAX)
  868. #define G_WINDOWPROBE_MAX(x) (((x) >> S_WINDOWPROBE_MAX) & M_WINDOWPROBE_MAX)
  869. #define S_RETRANSMISSION_MAX 16
  870. #define M_RETRANSMISSION_MAX 0xff
  871. #define V_RETRANSMISSION_MAX(x) ((x) << S_RETRANSMISSION_MAX)
  872. #define G_RETRANSMISSION_MAX(x) (((x) >> S_RETRANSMISSION_MAX) & M_RETRANSMISSION_MAX)
  873. #define S_SYN_MAX 24
  874. #define M_SYN_MAX 0xff
  875. #define V_SYN_MAX(x) ((x) << S_SYN_MAX)
  876. #define G_SYN_MAX(x) (((x) >> S_SYN_MAX) & M_SYN_MAX)
  877. #define A_TP_QOS_REG0 0x3e0
  878. #define S_L3_VALUE 0
  879. #define M_L3_VALUE 0x3f
  880. #define V_L3_VALUE(x) ((x) << S_L3_VALUE)
  881. #define G_L3_VALUE(x) (((x) >> S_L3_VALUE) & M_L3_VALUE)
  882. #define A_TP_QOS_REG1 0x3e4
  883. #define A_TP_QOS_REG2 0x3e8
  884. #define A_TP_QOS_REG3 0x3ec
  885. #define A_TP_QOS_REG4 0x3f0
  886. #define A_TP_QOS_REG5 0x3f4
  887. #define A_TP_QOS_REG6 0x3f8
  888. #define A_TP_QOS_REG7 0x3fc
  889. #define A_TP_MTU_REG0 0x404
  890. #define A_TP_MTU_REG1 0x408
  891. #define A_TP_MTU_REG2 0x40c
  892. #define A_TP_MTU_REG3 0x410
  893. #define A_TP_MTU_REG4 0x414
  894. #define A_TP_MTU_REG5 0x418
  895. #define A_TP_MTU_REG6 0x41c
  896. #define A_TP_MTU_REG7 0x420
  897. #define A_TP_RESET 0x44c
  898. #define S_TP_RESET 0
  899. #define V_TP_RESET(x) ((x) << S_TP_RESET)
  900. #define F_TP_RESET V_TP_RESET(1U)
  901. #define S_CM_MEMMGR_INIT 1
  902. #define V_CM_MEMMGR_INIT(x) ((x) << S_CM_MEMMGR_INIT)
  903. #define F_CM_MEMMGR_INIT V_CM_MEMMGR_INIT(1U)
  904. #define A_TP_MIB_INDEX 0x450
  905. #define A_TP_MIB_DATA 0x454
  906. #define A_TP_SYNC_TIME_HI 0x458
  907. #define A_TP_SYNC_TIME_LO 0x45c
  908. #define A_TP_CM_MM_RX_FLST_BASE 0x460
  909. #define S_CM_MEMMGR_RX_FREE_LIST_BASE 0
  910. #define M_CM_MEMMGR_RX_FREE_LIST_BASE 0xfffffff
  911. #define V_CM_MEMMGR_RX_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_RX_FREE_LIST_BASE)
  912. #define G_CM_MEMMGR_RX_FREE_LIST_BASE(x) (((x) >> S_CM_MEMMGR_RX_FREE_LIST_BASE) & M_CM_MEMMGR_RX_FREE_LIST_BASE)
  913. #define A_TP_CM_MM_TX_FLST_BASE 0x464
  914. #define S_CM_MEMMGR_TX_FREE_LIST_BASE 0
  915. #define M_CM_MEMMGR_TX_FREE_LIST_BASE 0xfffffff
  916. #define V_CM_MEMMGR_TX_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_TX_FREE_LIST_BASE)
  917. #define G_CM_MEMMGR_TX_FREE_LIST_BASE(x) (((x) >> S_CM_MEMMGR_TX_FREE_LIST_BASE) & M_CM_MEMMGR_TX_FREE_LIST_BASE)
  918. #define A_TP_CM_MM_P_FLST_BASE 0x468
  919. #define S_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE 0
  920. #define M_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE 0xfffffff
  921. #define V_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE(x) ((x) << S_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE)
  922. #define G_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE(x) (((x) >> S_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE) & M_CM_MEMMGR_PSTRUCT_FREE_LIST_BASE)
  923. #define A_TP_CM_MM_MAX_P 0x46c
  924. #define S_CM_MEMMGR_MAX_PSTRUCT 0
  925. #define M_CM_MEMMGR_MAX_PSTRUCT 0xfffffff
  926. #define V_CM_MEMMGR_MAX_PSTRUCT(x) ((x) << S_CM_MEMMGR_MAX_PSTRUCT)
  927. #define G_CM_MEMMGR_MAX_PSTRUCT(x) (((x) >> S_CM_MEMMGR_MAX_PSTRUCT) & M_CM_MEMMGR_MAX_PSTRUCT)
  928. #define A_TP_INT_ENABLE 0x470
  929. #define S_TX_FREE_LIST_EMPTY 0
  930. #define V_TX_FREE_LIST_EMPTY(x) ((x) << S_TX_FREE_LIST_EMPTY)
  931. #define F_TX_FREE_LIST_EMPTY V_TX_FREE_LIST_EMPTY(1U)
  932. #define S_RX_FREE_LIST_EMPTY 1
  933. #define V_RX_FREE_LIST_EMPTY(x) ((x) << S_RX_FREE_LIST_EMPTY)
  934. #define F_RX_FREE_LIST_EMPTY V_RX_FREE_LIST_EMPTY(1U)
  935. #define A_TP_INT_CAUSE 0x474
  936. #define A_TP_TIMER_SEPARATOR 0x4a4
  937. #define S_DISABLE_PAST_TIMER_INSERTION 0
  938. #define V_DISABLE_PAST_TIMER_INSERTION(x) ((x) << S_DISABLE_PAST_TIMER_INSERTION)
  939. #define F_DISABLE_PAST_TIMER_INSERTION V_DISABLE_PAST_TIMER_INSERTION(1U)
  940. #define S_MODULATION_TIMER_SEPARATOR 1
  941. #define M_MODULATION_TIMER_SEPARATOR 0x7fff
  942. #define V_MODULATION_TIMER_SEPARATOR(x) ((x) << S_MODULATION_TIMER_SEPARATOR)
  943. #define G_MODULATION_TIMER_SEPARATOR(x) (((x) >> S_MODULATION_TIMER_SEPARATOR) & M_MODULATION_TIMER_SEPARATOR)
  944. #define S_GLOBAL_TIMER_SEPARATOR 16
  945. #define M_GLOBAL_TIMER_SEPARATOR 0xffff
  946. #define V_GLOBAL_TIMER_SEPARATOR(x) ((x) << S_GLOBAL_TIMER_SEPARATOR)
  947. #define G_GLOBAL_TIMER_SEPARATOR(x) (((x) >> S_GLOBAL_TIMER_SEPARATOR) & M_GLOBAL_TIMER_SEPARATOR)
  948. #define A_TP_CM_FC_MODE 0x4b0
  949. #define A_TP_PC_CONGESTION_CNTL 0x4b4
  950. #define A_TP_TX_DROP_CONFIG 0x4b8
  951. #define S_ENABLE_TX_DROP 31
  952. #define V_ENABLE_TX_DROP(x) ((x) << S_ENABLE_TX_DROP)
  953. #define F_ENABLE_TX_DROP V_ENABLE_TX_DROP(1U)
  954. #define S_ENABLE_TX_ERROR 30
  955. #define V_ENABLE_TX_ERROR(x) ((x) << S_ENABLE_TX_ERROR)
  956. #define F_ENABLE_TX_ERROR V_ENABLE_TX_ERROR(1U)
  957. #define S_DROP_TICKS_CNT 4
  958. #define M_DROP_TICKS_CNT 0x3ffffff
  959. #define V_DROP_TICKS_CNT(x) ((x) << S_DROP_TICKS_CNT)
  960. #define G_DROP_TICKS_CNT(x) (((x) >> S_DROP_TICKS_CNT) & M_DROP_TICKS_CNT)
  961. #define S_NUM_PKTS_DROPPED 0
  962. #define M_NUM_PKTS_DROPPED 0xf
  963. #define V_NUM_PKTS_DROPPED(x) ((x) << S_NUM_PKTS_DROPPED)
  964. #define G_NUM_PKTS_DROPPED(x) (((x) >> S_NUM_PKTS_DROPPED) & M_NUM_PKTS_DROPPED)
  965. #define A_TP_TX_DROP_COUNT 0x4bc
  966. /* RAT registers */
  967. #define A_RAT_ROUTE_CONTROL 0x580
  968. #define S_USE_ROUTE_TABLE 0
  969. #define V_USE_ROUTE_TABLE(x) ((x) << S_USE_ROUTE_TABLE)
  970. #define F_USE_ROUTE_TABLE V_USE_ROUTE_TABLE(1U)
  971. #define S_ENABLE_CSPI 1
  972. #define V_ENABLE_CSPI(x) ((x) << S_ENABLE_CSPI)
  973. #define F_ENABLE_CSPI V_ENABLE_CSPI(1U)
  974. #define S_ENABLE_PCIX 2
  975. #define V_ENABLE_PCIX(x) ((x) << S_ENABLE_PCIX)
  976. #define F_ENABLE_PCIX V_ENABLE_PCIX(1U)
  977. #define A_RAT_ROUTE_TABLE_INDEX 0x584
  978. #define S_ROUTE_TABLE_INDEX 0
  979. #define M_ROUTE_TABLE_INDEX 0xf
  980. #define V_ROUTE_TABLE_INDEX(x) ((x) << S_ROUTE_TABLE_INDEX)
  981. #define G_ROUTE_TABLE_INDEX(x) (((x) >> S_ROUTE_TABLE_INDEX) & M_ROUTE_TABLE_INDEX)
  982. #define A_RAT_ROUTE_TABLE_DATA 0x588
  983. #define A_RAT_NO_ROUTE 0x58c
  984. #define S_CPL_OPCODE 0
  985. #define M_CPL_OPCODE 0xff
  986. #define V_CPL_OPCODE(x) ((x) << S_CPL_OPCODE)
  987. #define G_CPL_OPCODE(x) (((x) >> S_CPL_OPCODE) & M_CPL_OPCODE)
  988. #define A_RAT_INTR_ENABLE 0x590
  989. #define S_ZEROROUTEERROR 0
  990. #define V_ZEROROUTEERROR(x) ((x) << S_ZEROROUTEERROR)
  991. #define F_ZEROROUTEERROR V_ZEROROUTEERROR(1U)
  992. #define S_CSPIFRAMINGERROR 1
  993. #define V_CSPIFRAMINGERROR(x) ((x) << S_CSPIFRAMINGERROR)
  994. #define F_CSPIFRAMINGERROR V_CSPIFRAMINGERROR(1U)
  995. #define S_SGEFRAMINGERROR 2
  996. #define V_SGEFRAMINGERROR(x) ((x) << S_SGEFRAMINGERROR)
  997. #define F_SGEFRAMINGERROR V_SGEFRAMINGERROR(1U)
  998. #define S_TPFRAMINGERROR 3
  999. #define V_TPFRAMINGERROR(x) ((x) << S_TPFRAMINGERROR)
  1000. #define F_TPFRAMINGERROR V_TPFRAMINGERROR(1U)
  1001. #define A_RAT_INTR_CAUSE 0x594
  1002. /* CSPI registers */
  1003. #define A_CSPI_RX_AE_WM 0x810
  1004. #define A_CSPI_RX_AF_WM 0x814
  1005. #define A_CSPI_CALENDAR_LEN 0x818
  1006. #define S_CALENDARLENGTH 0
  1007. #define M_CALENDARLENGTH 0xffff
  1008. #define V_CALENDARLENGTH(x) ((x) << S_CALENDARLENGTH)
  1009. #define G_CALENDARLENGTH(x) (((x) >> S_CALENDARLENGTH) & M_CALENDARLENGTH)
  1010. #define A_CSPI_FIFO_STATUS_ENABLE 0x820
  1011. #define S_FIFOSTATUSENABLE 0
  1012. #define V_FIFOSTATUSENABLE(x) ((x) << S_FIFOSTATUSENABLE)
  1013. #define F_FIFOSTATUSENABLE V_FIFOSTATUSENABLE(1U)
  1014. #define A_CSPI_MAXBURST1_MAXBURST2 0x828
  1015. #define S_MAXBURST1 0
  1016. #define M_MAXBURST1 0xffff
  1017. #define V_MAXBURST1(x) ((x) << S_MAXBURST1)
  1018. #define G_MAXBURST1(x) (((x) >> S_MAXBURST1) & M_MAXBURST1)
  1019. #define S_MAXBURST2 16
  1020. #define M_MAXBURST2 0xffff
  1021. #define V_MAXBURST2(x) ((x) << S_MAXBURST2)
  1022. #define G_MAXBURST2(x) (((x) >> S_MAXBURST2) & M_MAXBURST2)
  1023. #define A_CSPI_TRAIN 0x82c
  1024. #define S_CSPI_TRAIN_ALPHA 0
  1025. #define M_CSPI_TRAIN_ALPHA 0xffff
  1026. #define V_CSPI_TRAIN_ALPHA(x) ((x) << S_CSPI_TRAIN_ALPHA)
  1027. #define G_CSPI_TRAIN_ALPHA(x) (((x) >> S_CSPI_TRAIN_ALPHA) & M_CSPI_TRAIN_ALPHA)
  1028. #define S_CSPI_TRAIN_DATA_MAXT 16
  1029. #define M_CSPI_TRAIN_DATA_MAXT 0xffff
  1030. #define V_CSPI_TRAIN_DATA_MAXT(x) ((x) << S_CSPI_TRAIN_DATA_MAXT)
  1031. #define G_CSPI_TRAIN_DATA_MAXT(x) (((x) >> S_CSPI_TRAIN_DATA_MAXT) & M_CSPI_TRAIN_DATA_MAXT)
  1032. #define A_CSPI_INTR_STATUS 0x848
  1033. #define S_DIP4ERR 0
  1034. #define V_DIP4ERR(x) ((x) << S_DIP4ERR)
  1035. #define F_DIP4ERR V_DIP4ERR(1U)
  1036. #define S_RXDROP 1
  1037. #define V_RXDROP(x) ((x) << S_RXDROP)
  1038. #define F_RXDROP V_RXDROP(1U)
  1039. #define S_TXDROP 2
  1040. #define V_TXDROP(x) ((x) << S_TXDROP)
  1041. #define F_TXDROP V_TXDROP(1U)
  1042. #define S_RXOVERFLOW 3
  1043. #define V_RXOVERFLOW(x) ((x) << S_RXOVERFLOW)
  1044. #define F_RXOVERFLOW V_RXOVERFLOW(1U)
  1045. #define S_RAMPARITYERR 4
  1046. #define V_RAMPARITYERR(x) ((x) << S_RAMPARITYERR)
  1047. #define F_RAMPARITYERR V_RAMPARITYERR(1U)
  1048. #define A_CSPI_INTR_ENABLE 0x84c
  1049. /* ESPI registers */
  1050. #define A_ESPI_SCH_TOKEN0 0x880
  1051. #define S_SCHTOKEN0 0
  1052. #define M_SCHTOKEN0 0xffff
  1053. #define V_SCHTOKEN0(x) ((x) << S_SCHTOKEN0)
  1054. #define G_SCHTOKEN0(x) (((x) >> S_SCHTOKEN0) & M_SCHTOKEN0)
  1055. #define A_ESPI_SCH_TOKEN1 0x884
  1056. #define S_SCHTOKEN1 0
  1057. #define M_SCHTOKEN1 0xffff
  1058. #define V_SCHTOKEN1(x) ((x) << S_SCHTOKEN1)
  1059. #define G_SCHTOKEN1(x) (((x) >> S_SCHTOKEN1) & M_SCHTOKEN1)
  1060. #define A_ESPI_SCH_TOKEN2 0x888
  1061. #define S_SCHTOKEN2 0
  1062. #define M_SCHTOKEN2 0xffff
  1063. #define V_SCHTOKEN2(x) ((x) << S_SCHTOKEN2)
  1064. #define G_SCHTOKEN2(x) (((x) >> S_SCHTOKEN2) & M_SCHTOKEN2)
  1065. #define A_ESPI_SCH_TOKEN3 0x88c
  1066. #define S_SCHTOKEN3 0
  1067. #define M_SCHTOKEN3 0xffff
  1068. #define V_SCHTOKEN3(x) ((x) << S_SCHTOKEN3)
  1069. #define G_SCHTOKEN3(x) (((x) >> S_SCHTOKEN3) & M_SCHTOKEN3)
  1070. #define A_ESPI_RX_FIFO_ALMOST_EMPTY_WATERMARK 0x890
  1071. #define S_ALMOSTEMPTY 0
  1072. #define M_ALMOSTEMPTY 0xffff
  1073. #define V_ALMOSTEMPTY(x) ((x) << S_ALMOSTEMPTY)
  1074. #define G_ALMOSTEMPTY(x) (((x) >> S_ALMOSTEMPTY) & M_ALMOSTEMPTY)
  1075. #define A_ESPI_RX_FIFO_ALMOST_FULL_WATERMARK 0x894
  1076. #define S_ALMOSTFULL 0
  1077. #define M_ALMOSTFULL 0xffff
  1078. #define V_ALMOSTFULL(x) ((x) << S_ALMOSTFULL)
  1079. #define G_ALMOSTFULL(x) (((x) >> S_ALMOSTFULL) & M_ALMOSTFULL)
  1080. #define A_ESPI_CALENDAR_LENGTH 0x898
  1081. #define A_PORT_CONFIG 0x89c
  1082. #define S_RX_NPORTS 0
  1083. #define M_RX_NPORTS 0xff
  1084. #define V_RX_NPORTS(x) ((x) << S_RX_NPORTS)
  1085. #define G_RX_NPORTS(x) (((x) >> S_RX_NPORTS) & M_RX_NPORTS)
  1086. #define S_TX_NPORTS 8
  1087. #define M_TX_NPORTS 0xff
  1088. #define V_TX_NPORTS(x) ((x) << S_TX_NPORTS)
  1089. #define G_TX_NPORTS(x) (((x) >> S_TX_NPORTS) & M_TX_NPORTS)
  1090. #define A_ESPI_FIFO_STATUS_ENABLE 0x8a0
  1091. #define S_RXSTATUSENABLE 0
  1092. #define V_RXSTATUSENABLE(x) ((x) << S_RXSTATUSENABLE)
  1093. #define F_RXSTATUSENABLE V_RXSTATUSENABLE(1U)
  1094. #define S_TXDROPENABLE 1
  1095. #define V_TXDROPENABLE(x) ((x) << S_TXDROPENABLE)
  1096. #define F_TXDROPENABLE V_TXDROPENABLE(1U)
  1097. #define S_RXENDIANMODE 2
  1098. #define V_RXENDIANMODE(x) ((x) << S_RXENDIANMODE)
  1099. #define F_RXENDIANMODE V_RXENDIANMODE(1U)
  1100. #define S_TXENDIANMODE 3
  1101. #define V_TXENDIANMODE(x) ((x) << S_TXENDIANMODE)
  1102. #define F_TXENDIANMODE V_TXENDIANMODE(1U)
  1103. #define S_INTEL1010MODE 4
  1104. #define V_INTEL1010MODE(x) ((x) << S_INTEL1010MODE)
  1105. #define F_INTEL1010MODE V_INTEL1010MODE(1U)
  1106. #define A_ESPI_MAXBURST1_MAXBURST2 0x8a8
  1107. #define A_ESPI_TRAIN 0x8ac
  1108. #define S_MAXTRAINALPHA 0
  1109. #define M_MAXTRAINALPHA 0xffff
  1110. #define V_MAXTRAINALPHA(x) ((x) << S_MAXTRAINALPHA)
  1111. #define G_MAXTRAINALPHA(x) (((x) >> S_MAXTRAINALPHA) & M_MAXTRAINALPHA)
  1112. #define S_MAXTRAINDATA 16
  1113. #define M_MAXTRAINDATA 0xffff
  1114. #define V_MAXTRAINDATA(x) ((x) << S_MAXTRAINDATA)
  1115. #define G_MAXTRAINDATA(x) (((x) >> S_MAXTRAINDATA) & M_MAXTRAINDATA)
  1116. #define A_RAM_STATUS 0x8b0
  1117. #define S_RXFIFOPARITYERROR 0
  1118. #define M_RXFIFOPARITYERROR 0x3ff
  1119. #define V_RXFIFOPARITYERROR(x) ((x) << S_RXFIFOPARITYERROR)
  1120. #define G_RXFIFOPARITYERROR(x) (((x) >> S_RXFIFOPARITYERROR) & M_RXFIFOPARITYERROR)
  1121. #define S_TXFIFOPARITYERROR 10
  1122. #define M_TXFIFOPARITYERROR 0x3ff
  1123. #define V_TXFIFOPARITYERROR(x) ((x) << S_TXFIFOPARITYERROR)
  1124. #define G_TXFIFOPARITYERROR(x) (((x) >> S_TXFIFOPARITYERROR) & M_TXFIFOPARITYERROR)
  1125. #define S_RXFIFOOVERFLOW 20
  1126. #define M_RXFIFOOVERFLOW 0x3ff
  1127. #define V_RXFIFOOVERFLOW(x) ((x) << S_RXFIFOOVERFLOW)
  1128. #define G_RXFIFOOVERFLOW(x) (((x) >> S_RXFIFOOVERFLOW) & M_RXFIFOOVERFLOW)
  1129. #define A_TX_DROP_COUNT0 0x8b4
  1130. #define S_TXPORT0DROPCNT 0
  1131. #define M_TXPORT0DROPCNT 0xffff
  1132. #define V_TXPORT0DROPCNT(x) ((x) << S_TXPORT0DROPCNT)
  1133. #define G_TXPORT0DROPCNT(x) (((x) >> S_TXPORT0DROPCNT) & M_TXPORT0DROPCNT)
  1134. #define S_TXPORT1DROPCNT 16
  1135. #define M_TXPORT1DROPCNT 0xffff
  1136. #define V_TXPORT1DROPCNT(x) ((x) << S_TXPORT1DROPCNT)
  1137. #define G_TXPORT1DROPCNT(x) (((x) >> S_TXPORT1DROPCNT) & M_TXPORT1DROPCNT)
  1138. #define A_TX_DROP_COUNT1 0x8b8
  1139. #define S_TXPORT2DROPCNT 0
  1140. #define M_TXPORT2DROPCNT 0xffff
  1141. #define V_TXPORT2DROPCNT(x) ((x) << S_TXPORT2DROPCNT)
  1142. #define G_TXPORT2DROPCNT(x) (((x) >> S_TXPORT2DROPCNT) & M_TXPORT2DROPCNT)
  1143. #define S_TXPORT3DROPCNT 16
  1144. #define M_TXPORT3DROPCNT 0xffff
  1145. #define V_TXPORT3DROPCNT(x) ((x) << S_TXPORT3DROPCNT)
  1146. #define G_TXPORT3DROPCNT(x) (((x) >> S_TXPORT3DROPCNT) & M_TXPORT3DROPCNT)
  1147. #define A_RX_DROP_COUNT0 0x8bc
  1148. #define S_RXPORT0DROPCNT 0
  1149. #define M_RXPORT0DROPCNT 0xffff
  1150. #define V_RXPORT0DROPCNT(x) ((x) << S_RXPORT0DROPCNT)
  1151. #define G_RXPORT0DROPCNT(x) (((x) >> S_RXPORT0DROPCNT) & M_RXPORT0DROPCNT)
  1152. #define S_RXPORT1DROPCNT 16
  1153. #define M_RXPORT1DROPCNT 0xffff
  1154. #define V_RXPORT1DROPCNT(x) ((x) << S_RXPORT1DROPCNT)
  1155. #define G_RXPORT1DROPCNT(x) (((x) >> S_RXPORT1DROPCNT) & M_RXPORT1DROPCNT)
  1156. #define A_RX_DROP_COUNT1 0x8c0
  1157. #define S_RXPORT2DROPCNT 0
  1158. #define M_RXPORT2DROPCNT 0xffff
  1159. #define V_RXPORT2DROPCNT(x) ((x) << S_RXPORT2DROPCNT)
  1160. #define G_RXPORT2DROPCNT(x) (((x) >> S_RXPORT2DROPCNT) & M_RXPORT2DROPCNT)
  1161. #define S_RXPORT3DROPCNT 16
  1162. #define M_RXPORT3DROPCNT 0xffff
  1163. #define V_RXPORT3DROPCNT(x) ((x) << S_RXPORT3DROPCNT)
  1164. #define G_RXPORT3DROPCNT(x) (((x) >> S_RXPORT3DROPCNT) & M_RXPORT3DROPCNT)
  1165. #define A_DIP4_ERROR_COUNT 0x8c4
  1166. #define S_DIP4ERRORCNT 0
  1167. #define M_DIP4ERRORCNT 0xfff
  1168. #define V_DIP4ERRORCNT(x) ((x) << S_DIP4ERRORCNT)
  1169. #define G_DIP4ERRORCNT(x) (((x) >> S_DIP4ERRORCNT) & M_DIP4ERRORCNT)
  1170. #define S_DIP4ERRORCNTSHADOW 12
  1171. #define M_DIP4ERRORCNTSHADOW 0xfff
  1172. #define V_DIP4ERRORCNTSHADOW(x) ((x) << S_DIP4ERRORCNTSHADOW)
  1173. #define G_DIP4ERRORCNTSHADOW(x) (((x) >> S_DIP4ERRORCNTSHADOW) & M_DIP4ERRORCNTSHADOW)
  1174. #define S_TRICN_RX_TRAIN_ERR 24
  1175. #define V_TRICN_RX_TRAIN_ERR(x) ((x) << S_TRICN_RX_TRAIN_ERR)
  1176. #define F_TRICN_RX_TRAIN_ERR V_TRICN_RX_TRAIN_ERR(1U)
  1177. #define S_TRICN_RX_TRAINING 25
  1178. #define V_TRICN_RX_TRAINING(x) ((x) << S_TRICN_RX_TRAINING)
  1179. #define F_TRICN_RX_TRAINING V_TRICN_RX_TRAINING(1U)
  1180. #define S_TRICN_RX_TRAIN_OK 26
  1181. #define V_TRICN_RX_TRAIN_OK(x) ((x) << S_TRICN_RX_TRAIN_OK)
  1182. #define F_TRICN_RX_TRAIN_OK V_TRICN_RX_TRAIN_OK(1U)
  1183. #define A_ESPI_INTR_STATUS 0x8c8
  1184. #define S_DIP2PARITYERR 5
  1185. #define V_DIP2PARITYERR(x) ((x) << S_DIP2PARITYERR)
  1186. #define F_DIP2PARITYERR V_DIP2PARITYERR(1U)
  1187. #define A_ESPI_INTR_ENABLE 0x8cc
  1188. #define A_RX_DROP_THRESHOLD 0x8d0
  1189. #define A_ESPI_RX_RESET 0x8ec
  1190. #define S_ESPI_RX_LNK_RST 0
  1191. #define V_ESPI_RX_LNK_RST(x) ((x) << S_ESPI_RX_LNK_RST)
  1192. #define F_ESPI_RX_LNK_RST V_ESPI_RX_LNK_RST(1U)
  1193. #define S_ESPI_RX_CORE_RST 1
  1194. #define V_ESPI_RX_CORE_RST(x) ((x) << S_ESPI_RX_CORE_RST)
  1195. #define F_ESPI_RX_CORE_RST V_ESPI_RX_CORE_RST(1U)
  1196. #define S_RX_CLK_STATUS 2
  1197. #define V_RX_CLK_STATUS(x) ((x) << S_RX_CLK_STATUS)
  1198. #define F_RX_CLK_STATUS V_RX_CLK_STATUS(1U)
  1199. #define A_ESPI_MISC_CONTROL 0x8f0
  1200. #define S_OUT_OF_SYNC_COUNT 0
  1201. #define M_OUT_OF_SYNC_COUNT 0xf
  1202. #define V_OUT_OF_SYNC_COUNT(x) ((x) << S_OUT_OF_SYNC_COUNT)
  1203. #define G_OUT_OF_SYNC_COUNT(x) (((x) >> S_OUT_OF_SYNC_COUNT) & M_OUT_OF_SYNC_COUNT)
  1204. #define S_DIP2_COUNT_MODE_ENABLE 4
  1205. #define V_DIP2_COUNT_MODE_ENABLE(x) ((x) << S_DIP2_COUNT_MODE_ENABLE)
  1206. #define F_DIP2_COUNT_MODE_ENABLE V_DIP2_COUNT_MODE_ENABLE(1U)
  1207. #define S_DIP2_PARITY_ERR_THRES 5
  1208. #define M_DIP2_PARITY_ERR_THRES 0xf
  1209. #define V_DIP2_PARITY_ERR_THRES(x) ((x) << S_DIP2_PARITY_ERR_THRES)
  1210. #define G_DIP2_PARITY_ERR_THRES(x) (((x) >> S_DIP2_PARITY_ERR_THRES) & M_DIP2_PARITY_ERR_THRES)
  1211. #define S_DIP4_THRES 9
  1212. #define M_DIP4_THRES 0xfff
  1213. #define V_DIP4_THRES(x) ((x) << S_DIP4_THRES)
  1214. #define G_DIP4_THRES(x) (((x) >> S_DIP4_THRES) & M_DIP4_THRES)
  1215. #define S_DIP4_THRES_ENABLE 21
  1216. #define V_DIP4_THRES_ENABLE(x) ((x) << S_DIP4_THRES_ENABLE)
  1217. #define F_DIP4_THRES_ENABLE V_DIP4_THRES_ENABLE(1U)
  1218. #define S_FORCE_DISABLE_STATUS 22
  1219. #define V_FORCE_DISABLE_STATUS(x) ((x) << S_FORCE_DISABLE_STATUS)
  1220. #define F_FORCE_DISABLE_STATUS V_FORCE_DISABLE_STATUS(1U)
  1221. #define S_DYNAMIC_DESKEW 23
  1222. #define V_DYNAMIC_DESKEW(x) ((x) << S_DYNAMIC_DESKEW)
  1223. #define F_DYNAMIC_DESKEW V_DYNAMIC_DESKEW(1U)
  1224. #define S_MONITORED_PORT_NUM 25
  1225. #define M_MONITORED_PORT_NUM 0x3
  1226. #define V_MONITORED_PORT_NUM(x) ((x) << S_MONITORED_PORT_NUM)
  1227. #define G_MONITORED_PORT_NUM(x) (((x) >> S_MONITORED_PORT_NUM) & M_MONITORED_PORT_NUM)
  1228. #define S_MONITORED_DIRECTION 27
  1229. #define V_MONITORED_DIRECTION(x) ((x) << S_MONITORED_DIRECTION)
  1230. #define F_MONITORED_DIRECTION V_MONITORED_DIRECTION(1U)
  1231. #define S_MONITORED_INTERFACE 28
  1232. #define V_MONITORED_INTERFACE(x) ((x) << S_MONITORED_INTERFACE)
  1233. #define F_MONITORED_INTERFACE V_MONITORED_INTERFACE(1U)
  1234. #define A_ESPI_DIP2_ERR_COUNT 0x8f4
  1235. #define S_DIP2_ERR_CNT 0
  1236. #define M_DIP2_ERR_CNT 0xf
  1237. #define V_DIP2_ERR_CNT(x) ((x) << S_DIP2_ERR_CNT)
  1238. #define G_DIP2_ERR_CNT(x) (((x) >> S_DIP2_ERR_CNT) & M_DIP2_ERR_CNT)
  1239. #define A_ESPI_CMD_ADDR 0x8f8
  1240. #define S_WRITE_DATA 0
  1241. #define M_WRITE_DATA 0xff
  1242. #define V_WRITE_DATA(x) ((x) << S_WRITE_DATA)
  1243. #define G_WRITE_DATA(x) (((x) >> S_WRITE_DATA) & M_WRITE_DATA)
  1244. #define S_REGISTER_OFFSET 8
  1245. #define M_REGISTER_OFFSET 0xf
  1246. #define V_REGISTER_OFFSET(x) ((x) << S_REGISTER_OFFSET)
  1247. #define G_REGISTER_OFFSET(x) (((x) >> S_REGISTER_OFFSET) & M_REGISTER_OFFSET)
  1248. #define S_CHANNEL_ADDR 12
  1249. #define M_CHANNEL_ADDR 0xf
  1250. #define V_CHANNEL_ADDR(x) ((x) << S_CHANNEL_ADDR)
  1251. #define G_CHANNEL_ADDR(x) (((x) >> S_CHANNEL_ADDR) & M_CHANNEL_ADDR)
  1252. #define S_MODULE_ADDR 16
  1253. #define M_MODULE_ADDR 0x3
  1254. #define V_MODULE_ADDR(x) ((x) << S_MODULE_ADDR)
  1255. #define G_MODULE_ADDR(x) (((x) >> S_MODULE_ADDR) & M_MODULE_ADDR)
  1256. #define S_BUNDLE_ADDR 20
  1257. #define M_BUNDLE_ADDR 0x3
  1258. #define V_BUNDLE_ADDR(x) ((x) << S_BUNDLE_ADDR)
  1259. #define G_BUNDLE_ADDR(x) (((x) >> S_BUNDLE_ADDR) & M_BUNDLE_ADDR)
  1260. #define S_SPI4_COMMAND 24
  1261. #define M_SPI4_COMMAND 0xff
  1262. #define V_SPI4_COMMAND(x) ((x) << S_SPI4_COMMAND)
  1263. #define G_SPI4_COMMAND(x) (((x) >> S_SPI4_COMMAND) & M_SPI4_COMMAND)
  1264. #define A_ESPI_GOSTAT 0x8fc
  1265. #define S_READ_DATA 0
  1266. #define M_READ_DATA 0xff
  1267. #define V_READ_DATA(x) ((x) << S_READ_DATA)
  1268. #define G_READ_DATA(x) (((x) >> S_READ_DATA) & M_READ_DATA)
  1269. #define S_ESPI_CMD_BUSY 8
  1270. #define V_ESPI_CMD_BUSY(x) ((x) << S_ESPI_CMD_BUSY)
  1271. #define F_ESPI_CMD_BUSY V_ESPI_CMD_BUSY(1U)
  1272. #define S_ERROR_ACK 9
  1273. #define V_ERROR_ACK(x) ((x) << S_ERROR_ACK)
  1274. #define F_ERROR_ACK V_ERROR_ACK(1U)
  1275. #define S_UNMAPPED_ERR 10
  1276. #define V_UNMAPPED_ERR(x) ((x) << S_UNMAPPED_ERR)
  1277. #define F_UNMAPPED_ERR V_UNMAPPED_ERR(1U)
  1278. #define S_TRANSACTION_TIMER 16
  1279. #define M_TRANSACTION_TIMER 0xff
  1280. #define V_TRANSACTION_TIMER(x) ((x) << S_TRANSACTION_TIMER)
  1281. #define G_TRANSACTION_TIMER(x) (((x) >> S_TRANSACTION_TIMER) & M_TRANSACTION_TIMER)
  1282. /* ULP registers */
  1283. #define A_ULP_ULIMIT 0x980
  1284. #define A_ULP_TAGMASK 0x984
  1285. #define A_ULP_HREG_INDEX 0x988
  1286. #define A_ULP_HREG_DATA 0x98c
  1287. #define A_ULP_INT_ENABLE 0x990
  1288. #define A_ULP_INT_CAUSE 0x994
  1289. #define S_HREG_PAR_ERR 0
  1290. #define V_HREG_PAR_ERR(x) ((x) << S_HREG_PAR_ERR)
  1291. #define F_HREG_PAR_ERR V_HREG_PAR_ERR(1U)
  1292. #define S_EGRS_DATA_PAR_ERR 1
  1293. #define V_EGRS_DATA_PAR_ERR(x) ((x) << S_EGRS_DATA_PAR_ERR)
  1294. #define F_EGRS_DATA_PAR_ERR V_EGRS_DATA_PAR_ERR(1U)
  1295. #define S_INGRS_DATA_PAR_ERR 2
  1296. #define V_INGRS_DATA_PAR_ERR(x) ((x) << S_INGRS_DATA_PAR_ERR)
  1297. #define F_INGRS_DATA_PAR_ERR V_INGRS_DATA_PAR_ERR(1U)
  1298. #define S_PM_INTR 3
  1299. #define V_PM_INTR(x) ((x) << S_PM_INTR)
  1300. #define F_PM_INTR V_PM_INTR(1U)
  1301. #define S_PM_E2C_SYNC_ERR 4
  1302. #define V_PM_E2C_SYNC_ERR(x) ((x) << S_PM_E2C_SYNC_ERR)
  1303. #define F_PM_E2C_SYNC_ERR V_PM_E2C_SYNC_ERR(1U)
  1304. #define S_PM_C2E_SYNC_ERR 5
  1305. #define V_PM_C2E_SYNC_ERR(x) ((x) << S_PM_C2E_SYNC_ERR)
  1306. #define F_PM_C2E_SYNC_ERR V_PM_C2E_SYNC_ERR(1U)
  1307. #define S_PM_E2C_EMPTY_ERR 6
  1308. #define V_PM_E2C_EMPTY_ERR(x) ((x) << S_PM_E2C_EMPTY_ERR)
  1309. #define F_PM_E2C_EMPTY_ERR V_PM_E2C_EMPTY_ERR(1U)
  1310. #define S_PM_C2E_EMPTY_ERR 7
  1311. #define V_PM_C2E_EMPTY_ERR(x) ((x) << S_PM_C2E_EMPTY_ERR)
  1312. #define F_PM_C2E_EMPTY_ERR V_PM_C2E_EMPTY_ERR(1U)
  1313. #define S_PM_PAR_ERR 8
  1314. #define M_PM_PAR_ERR 0xffff
  1315. #define V_PM_PAR_ERR(x) ((x) << S_PM_PAR_ERR)
  1316. #define G_PM_PAR_ERR(x) (((x) >> S_PM_PAR_ERR) & M_PM_PAR_ERR)
  1317. #define S_PM_E2C_WRT_FULL 24
  1318. #define V_PM_E2C_WRT_FULL(x) ((x) << S_PM_E2C_WRT_FULL)
  1319. #define F_PM_E2C_WRT_FULL V_PM_E2C_WRT_FULL(1U)
  1320. #define S_PM_C2E_WRT_FULL 25
  1321. #define V_PM_C2E_WRT_FULL(x) ((x) << S_PM_C2E_WRT_FULL)
  1322. #define F_PM_C2E_WRT_FULL V_PM_C2E_WRT_FULL(1U)
  1323. #define A_ULP_PIO_CTRL 0x998
  1324. /* PL registers */
  1325. #define A_PL_ENABLE 0xa00
  1326. #define S_PL_INTR_SGE_ERR 0
  1327. #define V_PL_INTR_SGE_ERR(x) ((x) << S_PL_INTR_SGE_ERR)
  1328. #define F_PL_INTR_SGE_ERR V_PL_INTR_SGE_ERR(1U)
  1329. #define S_PL_INTR_SGE_DATA 1
  1330. #define V_PL_INTR_SGE_DATA(x) ((x) << S_PL_INTR_SGE_DATA)
  1331. #define F_PL_INTR_SGE_DATA V_PL_INTR_SGE_DATA(1U)
  1332. #define S_PL_INTR_MC3 2
  1333. #define V_PL_INTR_MC3(x) ((x) << S_PL_INTR_MC3)
  1334. #define F_PL_INTR_MC3 V_PL_INTR_MC3(1U)
  1335. #define S_PL_INTR_MC4 3
  1336. #define V_PL_INTR_MC4(x) ((x) << S_PL_INTR_MC4)
  1337. #define F_PL_INTR_MC4 V_PL_INTR_MC4(1U)
  1338. #define S_PL_INTR_MC5 4
  1339. #define V_PL_INTR_MC5(x) ((x) << S_PL_INTR_MC5)
  1340. #define F_PL_INTR_MC5 V_PL_INTR_MC5(1U)
  1341. #define S_PL_INTR_RAT 5
  1342. #define V_PL_INTR_RAT(x) ((x) << S_PL_INTR_RAT)
  1343. #define F_PL_INTR_RAT V_PL_INTR_RAT(1U)
  1344. #define S_PL_INTR_TP 6
  1345. #define V_PL_INTR_TP(x) ((x) << S_PL_INTR_TP)
  1346. #define F_PL_INTR_TP V_PL_INTR_TP(1U)
  1347. #define S_PL_INTR_ULP 7
  1348. #define V_PL_INTR_ULP(x) ((x) << S_PL_INTR_ULP)
  1349. #define F_PL_INTR_ULP V_PL_INTR_ULP(1U)
  1350. #define S_PL_INTR_ESPI 8
  1351. #define V_PL_INTR_ESPI(x) ((x) << S_PL_INTR_ESPI)
  1352. #define F_PL_INTR_ESPI V_PL_INTR_ESPI(1U)
  1353. #define S_PL_INTR_CSPI 9
  1354. #define V_PL_INTR_CSPI(x) ((x) << S_PL_INTR_CSPI)
  1355. #define F_PL_INTR_CSPI V_PL_INTR_CSPI(1U)
  1356. #define S_PL_INTR_PCIX 10
  1357. #define V_PL_INTR_PCIX(x) ((x) << S_PL_INTR_PCIX)
  1358. #define F_PL_INTR_PCIX V_PL_INTR_PCIX(1U)
  1359. #define S_PL_INTR_EXT 11
  1360. #define V_PL_INTR_EXT(x) ((x) << S_PL_INTR_EXT)
  1361. #define F_PL_INTR_EXT V_PL_INTR_EXT(1U)
  1362. #define A_PL_CAUSE 0xa04
  1363. /* MC5 registers */
  1364. #define A_MC5_CONFIG 0xc04
  1365. #define S_MODE 0
  1366. #define V_MODE(x) ((x) << S_MODE)
  1367. #define F_MODE V_MODE(1U)
  1368. #define S_TCAM_RESET 1
  1369. #define V_TCAM_RESET(x) ((x) << S_TCAM_RESET)
  1370. #define F_TCAM_RESET V_TCAM_RESET(1U)
  1371. #define S_TCAM_READY 2
  1372. #define V_TCAM_READY(x) ((x) << S_TCAM_READY)
  1373. #define F_TCAM_READY V_TCAM_READY(1U)
  1374. #define S_DBGI_ENABLE 4
  1375. #define V_DBGI_ENABLE(x) ((x) << S_DBGI_ENABLE)
  1376. #define F_DBGI_ENABLE V_DBGI_ENABLE(1U)
  1377. #define S_M_BUS_ENABLE 5
  1378. #define V_M_BUS_ENABLE(x) ((x) << S_M_BUS_ENABLE)
  1379. #define F_M_BUS_ENABLE V_M_BUS_ENABLE(1U)
  1380. #define S_PARITY_ENABLE 6
  1381. #define V_PARITY_ENABLE(x) ((x) << S_PARITY_ENABLE)
  1382. #define F_PARITY_ENABLE V_PARITY_ENABLE(1U)
  1383. #define S_SYN_ISSUE_MODE 7
  1384. #define M_SYN_ISSUE_MODE 0x3
  1385. #define V_SYN_ISSUE_MODE(x) ((x) << S_SYN_ISSUE_MODE)
  1386. #define G_SYN_ISSUE_MODE(x) (((x) >> S_SYN_ISSUE_MODE) & M_SYN_ISSUE_MODE)
  1387. #define S_BUILD 16
  1388. #define V_BUILD(x) ((x) << S_BUILD)
  1389. #define F_BUILD V_BUILD(1U)
  1390. #define S_COMPRESSION_ENABLE 17
  1391. #define V_COMPRESSION_ENABLE(x) ((x) << S_COMPRESSION_ENABLE)
  1392. #define F_COMPRESSION_ENABLE V_COMPRESSION_ENABLE(1U)
  1393. #define S_NUM_LIP 18
  1394. #define M_NUM_LIP 0x3f
  1395. #define V_NUM_LIP(x) ((x) << S_NUM_LIP)
  1396. #define G_NUM_LIP(x) (((x) >> S_NUM_LIP) & M_NUM_LIP)
  1397. #define S_TCAM_PART_CNT 24
  1398. #define M_TCAM_PART_CNT 0x3
  1399. #define V_TCAM_PART_CNT(x) ((x) << S_TCAM_PART_CNT)
  1400. #define G_TCAM_PART_CNT(x) (((x) >> S_TCAM_PART_CNT) & M_TCAM_PART_CNT)
  1401. #define S_TCAM_PART_TYPE 26
  1402. #define M_TCAM_PART_TYPE 0x3
  1403. #define V_TCAM_PART_TYPE(x) ((x) << S_TCAM_PART_TYPE)
  1404. #define G_TCAM_PART_TYPE(x) (((x) >> S_TCAM_PART_TYPE) & M_TCAM_PART_TYPE)
  1405. #define S_TCAM_PART_SIZE 28
  1406. #define M_TCAM_PART_SIZE 0x3
  1407. #define V_TCAM_PART_SIZE(x) ((x) << S_TCAM_PART_SIZE)
  1408. #define G_TCAM_PART_SIZE(x) (((x) >> S_TCAM_PART_SIZE) & M_TCAM_PART_SIZE)
  1409. #define S_TCAM_PART_TYPE_HI 30
  1410. #define V_TCAM_PART_TYPE_HI(x) ((x) << S_TCAM_PART_TYPE_HI)
  1411. #define F_TCAM_PART_TYPE_HI V_TCAM_PART_TYPE_HI(1U)
  1412. #define A_MC5_SIZE 0xc08
  1413. #define S_SIZE 0
  1414. #define M_SIZE 0x3fffff
  1415. #define V_SIZE(x) ((x) << S_SIZE)
  1416. #define G_SIZE(x) (((x) >> S_SIZE) & M_SIZE)
  1417. #define A_MC5_ROUTING_TABLE_INDEX 0xc0c
  1418. #define S_START_OF_ROUTING_TABLE 0
  1419. #define M_START_OF_ROUTING_TABLE 0x3fffff
  1420. #define V_START_OF_ROUTING_TABLE(x) ((x) << S_START_OF_ROUTING_TABLE)
  1421. #define G_START_OF_ROUTING_TABLE(x) (((x) >> S_START_OF_ROUTING_TABLE) & M_START_OF_ROUTING_TABLE)
  1422. #define A_MC5_SERVER_INDEX 0xc14
  1423. #define S_START_OF_SERVER_INDEX 0
  1424. #define M_START_OF_SERVER_INDEX 0x3fffff
  1425. #define V_START_OF_SERVER_INDEX(x) ((x) << S_START_OF_SERVER_INDEX)
  1426. #define G_START_OF_SERVER_INDEX(x) (((x) >> S_START_OF_SERVER_INDEX) & M_START_OF_SERVER_INDEX)
  1427. #define A_MC5_LIP_RAM_ADDR 0xc18
  1428. #define S_LOCAL_IP_RAM_ADDR 0
  1429. #define M_LOCAL_IP_RAM_ADDR 0x3f
  1430. #define V_LOCAL_IP_RAM_ADDR(x) ((x) << S_LOCAL_IP_RAM_ADDR)
  1431. #define G_LOCAL_IP_RAM_ADDR(x) (((x) >> S_LOCAL_IP_RAM_ADDR) & M_LOCAL_IP_RAM_ADDR)
  1432. #define S_RAM_WRITE_ENABLE 8
  1433. #define V_RAM_WRITE_ENABLE(x) ((x) << S_RAM_WRITE_ENABLE)
  1434. #define F_RAM_WRITE_ENABLE V_RAM_WRITE_ENABLE(1U)
  1435. #define A_MC5_LIP_RAM_DATA 0xc1c
  1436. #define A_MC5_RSP_LATENCY 0xc20
  1437. #define S_SEARCH_RESPONSE_LATENCY 0
  1438. #define M_SEARCH_RESPONSE_LATENCY 0x1f
  1439. #define V_SEARCH_RESPONSE_LATENCY(x) ((x) << S_SEARCH_RESPONSE_LATENCY)
  1440. #define G_SEARCH_RESPONSE_LATENCY(x) (((x) >> S_SEARCH_RESPONSE_LATENCY) & M_SEARCH_RESPONSE_LATENCY)
  1441. #define S_LEARN_RESPONSE_LATENCY 8
  1442. #define M_LEARN_RESPONSE_LATENCY 0x1f
  1443. #define V_LEARN_RESPONSE_LATENCY(x) ((x) << S_LEARN_RESPONSE_LATENCY)
  1444. #define G_LEARN_RESPONSE_LATENCY(x) (((x) >> S_LEARN_RESPONSE_LATENCY) & M_LEARN_RESPONSE_LATENCY)
  1445. #define A_MC5_PARITY_LATENCY 0xc24
  1446. #define S_SRCHLAT 0
  1447. #define M_SRCHLAT 0x1f
  1448. #define V_SRCHLAT(x) ((x) << S_SRCHLAT)
  1449. #define G_SRCHLAT(x) (((x) >> S_SRCHLAT) & M_SRCHLAT)
  1450. #define S_PARLAT 8
  1451. #define M_PARLAT 0x1f
  1452. #define V_PARLAT(x) ((x) << S_PARLAT)
  1453. #define G_PARLAT(x) (((x) >> S_PARLAT) & M_PARLAT)
  1454. #define A_MC5_WR_LRN_VERIFY 0xc28
  1455. #define S_POVEREN 0
  1456. #define V_POVEREN(x) ((x) << S_POVEREN)
  1457. #define F_POVEREN V_POVEREN(1U)
  1458. #define S_LRNVEREN 1
  1459. #define V_LRNVEREN(x) ((x) << S_LRNVEREN)
  1460. #define F_LRNVEREN V_LRNVEREN(1U)
  1461. #define S_VWVEREN 2
  1462. #define V_VWVEREN(x) ((x) << S_VWVEREN)
  1463. #define F_VWVEREN V_VWVEREN(1U)
  1464. #define A_MC5_PART_ID_INDEX 0xc2c
  1465. #define S_IDINDEX 0
  1466. #define M_IDINDEX 0xf
  1467. #define V_IDINDEX(x) ((x) << S_IDINDEX)
  1468. #define G_IDINDEX(x) (((x) >> S_IDINDEX) & M_IDINDEX)
  1469. #define A_MC5_RESET_MAX 0xc30
  1470. #define S_RSTMAX 0
  1471. #define M_RSTMAX 0x1ff
  1472. #define V_RSTMAX(x) ((x) << S_RSTMAX)
  1473. #define G_RSTMAX(x) (((x) >> S_RSTMAX) & M_RSTMAX)
  1474. #define A_MC5_INT_ENABLE 0xc40
  1475. #define S_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR 0
  1476. #define V_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR(x) ((x) << S_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR)
  1477. #define F_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR V_MC5_INT_HIT_OUT_ACTIVE_REGION_ERR(1U)
  1478. #define S_MC5_INT_HIT_IN_ACTIVE_REGION_ERR 1
  1479. #define V_MC5_INT_HIT_IN_ACTIVE_REGION_ERR(x) ((x) << S_MC5_INT_HIT_IN_ACTIVE_REGION_ERR)
  1480. #define F_MC5_INT_HIT_IN_ACTIVE_REGION_ERR V_MC5_INT_HIT_IN_ACTIVE_REGION_ERR(1U)
  1481. #define S_MC5_INT_HIT_IN_RT_REGION_ERR 2
  1482. #define V_MC5_INT_HIT_IN_RT_REGION_ERR(x) ((x) << S_MC5_INT_HIT_IN_RT_REGION_ERR)
  1483. #define F_MC5_INT_HIT_IN_RT_REGION_ERR V_MC5_INT_HIT_IN_RT_REGION_ERR(1U)
  1484. #define S_MC5_INT_MISS_ERR 3
  1485. #define V_MC5_INT_MISS_ERR(x) ((x) << S_MC5_INT_MISS_ERR)
  1486. #define F_MC5_INT_MISS_ERR V_MC5_INT_MISS_ERR(1U)
  1487. #define S_MC5_INT_LIP0_ERR 4
  1488. #define V_MC5_INT_LIP0_ERR(x) ((x) << S_MC5_INT_LIP0_ERR)
  1489. #define F_MC5_INT_LIP0_ERR V_MC5_INT_LIP0_ERR(1U)
  1490. #define S_MC5_INT_LIP_MISS_ERR 5
  1491. #define V_MC5_INT_LIP_MISS_ERR(x) ((x) << S_MC5_INT_LIP_MISS_ERR)
  1492. #define F_MC5_INT_LIP_MISS_ERR V_MC5_INT_LIP_MISS_ERR(1U)
  1493. #define S_MC5_INT_PARITY_ERR 6
  1494. #define V_MC5_INT_PARITY_ERR(x) ((x) << S_MC5_INT_PARITY_ERR)
  1495. #define F_MC5_INT_PARITY_ERR V_MC5_INT_PARITY_ERR(1U)
  1496. #define S_MC5_INT_ACTIVE_REGION_FULL 7
  1497. #define V_MC5_INT_ACTIVE_REGION_FULL(x) ((x) << S_MC5_INT_ACTIVE_REGION_FULL)
  1498. #define F_MC5_INT_ACTIVE_REGION_FULL V_MC5_INT_ACTIVE_REGION_FULL(1U)
  1499. #define S_MC5_INT_NFA_SRCH_ERR 8
  1500. #define V_MC5_INT_NFA_SRCH_ERR(x) ((x) << S_MC5_INT_NFA_SRCH_ERR)
  1501. #define F_MC5_INT_NFA_SRCH_ERR V_MC5_INT_NFA_SRCH_ERR(1U)
  1502. #define S_MC5_INT_SYN_COOKIE 9
  1503. #define V_MC5_INT_SYN_COOKIE(x) ((x) << S_MC5_INT_SYN_COOKIE)
  1504. #define F_MC5_INT_SYN_COOKIE V_MC5_INT_SYN_COOKIE(1U)
  1505. #define S_MC5_INT_SYN_COOKIE_BAD 10
  1506. #define V_MC5_INT_SYN_COOKIE_BAD(x) ((x) << S_MC5_INT_SYN_COOKIE_BAD)
  1507. #define F_MC5_INT_SYN_COOKIE_BAD V_MC5_INT_SYN_COOKIE_BAD(1U)
  1508. #define S_MC5_INT_SYN_COOKIE_OFF 11
  1509. #define V_MC5_INT_SYN_COOKIE_OFF(x) ((x) << S_MC5_INT_SYN_COOKIE_OFF)
  1510. #define F_MC5_INT_SYN_COOKIE_OFF V_MC5_INT_SYN_COOKIE_OFF(1U)
  1511. #define S_MC5_INT_UNKNOWN_CMD 15
  1512. #define V_MC5_INT_UNKNOWN_CMD(x) ((x) << S_MC5_INT_UNKNOWN_CMD)
  1513. #define F_MC5_INT_UNKNOWN_CMD V_MC5_INT_UNKNOWN_CMD(1U)
  1514. #define S_MC5_INT_REQUESTQ_PARITY_ERR 16
  1515. #define V_MC5_INT_REQUESTQ_PARITY_ERR(x) ((x) << S_MC5_INT_REQUESTQ_PARITY_ERR)
  1516. #define F_MC5_INT_REQUESTQ_PARITY_ERR V_MC5_INT_REQUESTQ_PARITY_ERR(1U)
  1517. #define S_MC5_INT_DISPATCHQ_PARITY_ERR 17
  1518. #define V_MC5_INT_DISPATCHQ_PARITY_ERR(x) ((x) << S_MC5_INT_DISPATCHQ_PARITY_ERR)
  1519. #define F_MC5_INT_DISPATCHQ_PARITY_ERR V_MC5_INT_DISPATCHQ_PARITY_ERR(1U)
  1520. #define S_MC5_INT_DEL_ACT_EMPTY 18
  1521. #define V_MC5_INT_DEL_ACT_EMPTY(x) ((x) << S_MC5_INT_DEL_ACT_EMPTY)
  1522. #define F_MC5_INT_DEL_ACT_EMPTY V_MC5_INT_DEL_ACT_EMPTY(1U)
  1523. #define A_MC5_INT_CAUSE 0xc44
  1524. #define A_MC5_INT_TID 0xc48
  1525. #define A_MC5_INT_PTID 0xc4c
  1526. #define A_MC5_DBGI_CONFIG 0xc74
  1527. #define A_MC5_DBGI_REQ_CMD 0xc78
  1528. #define S_CMDMODE 0
  1529. #define M_CMDMODE 0x7
  1530. #define V_CMDMODE(x) ((x) << S_CMDMODE)
  1531. #define G_CMDMODE(x) (((x) >> S_CMDMODE) & M_CMDMODE)
  1532. #define S_SADRSEL 4
  1533. #define V_SADRSEL(x) ((x) << S_SADRSEL)
  1534. #define F_SADRSEL V_SADRSEL(1U)
  1535. #define S_WRITE_BURST_SIZE 22
  1536. #define M_WRITE_BURST_SIZE 0x3ff
  1537. #define V_WRITE_BURST_SIZE(x) ((x) << S_WRITE_BURST_SIZE)
  1538. #define G_WRITE_BURST_SIZE(x) (((x) >> S_WRITE_BURST_SIZE) & M_WRITE_BURST_SIZE)
  1539. #define A_MC5_DBGI_REQ_ADDR0 0xc7c
  1540. #define A_MC5_DBGI_REQ_ADDR1 0xc80
  1541. #define A_MC5_DBGI_REQ_ADDR2 0xc84
  1542. #define A_MC5_DBGI_REQ_DATA0 0xc88
  1543. #define A_MC5_DBGI_REQ_DATA1 0xc8c
  1544. #define A_MC5_DBGI_REQ_DATA2 0xc90
  1545. #define A_MC5_DBGI_REQ_DATA3 0xc94
  1546. #define A_MC5_DBGI_REQ_DATA4 0xc98
  1547. #define A_MC5_DBGI_REQ_MASK0 0xc9c
  1548. #define A_MC5_DBGI_REQ_MASK1 0xca0
  1549. #define A_MC5_DBGI_REQ_MASK2 0xca4
  1550. #define A_MC5_DBGI_REQ_MASK3 0xca8
  1551. #define A_MC5_DBGI_REQ_MASK4 0xcac
  1552. #define A_MC5_DBGI_RSP_STATUS 0xcb0
  1553. #define S_DBGI_RSP_VALID 0
  1554. #define V_DBGI_RSP_VALID(x) ((x) << S_DBGI_RSP_VALID)
  1555. #define F_DBGI_RSP_VALID V_DBGI_RSP_VALID(1U)
  1556. #define S_DBGI_RSP_HIT 1
  1557. #define V_DBGI_RSP_HIT(x) ((x) << S_DBGI_RSP_HIT)
  1558. #define F_DBGI_RSP_HIT V_DBGI_RSP_HIT(1U)
  1559. #define S_DBGI_RSP_ERR 2
  1560. #define V_DBGI_RSP_ERR(x) ((x) << S_DBGI_RSP_ERR)
  1561. #define F_DBGI_RSP_ERR V_DBGI_RSP_ERR(1U)
  1562. #define S_DBGI_RSP_ERR_REASON 8
  1563. #define M_DBGI_RSP_ERR_REASON 0x7
  1564. #define V_DBGI_RSP_ERR_REASON(x) ((x) << S_DBGI_RSP_ERR_REASON)
  1565. #define G_DBGI_RSP_ERR_REASON(x) (((x) >> S_DBGI_RSP_ERR_REASON) & M_DBGI_RSP_ERR_REASON)
  1566. #define A_MC5_DBGI_RSP_DATA0 0xcb4
  1567. #define A_MC5_DBGI_RSP_DATA1 0xcb8
  1568. #define A_MC5_DBGI_RSP_DATA2 0xcbc
  1569. #define A_MC5_DBGI_RSP_DATA3 0xcc0
  1570. #define A_MC5_DBGI_RSP_DATA4 0xcc4
  1571. #define A_MC5_DBGI_RSP_LAST_CMD 0xcc8
  1572. #define A_MC5_POPEN_DATA_WR_CMD 0xccc
  1573. #define A_MC5_POPEN_MASK_WR_CMD 0xcd0
  1574. #define A_MC5_AOPEN_SRCH_CMD 0xcd4
  1575. #define A_MC5_AOPEN_LRN_CMD 0xcd8
  1576. #define A_MC5_SYN_SRCH_CMD 0xcdc
  1577. #define A_MC5_SYN_LRN_CMD 0xce0
  1578. #define A_MC5_ACK_SRCH_CMD 0xce4
  1579. #define A_MC5_ACK_LRN_CMD 0xce8
  1580. #define A_MC5_ILOOKUP_CMD 0xcec
  1581. #define A_MC5_ELOOKUP_CMD 0xcf0
  1582. #define A_MC5_DATA_WRITE_CMD 0xcf4
  1583. #define A_MC5_DATA_READ_CMD 0xcf8
  1584. #define A_MC5_MASK_WRITE_CMD 0xcfc
  1585. /* PCICFG registers */
  1586. #define A_PCICFG_PM_CSR 0x44
  1587. #define A_PCICFG_VPD_ADDR 0x4a
  1588. #define S_VPD_ADDR 0
  1589. #define M_VPD_ADDR 0x7fff
  1590. #define V_VPD_ADDR(x) ((x) << S_VPD_ADDR)
  1591. #define G_VPD_ADDR(x) (((x) >> S_VPD_ADDR) & M_VPD_ADDR)
  1592. #define S_VPD_OP_FLAG 15
  1593. #define V_VPD_OP_FLAG(x) ((x) << S_VPD_OP_FLAG)
  1594. #define F_VPD_OP_FLAG V_VPD_OP_FLAG(1U)
  1595. #define A_PCICFG_VPD_DATA 0x4c
  1596. #define A_PCICFG_PCIX_CMD 0x60
  1597. #define A_PCICFG_INTR_ENABLE 0xf4
  1598. #define S_MASTER_PARITY_ERR 0
  1599. #define V_MASTER_PARITY_ERR(x) ((x) << S_MASTER_PARITY_ERR)
  1600. #define F_MASTER_PARITY_ERR V_MASTER_PARITY_ERR(1U)
  1601. #define S_SIG_TARGET_ABORT 1
  1602. #define V_SIG_TARGET_ABORT(x) ((x) << S_SIG_TARGET_ABORT)
  1603. #define F_SIG_TARGET_ABORT V_SIG_TARGET_ABORT(1U)
  1604. #define S_RCV_TARGET_ABORT 2
  1605. #define V_RCV_TARGET_ABORT(x) ((x) << S_RCV_TARGET_ABORT)
  1606. #define F_RCV_TARGET_ABORT V_RCV_TARGET_ABORT(1U)
  1607. #define S_RCV_MASTER_ABORT 3
  1608. #define V_RCV_MASTER_ABORT(x) ((x) << S_RCV_MASTER_ABORT)
  1609. #define F_RCV_MASTER_ABORT V_RCV_MASTER_ABORT(1U)
  1610. #define S_SIG_SYS_ERR 4
  1611. #define V_SIG_SYS_ERR(x) ((x) << S_SIG_SYS_ERR)
  1612. #define F_SIG_SYS_ERR V_SIG_SYS_ERR(1U)
  1613. #define S_DET_PARITY_ERR 5
  1614. #define V_DET_PARITY_ERR(x) ((x) << S_DET_PARITY_ERR)
  1615. #define F_DET_PARITY_ERR V_DET_PARITY_ERR(1U)
  1616. #define S_PIO_PARITY_ERR 6
  1617. #define V_PIO_PARITY_ERR(x) ((x) << S_PIO_PARITY_ERR)
  1618. #define F_PIO_PARITY_ERR V_PIO_PARITY_ERR(1U)
  1619. #define S_WF_PARITY_ERR 7
  1620. #define V_WF_PARITY_ERR(x) ((x) << S_WF_PARITY_ERR)
  1621. #define F_WF_PARITY_ERR V_WF_PARITY_ERR(1U)
  1622. #define S_RF_PARITY_ERR 8
  1623. #define M_RF_PARITY_ERR 0x3
  1624. #define V_RF_PARITY_ERR(x) ((x) << S_RF_PARITY_ERR)
  1625. #define G_RF_PARITY_ERR(x) (((x) >> S_RF_PARITY_ERR) & M_RF_PARITY_ERR)
  1626. #define S_CF_PARITY_ERR 10
  1627. #define M_CF_PARITY_ERR 0x3
  1628. #define V_CF_PARITY_ERR(x) ((x) << S_CF_PARITY_ERR)
  1629. #define G_CF_PARITY_ERR(x) (((x) >> S_CF_PARITY_ERR) & M_CF_PARITY_ERR)
  1630. #define A_PCICFG_INTR_CAUSE 0xf8
  1631. #define A_PCICFG_MODE 0xfc
  1632. #define S_PCI_MODE_64BIT 0
  1633. #define V_PCI_MODE_64BIT(x) ((x) << S_PCI_MODE_64BIT)
  1634. #define F_PCI_MODE_64BIT V_PCI_MODE_64BIT(1U)
  1635. #define S_PCI_MODE_66MHZ 1
  1636. #define V_PCI_MODE_66MHZ(x) ((x) << S_PCI_MODE_66MHZ)
  1637. #define F_PCI_MODE_66MHZ V_PCI_MODE_66MHZ(1U)
  1638. #define S_PCI_MODE_PCIX_INITPAT 2
  1639. #define M_PCI_MODE_PCIX_INITPAT 0x7
  1640. #define V_PCI_MODE_PCIX_INITPAT(x) ((x) << S_PCI_MODE_PCIX_INITPAT)
  1641. #define G_PCI_MODE_PCIX_INITPAT(x) (((x) >> S_PCI_MODE_PCIX_INITPAT) & M_PCI_MODE_PCIX_INITPAT)
  1642. #define S_PCI_MODE_PCIX 5
  1643. #define V_PCI_MODE_PCIX(x) ((x) << S_PCI_MODE_PCIX)
  1644. #define F_PCI_MODE_PCIX V_PCI_MODE_PCIX(1U)
  1645. #define S_PCI_MODE_CLK 6
  1646. #define M_PCI_MODE_CLK 0x3
  1647. #define V_PCI_MODE_CLK(x) ((x) << S_PCI_MODE_CLK)
  1648. #define G_PCI_MODE_CLK(x) (((x) >> S_PCI_MODE_CLK) & M_PCI_MODE_CLK)
  1649. #endif /* _CXGB_REGS_H_ */