bfi_cbreg.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. /*
  2. * bfi_cbreg.h crossbow host block register definitions
  3. *
  4. * !!! Do not edit. Auto generated. !!!
  5. */
  6. #ifndef __BFI_CBREG_H__
  7. #define __BFI_CBREG_H__
  8. #define HOSTFN0_INT_STATUS 0x00014000
  9. #define __HOSTFN0_INT_STATUS_LVL_MK 0x00f00000
  10. #define __HOSTFN0_INT_STATUS_LVL_SH 20
  11. #define __HOSTFN0_INT_STATUS_LVL(_v) ((_v) << __HOSTFN0_INT_STATUS_LVL_SH)
  12. #define __HOSTFN0_INT_STATUS_P 0x000fffff
  13. #define HOSTFN0_INT_MSK 0x00014004
  14. #define HOST_PAGE_NUM_FN0 0x00014008
  15. #define __HOST_PAGE_NUM_FN 0x000001ff
  16. #define HOSTFN1_INT_STATUS 0x00014100
  17. #define __HOSTFN1_INT_STAT_LVL_MK 0x00f00000
  18. #define __HOSTFN1_INT_STAT_LVL_SH 20
  19. #define __HOSTFN1_INT_STAT_LVL(_v) ((_v) << __HOSTFN1_INT_STAT_LVL_SH)
  20. #define __HOSTFN1_INT_STAT_P 0x000fffff
  21. #define HOSTFN1_INT_MSK 0x00014104
  22. #define HOST_PAGE_NUM_FN1 0x00014108
  23. #define APP_PLL_400_CTL_REG 0x00014204
  24. #define __P_400_PLL_LOCK 0x80000000
  25. #define __APP_PLL_400_SRAM_USE_100MHZ 0x00100000
  26. #define __APP_PLL_400_RESET_TIMER_MK 0x000e0000
  27. #define __APP_PLL_400_RESET_TIMER_SH 17
  28. #define __APP_PLL_400_RESET_TIMER(_v) ((_v) << __APP_PLL_400_RESET_TIMER_SH)
  29. #define __APP_PLL_400_LOGIC_SOFT_RESET 0x00010000
  30. #define __APP_PLL_400_CNTLMT0_1_MK 0x0000c000
  31. #define __APP_PLL_400_CNTLMT0_1_SH 14
  32. #define __APP_PLL_400_CNTLMT0_1(_v) ((_v) << __APP_PLL_400_CNTLMT0_1_SH)
  33. #define __APP_PLL_400_JITLMT0_1_MK 0x00003000
  34. #define __APP_PLL_400_JITLMT0_1_SH 12
  35. #define __APP_PLL_400_JITLMT0_1(_v) ((_v) << __APP_PLL_400_JITLMT0_1_SH)
  36. #define __APP_PLL_400_HREF 0x00000800
  37. #define __APP_PLL_400_HDIV 0x00000400
  38. #define __APP_PLL_400_P0_1_MK 0x00000300
  39. #define __APP_PLL_400_P0_1_SH 8
  40. #define __APP_PLL_400_P0_1(_v) ((_v) << __APP_PLL_400_P0_1_SH)
  41. #define __APP_PLL_400_Z0_2_MK 0x000000e0
  42. #define __APP_PLL_400_Z0_2_SH 5
  43. #define __APP_PLL_400_Z0_2(_v) ((_v) << __APP_PLL_400_Z0_2_SH)
  44. #define __APP_PLL_400_RSEL200500 0x00000010
  45. #define __APP_PLL_400_ENARST 0x00000008
  46. #define __APP_PLL_400_BYPASS 0x00000004
  47. #define __APP_PLL_400_LRESETN 0x00000002
  48. #define __APP_PLL_400_ENABLE 0x00000001
  49. #define APP_PLL_212_CTL_REG 0x00014208
  50. #define __P_212_PLL_LOCK 0x80000000
  51. #define __APP_PLL_212_RESET_TIMER_MK 0x000e0000
  52. #define __APP_PLL_212_RESET_TIMER_SH 17
  53. #define __APP_PLL_212_RESET_TIMER(_v) ((_v) << __APP_PLL_212_RESET_TIMER_SH)
  54. #define __APP_PLL_212_LOGIC_SOFT_RESET 0x00010000
  55. #define __APP_PLL_212_CNTLMT0_1_MK 0x0000c000
  56. #define __APP_PLL_212_CNTLMT0_1_SH 14
  57. #define __APP_PLL_212_CNTLMT0_1(_v) ((_v) << __APP_PLL_212_CNTLMT0_1_SH)
  58. #define __APP_PLL_212_JITLMT0_1_MK 0x00003000
  59. #define __APP_PLL_212_JITLMT0_1_SH 12
  60. #define __APP_PLL_212_JITLMT0_1(_v) ((_v) << __APP_PLL_212_JITLMT0_1_SH)
  61. #define __APP_PLL_212_HREF 0x00000800
  62. #define __APP_PLL_212_HDIV 0x00000400
  63. #define __APP_PLL_212_P0_1_MK 0x00000300
  64. #define __APP_PLL_212_P0_1_SH 8
  65. #define __APP_PLL_212_P0_1(_v) ((_v) << __APP_PLL_212_P0_1_SH)
  66. #define __APP_PLL_212_Z0_2_MK 0x000000e0
  67. #define __APP_PLL_212_Z0_2_SH 5
  68. #define __APP_PLL_212_Z0_2(_v) ((_v) << __APP_PLL_212_Z0_2_SH)
  69. #define __APP_PLL_212_RSEL200500 0x00000010
  70. #define __APP_PLL_212_ENARST 0x00000008
  71. #define __APP_PLL_212_BYPASS 0x00000004
  72. #define __APP_PLL_212_LRESETN 0x00000002
  73. #define __APP_PLL_212_ENABLE 0x00000001
  74. #define HOST_SEM0_REG 0x00014230
  75. #define __HOST_SEMAPHORE 0x00000001
  76. #define HOST_SEM1_REG 0x00014234
  77. #define HOST_SEM2_REG 0x00014238
  78. #define HOST_SEM3_REG 0x0001423c
  79. #define HOST_SEM0_INFO_REG 0x00014240
  80. #define HOST_SEM1_INFO_REG 0x00014244
  81. #define HOST_SEM2_INFO_REG 0x00014248
  82. #define HOST_SEM3_INFO_REG 0x0001424c
  83. #define HOSTFN0_LPU0_CMD_STAT 0x00019000
  84. #define __HOSTFN0_LPU0_MBOX_INFO_MK 0xfffffffe
  85. #define __HOSTFN0_LPU0_MBOX_INFO_SH 1
  86. #define __HOSTFN0_LPU0_MBOX_INFO(_v) ((_v) << __HOSTFN0_LPU0_MBOX_INFO_SH)
  87. #define __HOSTFN0_LPU0_MBOX_CMD_STATUS 0x00000001
  88. #define LPU0_HOSTFN0_CMD_STAT 0x00019008
  89. #define __LPU0_HOSTFN0_MBOX_INFO_MK 0xfffffffe
  90. #define __LPU0_HOSTFN0_MBOX_INFO_SH 1
  91. #define __LPU0_HOSTFN0_MBOX_INFO(_v) ((_v) << __LPU0_HOSTFN0_MBOX_INFO_SH)
  92. #define __LPU0_HOSTFN0_MBOX_CMD_STATUS 0x00000001
  93. #define HOSTFN1_LPU1_CMD_STAT 0x00019014
  94. #define __HOSTFN1_LPU1_MBOX_INFO_MK 0xfffffffe
  95. #define __HOSTFN1_LPU1_MBOX_INFO_SH 1
  96. #define __HOSTFN1_LPU1_MBOX_INFO(_v) ((_v) << __HOSTFN1_LPU1_MBOX_INFO_SH)
  97. #define __HOSTFN1_LPU1_MBOX_CMD_STATUS 0x00000001
  98. #define LPU1_HOSTFN1_CMD_STAT 0x0001901c
  99. #define __LPU1_HOSTFN1_MBOX_INFO_MK 0xfffffffe
  100. #define __LPU1_HOSTFN1_MBOX_INFO_SH 1
  101. #define __LPU1_HOSTFN1_MBOX_INFO(_v) ((_v) << __LPU1_HOSTFN1_MBOX_INFO_SH)
  102. #define __LPU1_HOSTFN1_MBOX_CMD_STATUS 0x00000001
  103. #define CPE_Q0_DEPTH 0x00010014
  104. #define CPE_Q0_PI 0x0001001c
  105. #define CPE_Q0_CI 0x00010020
  106. #define CPE_Q1_DEPTH 0x00010034
  107. #define CPE_Q1_PI 0x0001003c
  108. #define CPE_Q1_CI 0x00010040
  109. #define CPE_Q2_DEPTH 0x00010054
  110. #define CPE_Q2_PI 0x0001005c
  111. #define CPE_Q2_CI 0x00010060
  112. #define CPE_Q3_DEPTH 0x00010074
  113. #define CPE_Q3_PI 0x0001007c
  114. #define CPE_Q3_CI 0x00010080
  115. #define CPE_Q4_DEPTH 0x00010094
  116. #define CPE_Q4_PI 0x0001009c
  117. #define CPE_Q4_CI 0x000100a0
  118. #define CPE_Q5_DEPTH 0x000100b4
  119. #define CPE_Q5_PI 0x000100bc
  120. #define CPE_Q5_CI 0x000100c0
  121. #define CPE_Q6_DEPTH 0x000100d4
  122. #define CPE_Q6_PI 0x000100dc
  123. #define CPE_Q6_CI 0x000100e0
  124. #define CPE_Q7_DEPTH 0x000100f4
  125. #define CPE_Q7_PI 0x000100fc
  126. #define CPE_Q7_CI 0x00010100
  127. #define RME_Q0_DEPTH 0x00011014
  128. #define RME_Q0_PI 0x0001101c
  129. #define RME_Q0_CI 0x00011020
  130. #define RME_Q1_DEPTH 0x00011034
  131. #define RME_Q1_PI 0x0001103c
  132. #define RME_Q1_CI 0x00011040
  133. #define RME_Q2_DEPTH 0x00011054
  134. #define RME_Q2_PI 0x0001105c
  135. #define RME_Q2_CI 0x00011060
  136. #define RME_Q3_DEPTH 0x00011074
  137. #define RME_Q3_PI 0x0001107c
  138. #define RME_Q3_CI 0x00011080
  139. #define RME_Q4_DEPTH 0x00011094
  140. #define RME_Q4_PI 0x0001109c
  141. #define RME_Q4_CI 0x000110a0
  142. #define RME_Q5_DEPTH 0x000110b4
  143. #define RME_Q5_PI 0x000110bc
  144. #define RME_Q5_CI 0x000110c0
  145. #define RME_Q6_DEPTH 0x000110d4
  146. #define RME_Q6_PI 0x000110dc
  147. #define RME_Q6_CI 0x000110e0
  148. #define RME_Q7_DEPTH 0x000110f4
  149. #define RME_Q7_PI 0x000110fc
  150. #define RME_Q7_CI 0x00011100
  151. #define PSS_CTL_REG 0x00018800
  152. #define __PSS_I2C_CLK_DIV_MK 0x00030000
  153. #define __PSS_I2C_CLK_DIV_SH 16
  154. #define __PSS_I2C_CLK_DIV(_v) ((_v) << __PSS_I2C_CLK_DIV_SH)
  155. #define __PSS_LMEM_INIT_DONE 0x00001000
  156. #define __PSS_LMEM_RESET 0x00000200
  157. #define __PSS_LMEM_INIT_EN 0x00000100
  158. #define __PSS_LPU1_RESET 0x00000002
  159. #define __PSS_LPU0_RESET 0x00000001
  160. #define PSS_ERR_STATUS_REG 0x00018810
  161. #define __PSS_LMEM1_CORR_ERR 0x00000800
  162. #define __PSS_LMEM0_CORR_ERR 0x00000400
  163. #define __PSS_LMEM1_UNCORR_ERR 0x00000200
  164. #define __PSS_LMEM0_UNCORR_ERR 0x00000100
  165. #define __PSS_BAL_PERR 0x00000080
  166. #define __PSS_DIP_IF_ERR 0x00000040
  167. #define __PSS_IOH_IF_ERR 0x00000020
  168. #define __PSS_TDS_IF_ERR 0x00000010
  169. #define __PSS_RDS_IF_ERR 0x00000008
  170. #define __PSS_SGM_IF_ERR 0x00000004
  171. #define __PSS_LPU1_RAM_ERR 0x00000002
  172. #define __PSS_LPU0_RAM_ERR 0x00000001
  173. #define ERR_SET_REG 0x00018818
  174. #define __PSS_ERR_STATUS_SET 0x00000fff
  175. /*
  176. * These definitions are either in error/missing in spec. Its auto-generated
  177. * from hard coded values in regparse.pl.
  178. */
  179. #define __EMPHPOST_AT_4G_MK_FIX 0x0000001c
  180. #define __EMPHPOST_AT_4G_SH_FIX 0x00000002
  181. #define __EMPHPRE_AT_4G_FIX 0x00000003
  182. #define __SFP_TXRATE_EN_FIX 0x00000100
  183. #define __SFP_RXRATE_EN_FIX 0x00000080
  184. /*
  185. * These register definitions are auto-generated from hard coded values
  186. * in regparse.pl.
  187. */
  188. #define HOSTFN0_LPU_MBOX0_0 0x00019200
  189. #define HOSTFN1_LPU_MBOX0_8 0x00019260
  190. #define LPU_HOSTFN0_MBOX0_0 0x00019280
  191. #define LPU_HOSTFN1_MBOX0_8 0x000192e0
  192. /*
  193. * These register mapping definitions are auto-generated from mapping tables
  194. * in regparse.pl.
  195. */
  196. #define BFA_IOC0_HBEAT_REG HOST_SEM0_INFO_REG
  197. #define BFA_IOC0_STATE_REG HOST_SEM1_INFO_REG
  198. #define BFA_IOC1_HBEAT_REG HOST_SEM2_INFO_REG
  199. #define BFA_IOC1_STATE_REG HOST_SEM3_INFO_REG
  200. #define BFA_FW_USE_COUNT HOST_SEM4_INFO_REG
  201. #define BFA_IOC_FAIL_SYNC HOST_SEM5_INFO_REG
  202. #define CPE_Q_DEPTH(__n) \
  203. (CPE_Q0_DEPTH + (__n) * (CPE_Q1_DEPTH - CPE_Q0_DEPTH))
  204. #define CPE_Q_PI(__n) \
  205. (CPE_Q0_PI + (__n) * (CPE_Q1_PI - CPE_Q0_PI))
  206. #define CPE_Q_CI(__n) \
  207. (CPE_Q0_CI + (__n) * (CPE_Q1_CI - CPE_Q0_CI))
  208. #define RME_Q_DEPTH(__n) \
  209. (RME_Q0_DEPTH + (__n) * (RME_Q1_DEPTH - RME_Q0_DEPTH))
  210. #define RME_Q_PI(__n) \
  211. (RME_Q0_PI + (__n) * (RME_Q1_PI - RME_Q0_PI))
  212. #define RME_Q_CI(__n) \
  213. (RME_Q0_CI + (__n) * (RME_Q1_CI - RME_Q0_CI))
  214. #define CPE_Q_NUM(__fn, __q) (((__fn) << 2) + (__q))
  215. #define RME_Q_NUM(__fn, __q) (((__fn) << 2) + (__q))
  216. #define CPE_Q_MASK(__q) ((__q) & 0x3)
  217. #define RME_Q_MASK(__q) ((__q) & 0x3)
  218. /*
  219. * PCI MSI-X vector defines
  220. */
  221. enum {
  222. BFA_MSIX_CPE_Q0 = 0,
  223. BFA_MSIX_CPE_Q1 = 1,
  224. BFA_MSIX_CPE_Q2 = 2,
  225. BFA_MSIX_CPE_Q3 = 3,
  226. BFA_MSIX_CPE_Q4 = 4,
  227. BFA_MSIX_CPE_Q5 = 5,
  228. BFA_MSIX_CPE_Q6 = 6,
  229. BFA_MSIX_CPE_Q7 = 7,
  230. BFA_MSIX_RME_Q0 = 8,
  231. BFA_MSIX_RME_Q1 = 9,
  232. BFA_MSIX_RME_Q2 = 10,
  233. BFA_MSIX_RME_Q3 = 11,
  234. BFA_MSIX_RME_Q4 = 12,
  235. BFA_MSIX_RME_Q5 = 13,
  236. BFA_MSIX_RME_Q6 = 14,
  237. BFA_MSIX_RME_Q7 = 15,
  238. BFA_MSIX_ERR_EMC = 16,
  239. BFA_MSIX_ERR_LPU0 = 17,
  240. BFA_MSIX_ERR_LPU1 = 18,
  241. BFA_MSIX_ERR_PSS = 19,
  242. BFA_MSIX_MBOX_LPU0 = 20,
  243. BFA_MSIX_MBOX_LPU1 = 21,
  244. BFA_MSIX_CB_MAX = 22,
  245. };
  246. /*
  247. * And corresponding host interrupt status bit field defines
  248. */
  249. #define __HFN_INT_CPE_Q0 0x00000001U
  250. #define __HFN_INT_CPE_Q1 0x00000002U
  251. #define __HFN_INT_CPE_Q2 0x00000004U
  252. #define __HFN_INT_CPE_Q3 0x00000008U
  253. #define __HFN_INT_CPE_Q4 0x00000010U
  254. #define __HFN_INT_CPE_Q5 0x00000020U
  255. #define __HFN_INT_CPE_Q6 0x00000040U
  256. #define __HFN_INT_CPE_Q7 0x00000080U
  257. #define __HFN_INT_RME_Q0 0x00000100U
  258. #define __HFN_INT_RME_Q1 0x00000200U
  259. #define __HFN_INT_RME_Q2 0x00000400U
  260. #define __HFN_INT_RME_Q3 0x00000800U
  261. #define __HFN_INT_RME_Q4 0x00001000U
  262. #define __HFN_INT_RME_Q5 0x00002000U
  263. #define __HFN_INT_RME_Q6 0x00004000U
  264. #define __HFN_INT_RME_Q7 0x00008000U
  265. #define __HFN_INT_ERR_EMC 0x00010000U
  266. #define __HFN_INT_ERR_LPU0 0x00020000U
  267. #define __HFN_INT_ERR_LPU1 0x00040000U
  268. #define __HFN_INT_ERR_PSS 0x00080000U
  269. #define __HFN_INT_MBOX_LPU0 0x00100000U
  270. #define __HFN_INT_MBOX_LPU1 0x00200000U
  271. #define __HFN_INT_MBOX1_LPU0 0x00400000U
  272. #define __HFN_INT_MBOX1_LPU1 0x00800000U
  273. #define __HFN_INT_CPE_MASK 0x000000ffU
  274. #define __HFN_INT_RME_MASK 0x0000ff00U
  275. /*
  276. * crossbow memory map.
  277. */
  278. #define PSS_SMEM_PAGE_START 0x8000
  279. #define PSS_SMEM_PGNUM(_pg0, _ma) ((_pg0) + ((_ma) >> 15))
  280. #define PSS_SMEM_PGOFF(_ma) ((_ma) & 0x7fff)
  281. /*
  282. * End of crossbow memory map
  283. */
  284. #endif /* __BFI_CBREG_H__ */