vme_ca91cx42.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. /*
  2. * ca91c042.h
  3. *
  4. * Support for the Tundra Universe 1 and Universe II VME bridge chips
  5. *
  6. * Author: Tom Armistead
  7. * Updated by Ajit Prem
  8. * Copyright 2004 Motorola Inc.
  9. *
  10. * Further updated by Martyn Welch <martyn.welch@ge.com>
  11. * Copyright 2009 GE Intelligent Platforms Embedded Systems, Inc.
  12. *
  13. * Derived from ca91c042.h by Michael Wyrick
  14. *
  15. * This program is free software; you can redistribute it and/or modify it
  16. * under the terms of the GNU General Public License as published by the
  17. * Free Software Foundation; either version 2 of the License, or (at your
  18. * option) any later version.
  19. */
  20. #ifndef _CA91CX42_H
  21. #define _CA91CX42_H
  22. #ifndef PCI_VENDOR_ID_TUNDRA
  23. #define PCI_VENDOR_ID_TUNDRA 0x10e3
  24. #endif
  25. #ifndef PCI_DEVICE_ID_TUNDRA_CA91C142
  26. #define PCI_DEVICE_ID_TUNDRA_CA91C142 0x0000
  27. #endif
  28. /*
  29. * Define the number of each that the CA91C142 supports.
  30. */
  31. #define CA91C142_MAX_MASTER 8 /* Max Master Windows */
  32. #define CA91C142_MAX_SLAVE 8 /* Max Slave Windows */
  33. #define CA91C142_MAX_DMA 1 /* Max DMA Controllers */
  34. #define CA91C142_MAX_MAILBOX 4 /* Max Mail Box registers */
  35. /* Structure used to hold driver specific information */
  36. struct ca91cx42_driver {
  37. void __iomem *base; /* Base Address of device registers */
  38. wait_queue_head_t dma_queue;
  39. wait_queue_head_t iack_queue;
  40. wait_queue_head_t mbox_queue;
  41. void (*lm_callback[4])(void *); /* Called in interrupt handler */
  42. void *lm_data[4];
  43. void *crcsr_kernel;
  44. dma_addr_t crcsr_bus;
  45. struct mutex vme_rmw; /* Only one RMW cycle at a time */
  46. struct mutex vme_int; /*
  47. * Only one VME interrupt can be
  48. * generated at a time, provide locking
  49. */
  50. };
  51. /* See Page 2-77 in the Universe User Manual */
  52. struct ca91cx42_dma_descriptor {
  53. unsigned int dctl; /* DMA Control */
  54. unsigned int dtbc; /* Transfer Byte Count */
  55. unsigned int dla; /* PCI Address */
  56. unsigned int res1; /* Reserved */
  57. unsigned int dva; /* Vme Address */
  58. unsigned int res2; /* Reserved */
  59. unsigned int dcpp; /* Pointer to Numed Cmd Packet with rPN */
  60. unsigned int res3; /* Reserved */
  61. };
  62. struct ca91cx42_dma_entry {
  63. struct ca91cx42_dma_descriptor descriptor;
  64. struct list_head list;
  65. };
  66. /* Universe Register Offsets */
  67. /* general PCI configuration registers */
  68. #define CA91CX42_PCI_ID 0x000
  69. #define CA91CX42_PCI_CSR 0x004
  70. #define CA91CX42_PCI_CLASS 0x008
  71. #define CA91CX42_PCI_MISC0 0x00C
  72. #define CA91CX42_PCI_BS 0x010
  73. #define CA91CX42_PCI_MISC1 0x03C
  74. #define LSI0_CTL 0x0100
  75. #define LSI0_BS 0x0104
  76. #define LSI0_BD 0x0108
  77. #define LSI0_TO 0x010C
  78. #define LSI1_CTL 0x0114
  79. #define LSI1_BS 0x0118
  80. #define LSI1_BD 0x011C
  81. #define LSI1_TO 0x0120
  82. #define LSI2_CTL 0x0128
  83. #define LSI2_BS 0x012C
  84. #define LSI2_BD 0x0130
  85. #define LSI2_TO 0x0134
  86. #define LSI3_CTL 0x013C
  87. #define LSI3_BS 0x0140
  88. #define LSI3_BD 0x0144
  89. #define LSI3_TO 0x0148
  90. #define LSI4_CTL 0x01A0
  91. #define LSI4_BS 0x01A4
  92. #define LSI4_BD 0x01A8
  93. #define LSI4_TO 0x01AC
  94. #define LSI5_CTL 0x01B4
  95. #define LSI5_BS 0x01B8
  96. #define LSI5_BD 0x01BC
  97. #define LSI5_TO 0x01C0
  98. #define LSI6_CTL 0x01C8
  99. #define LSI6_BS 0x01CC
  100. #define LSI6_BD 0x01D0
  101. #define LSI6_TO 0x01D4
  102. #define LSI7_CTL 0x01DC
  103. #define LSI7_BS 0x01E0
  104. #define LSI7_BD 0x01E4
  105. #define LSI7_TO 0x01E8
  106. static const int CA91CX42_LSI_CTL[] = { LSI0_CTL, LSI1_CTL, LSI2_CTL, LSI3_CTL,
  107. LSI4_CTL, LSI5_CTL, LSI6_CTL, LSI7_CTL };
  108. static const int CA91CX42_LSI_BS[] = { LSI0_BS, LSI1_BS, LSI2_BS, LSI3_BS,
  109. LSI4_BS, LSI5_BS, LSI6_BS, LSI7_BS };
  110. static const int CA91CX42_LSI_BD[] = { LSI0_BD, LSI1_BD, LSI2_BD, LSI3_BD,
  111. LSI4_BD, LSI5_BD, LSI6_BD, LSI7_BD };
  112. static const int CA91CX42_LSI_TO[] = { LSI0_TO, LSI1_TO, LSI2_TO, LSI3_TO,
  113. LSI4_TO, LSI5_TO, LSI6_TO, LSI7_TO };
  114. #define SCYC_CTL 0x0170
  115. #define SCYC_ADDR 0x0174
  116. #define SCYC_EN 0x0178
  117. #define SCYC_CMP 0x017C
  118. #define SCYC_SWP 0x0180
  119. #define LMISC 0x0184
  120. #define SLSI 0x0188
  121. #define L_CMDERR 0x018C
  122. #define LAERR 0x0190
  123. #define DCTL 0x0200
  124. #define DTBC 0x0204
  125. #define DLA 0x0208
  126. #define DVA 0x0210
  127. #define DCPP 0x0218
  128. #define DGCS 0x0220
  129. #define D_LLUE 0x0224
  130. #define LINT_EN 0x0300
  131. #define LINT_STAT 0x0304
  132. #define LINT_MAP0 0x0308
  133. #define LINT_MAP1 0x030C
  134. #define VINT_EN 0x0310
  135. #define VINT_STAT 0x0314
  136. #define VINT_MAP0 0x0318
  137. #define VINT_MAP1 0x031C
  138. #define STATID 0x0320
  139. #define V1_STATID 0x0324
  140. #define V2_STATID 0x0328
  141. #define V3_STATID 0x032C
  142. #define V4_STATID 0x0330
  143. #define V5_STATID 0x0334
  144. #define V6_STATID 0x0338
  145. #define V7_STATID 0x033C
  146. static const int CA91CX42_V_STATID[8] = { 0, V1_STATID, V2_STATID, V3_STATID,
  147. V4_STATID, V5_STATID, V6_STATID,
  148. V7_STATID };
  149. #define LINT_MAP2 0x0340
  150. #define VINT_MAP2 0x0344
  151. #define MBOX0 0x0348
  152. #define MBOX1 0x034C
  153. #define MBOX2 0x0350
  154. #define MBOX3 0x0354
  155. #define SEMA0 0x0358
  156. #define SEMA1 0x035C
  157. #define MAST_CTL 0x0400
  158. #define MISC_CTL 0x0404
  159. #define MISC_STAT 0x0408
  160. #define USER_AM 0x040C
  161. #define VSI0_CTL 0x0F00
  162. #define VSI0_BS 0x0F04
  163. #define VSI0_BD 0x0F08
  164. #define VSI0_TO 0x0F0C
  165. #define VSI1_CTL 0x0F14
  166. #define VSI1_BS 0x0F18
  167. #define VSI1_BD 0x0F1C
  168. #define VSI1_TO 0x0F20
  169. #define VSI2_CTL 0x0F28
  170. #define VSI2_BS 0x0F2C
  171. #define VSI2_BD 0x0F30
  172. #define VSI2_TO 0x0F34
  173. #define VSI3_CTL 0x0F3C
  174. #define VSI3_BS 0x0F40
  175. #define VSI3_BD 0x0F44
  176. #define VSI3_TO 0x0F48
  177. #define LM_CTL 0x0F64
  178. #define LM_BS 0x0F68
  179. #define VRAI_CTL 0x0F70
  180. #define VRAI_BS 0x0F74
  181. #define VCSR_CTL 0x0F80
  182. #define VCSR_TO 0x0F84
  183. #define V_AMERR 0x0F88
  184. #define VAERR 0x0F8C
  185. #define VSI4_CTL 0x0F90
  186. #define VSI4_BS 0x0F94
  187. #define VSI4_BD 0x0F98
  188. #define VSI4_TO 0x0F9C
  189. #define VSI5_CTL 0x0FA4
  190. #define VSI5_BS 0x0FA8
  191. #define VSI5_BD 0x0FAC
  192. #define VSI5_TO 0x0FB0
  193. #define VSI6_CTL 0x0FB8
  194. #define VSI6_BS 0x0FBC
  195. #define VSI6_BD 0x0FC0
  196. #define VSI6_TO 0x0FC4
  197. #define VSI7_CTL 0x0FCC
  198. #define VSI7_BS 0x0FD0
  199. #define VSI7_BD 0x0FD4
  200. #define VSI7_TO 0x0FD8
  201. static const int CA91CX42_VSI_CTL[] = { VSI0_CTL, VSI1_CTL, VSI2_CTL, VSI3_CTL,
  202. VSI4_CTL, VSI5_CTL, VSI6_CTL, VSI7_CTL };
  203. static const int CA91CX42_VSI_BS[] = { VSI0_BS, VSI1_BS, VSI2_BS, VSI3_BS,
  204. VSI4_BS, VSI5_BS, VSI6_BS, VSI7_BS };
  205. static const int CA91CX42_VSI_BD[] = { VSI0_BD, VSI1_BD, VSI2_BD, VSI3_BD,
  206. VSI4_BD, VSI5_BD, VSI6_BD, VSI7_BD };
  207. static const int CA91CX42_VSI_TO[] = { VSI0_TO, VSI1_TO, VSI2_TO, VSI3_TO,
  208. VSI4_TO, VSI5_TO, VSI6_TO, VSI7_TO };
  209. #define VCSR_CLR 0x0FF4
  210. #define VCSR_SET 0x0FF8
  211. #define VCSR_BS 0x0FFC
  212. /*
  213. * PCI Class Register
  214. * offset 008
  215. */
  216. #define CA91CX42_BM_PCI_CLASS_BASE 0xFF000000
  217. #define CA91CX42_OF_PCI_CLASS_BASE 24
  218. #define CA91CX42_BM_PCI_CLASS_SUB 0x00FF0000
  219. #define CA91CX42_OF_PCI_CLASS_SUB 16
  220. #define CA91CX42_BM_PCI_CLASS_PROG 0x0000FF00
  221. #define CA91CX42_OF_PCI_CLASS_PROG 8
  222. #define CA91CX42_BM_PCI_CLASS_RID 0x000000FF
  223. #define CA91CX42_OF_PCI_CLASS_RID 0
  224. #define CA91CX42_OF_PCI_CLASS_RID_UNIVERSE_I 0
  225. #define CA91CX42_OF_PCI_CLASS_RID_UNIVERSE_II 1
  226. /*
  227. * PCI Misc Register
  228. * offset 00C
  229. */
  230. #define CA91CX42_BM_PCI_MISC0_BISTC 0x80000000
  231. #define CA91CX42_BM_PCI_MISC0_SBIST 0x60000000
  232. #define CA91CX42_BM_PCI_MISC0_CCODE 0x0F000000
  233. #define CA91CX42_BM_PCI_MISC0_MFUNCT 0x00800000
  234. #define CA91CX42_BM_PCI_MISC0_LAYOUT 0x007F0000
  235. #define CA91CX42_BM_PCI_MISC0_LTIMER 0x0000FF00
  236. #define CA91CX42_OF_PCI_MISC0_LTIMER 8
  237. /*
  238. * LSI Control Register
  239. * offset 100
  240. */
  241. #define CA91CX42_LSI_CTL_EN (1<<31)
  242. #define CA91CX42_LSI_CTL_PWEN (1<<30)
  243. #define CA91CX42_LSI_CTL_VDW_M (3<<22)
  244. #define CA91CX42_LSI_CTL_VDW_D8 0
  245. #define CA91CX42_LSI_CTL_VDW_D16 (1<<22)
  246. #define CA91CX42_LSI_CTL_VDW_D32 (1<<23)
  247. #define CA91CX42_LSI_CTL_VDW_D64 (3<<22)
  248. #define CA91CX42_LSI_CTL_VAS_M (7<<16)
  249. #define CA91CX42_LSI_CTL_VAS_A16 0
  250. #define CA91CX42_LSI_CTL_VAS_A24 (1<<16)
  251. #define CA91CX42_LSI_CTL_VAS_A32 (1<<17)
  252. #define CA91CX42_LSI_CTL_VAS_CRCSR (5<<16)
  253. #define CA91CX42_LSI_CTL_VAS_USER1 (3<<17)
  254. #define CA91CX42_LSI_CTL_VAS_USER2 (7<<16)
  255. #define CA91CX42_LSI_CTL_PGM_M (1<<14)
  256. #define CA91CX42_LSI_CTL_PGM_DATA 0
  257. #define CA91CX42_LSI_CTL_PGM_PGM (1<<14)
  258. #define CA91CX42_LSI_CTL_SUPER_M (1<<12)
  259. #define CA91CX42_LSI_CTL_SUPER_NPRIV 0
  260. #define CA91CX42_LSI_CTL_SUPER_SUPR (1<<12)
  261. #define CA91CX42_LSI_CTL_VCT_M (1<<8)
  262. #define CA91CX42_LSI_CTL_VCT_BLT (1<<8)
  263. #define CA91CX42_LSI_CTL_VCT_MBLT (1<<8)
  264. #define CA91CX42_LSI_CTL_LAS (1<<0)
  265. /*
  266. * SCYC_CTL Register
  267. * offset 178
  268. */
  269. #define CA91CX42_SCYC_CTL_LAS_PCIMEM 0
  270. #define CA91CX42_SCYC_CTL_LAS_PCIIO (1<<2)
  271. #define CA91CX42_SCYC_CTL_CYC_M (3<<0)
  272. #define CA91CX42_SCYC_CTL_CYC_RMW (1<<0)
  273. #define CA91CX42_SCYC_CTL_CYC_ADOH (1<<1)
  274. /*
  275. * LMISC Register
  276. * offset 184
  277. */
  278. #define CA91CX42_BM_LMISC_CRT 0xF0000000
  279. #define CA91CX42_OF_LMISC_CRT 28
  280. #define CA91CX42_BM_LMISC_CWT 0x0F000000
  281. #define CA91CX42_OF_LMISC_CWT 24
  282. /*
  283. * SLSI Register
  284. * offset 188
  285. */
  286. #define CA91CX42_BM_SLSI_EN 0x80000000
  287. #define CA91CX42_BM_SLSI_PWEN 0x40000000
  288. #define CA91CX42_BM_SLSI_VDW 0x00F00000
  289. #define CA91CX42_OF_SLSI_VDW 20
  290. #define CA91CX42_BM_SLSI_PGM 0x0000F000
  291. #define CA91CX42_OF_SLSI_PGM 12
  292. #define CA91CX42_BM_SLSI_SUPER 0x00000F00
  293. #define CA91CX42_OF_SLSI_SUPER 8
  294. #define CA91CX42_BM_SLSI_BS 0x000000F6
  295. #define CA91CX42_OF_SLSI_BS 2
  296. #define CA91CX42_BM_SLSI_LAS 0x00000003
  297. #define CA91CX42_OF_SLSI_LAS 0
  298. #define CA91CX42_BM_SLSI_RESERVED 0x3F0F0000
  299. /*
  300. * DCTL Register
  301. * offset 200
  302. */
  303. #define CA91CX42_DCTL_L2V (1<<31)
  304. #define CA91CX42_DCTL_VDW_M (3<<22)
  305. #define CA91CX42_DCTL_VDW_D8 0
  306. #define CA91CX42_DCTL_VDW_D16 (1<<22)
  307. #define CA91CX42_DCTL_VDW_D32 (1<<23)
  308. #define CA91CX42_DCTL_VDW_D64 (3<<22)
  309. #define CA91CX42_DCTL_VAS_M (7<<16)
  310. #define CA91CX42_DCTL_VAS_A16 0
  311. #define CA91CX42_DCTL_VAS_A24 (1<<16)
  312. #define CA91CX42_DCTL_VAS_A32 (1<<17)
  313. #define CA91CX42_DCTL_VAS_USER1 (3<<17)
  314. #define CA91CX42_DCTL_VAS_USER2 (7<<16)
  315. #define CA91CX42_DCTL_PGM_M (1<<14)
  316. #define CA91CX42_DCTL_PGM_DATA 0
  317. #define CA91CX42_DCTL_PGM_PGM (1<<14)
  318. #define CA91CX42_DCTL_SUPER_M (1<<12)
  319. #define CA91CX42_DCTL_SUPER_NPRIV 0
  320. #define CA91CX42_DCTL_SUPER_SUPR (1<<12)
  321. #define CA91CX42_DCTL_VCT_M (1<<8)
  322. #define CA91CX42_DCTL_VCT_BLT (1<<8)
  323. #define CA91CX42_DCTL_LD64EN (1<<7)
  324. /*
  325. * DCPP Register
  326. * offset 218
  327. */
  328. #define CA91CX42_DCPP_M 0xf
  329. #define CA91CX42_DCPP_NULL (1<<0)
  330. /*
  331. * DMA General Control/Status Register (DGCS)
  332. * offset 220
  333. */
  334. #define CA91CX42_DGCS_GO (1<<31)
  335. #define CA91CX42_DGCS_STOP_REQ (1<<30)
  336. #define CA91CX42_DGCS_HALT_REQ (1<<29)
  337. #define CA91CX42_DGCS_CHAIN (1<<27)
  338. #define CA91CX42_DGCS_VON_M (7<<20)
  339. #define CA91CX42_DGCS_VOFF_M (0xf<<16)
  340. #define CA91CX42_DGCS_ACT (1<<15)
  341. #define CA91CX42_DGCS_STOP (1<<14)
  342. #define CA91CX42_DGCS_HALT (1<<13)
  343. #define CA91CX42_DGCS_DONE (1<<11)
  344. #define CA91CX42_DGCS_LERR (1<<10)
  345. #define CA91CX42_DGCS_VERR (1<<9)
  346. #define CA91CX42_DGCS_PERR (1<<8)
  347. #define CA91CX42_DGCS_INT_STOP (1<<6)
  348. #define CA91CX42_DGCS_INT_HALT (1<<5)
  349. #define CA91CX42_DGCS_INT_DONE (1<<3)
  350. #define CA91CX42_DGCS_INT_LERR (1<<2)
  351. #define CA91CX42_DGCS_INT_VERR (1<<1)
  352. #define CA91CX42_DGCS_INT_PERR (1<<0)
  353. /*
  354. * PCI Interrupt Enable Register
  355. * offset 300
  356. */
  357. #define CA91CX42_LINT_LM3 0x00800000
  358. #define CA91CX42_LINT_LM2 0x00400000
  359. #define CA91CX42_LINT_LM1 0x00200000
  360. #define CA91CX42_LINT_LM0 0x00100000
  361. #define CA91CX42_LINT_MBOX3 0x00080000
  362. #define CA91CX42_LINT_MBOX2 0x00040000
  363. #define CA91CX42_LINT_MBOX1 0x00020000
  364. #define CA91CX42_LINT_MBOX0 0x00010000
  365. #define CA91CX42_LINT_ACFAIL 0x00008000
  366. #define CA91CX42_LINT_SYSFAIL 0x00004000
  367. #define CA91CX42_LINT_SW_INT 0x00002000
  368. #define CA91CX42_LINT_SW_IACK 0x00001000
  369. #define CA91CX42_LINT_VERR 0x00000400
  370. #define CA91CX42_LINT_LERR 0x00000200
  371. #define CA91CX42_LINT_DMA 0x00000100
  372. #define CA91CX42_LINT_VIRQ7 0x00000080
  373. #define CA91CX42_LINT_VIRQ6 0x00000040
  374. #define CA91CX42_LINT_VIRQ5 0x00000020
  375. #define CA91CX42_LINT_VIRQ4 0x00000010
  376. #define CA91CX42_LINT_VIRQ3 0x00000008
  377. #define CA91CX42_LINT_VIRQ2 0x00000004
  378. #define CA91CX42_LINT_VIRQ1 0x00000002
  379. #define CA91CX42_LINT_VOWN 0x00000001
  380. static const int CA91CX42_LINT_VIRQ[] = { 0, CA91CX42_LINT_VIRQ1,
  381. CA91CX42_LINT_VIRQ2, CA91CX42_LINT_VIRQ3,
  382. CA91CX42_LINT_VIRQ4, CA91CX42_LINT_VIRQ5,
  383. CA91CX42_LINT_VIRQ6, CA91CX42_LINT_VIRQ7 };
  384. #define CA91CX42_LINT_MBOX 0x000F0000
  385. static const int CA91CX42_LINT_LM[] = { CA91CX42_LINT_LM0, CA91CX42_LINT_LM1,
  386. CA91CX42_LINT_LM2, CA91CX42_LINT_LM3 };
  387. /*
  388. * MAST_CTL Register
  389. * offset 400
  390. */
  391. #define CA91CX42_BM_MAST_CTL_MAXRTRY 0xF0000000
  392. #define CA91CX42_OF_MAST_CTL_MAXRTRY 28
  393. #define CA91CX42_BM_MAST_CTL_PWON 0x0F000000
  394. #define CA91CX42_OF_MAST_CTL_PWON 24
  395. #define CA91CX42_BM_MAST_CTL_VRL 0x00C00000
  396. #define CA91CX42_OF_MAST_CTL_VRL 22
  397. #define CA91CX42_BM_MAST_CTL_VRM 0x00200000
  398. #define CA91CX42_BM_MAST_CTL_VREL 0x00100000
  399. #define CA91CX42_BM_MAST_CTL_VOWN 0x00080000
  400. #define CA91CX42_BM_MAST_CTL_VOWN_ACK 0x00040000
  401. #define CA91CX42_BM_MAST_CTL_PABS 0x00001000
  402. #define CA91CX42_BM_MAST_CTL_BUS_NO 0x0000000F
  403. #define CA91CX42_OF_MAST_CTL_BUS_NO 0
  404. /*
  405. * MISC_CTL Register
  406. * offset 404
  407. */
  408. #define CA91CX42_MISC_CTL_VBTO 0xF0000000
  409. #define CA91CX42_MISC_CTL_VARB 0x04000000
  410. #define CA91CX42_MISC_CTL_VARBTO 0x03000000
  411. #define CA91CX42_MISC_CTL_SW_LRST 0x00800000
  412. #define CA91CX42_MISC_CTL_SW_SRST 0x00400000
  413. #define CA91CX42_MISC_CTL_BI 0x00100000
  414. #define CA91CX42_MISC_CTL_ENGBI 0x00080000
  415. #define CA91CX42_MISC_CTL_RESCIND 0x00040000
  416. #define CA91CX42_MISC_CTL_SYSCON 0x00020000
  417. #define CA91CX42_MISC_CTL_V64AUTO 0x00010000
  418. #define CA91CX42_MISC_CTL_RESERVED 0x0820FFFF
  419. #define CA91CX42_OF_MISC_CTL_VARBTO 24
  420. #define CA91CX42_OF_MISC_CTL_VBTO 28
  421. /*
  422. * MISC_STAT Register
  423. * offset 408
  424. */
  425. #define CA91CX42_BM_MISC_STAT_ENDIAN 0x80000000
  426. #define CA91CX42_BM_MISC_STAT_LCLSIZE 0x40000000
  427. #define CA91CX42_BM_MISC_STAT_DY4AUTO 0x08000000
  428. #define CA91CX42_BM_MISC_STAT_MYBBSY 0x00200000
  429. #define CA91CX42_BM_MISC_STAT_DY4DONE 0x00080000
  430. #define CA91CX42_BM_MISC_STAT_TXFE 0x00040000
  431. #define CA91CX42_BM_MISC_STAT_RXFE 0x00020000
  432. #define CA91CX42_BM_MISC_STAT_DY4AUTOID 0x0000FF00
  433. #define CA91CX42_OF_MISC_STAT_DY4AUTOID 8
  434. /*
  435. * VSI Control Register
  436. * offset F00
  437. */
  438. #define CA91CX42_VSI_CTL_EN (1<<31)
  439. #define CA91CX42_VSI_CTL_PWEN (1<<30)
  440. #define CA91CX42_VSI_CTL_PREN (1<<29)
  441. #define CA91CX42_VSI_CTL_PGM_M (3<<22)
  442. #define CA91CX42_VSI_CTL_PGM_DATA (1<<22)
  443. #define CA91CX42_VSI_CTL_PGM_PGM (1<<23)
  444. #define CA91CX42_VSI_CTL_SUPER_M (3<<20)
  445. #define CA91CX42_VSI_CTL_SUPER_NPRIV (1<<20)
  446. #define CA91CX42_VSI_CTL_SUPER_SUPR (1<<21)
  447. #define CA91CX42_VSI_CTL_VAS_M (7<<16)
  448. #define CA91CX42_VSI_CTL_VAS_A16 0
  449. #define CA91CX42_VSI_CTL_VAS_A24 (1<<16)
  450. #define CA91CX42_VSI_CTL_VAS_A32 (1<<17)
  451. #define CA91CX42_VSI_CTL_VAS_USER1 (3<<17)
  452. #define CA91CX42_VSI_CTL_VAS_USER2 (7<<16)
  453. #define CA91CX42_VSI_CTL_LD64EN (1<<7)
  454. #define CA91CX42_VSI_CTL_LLRMW (1<<6)
  455. #define CA91CX42_VSI_CTL_LAS_M (3<<0)
  456. #define CA91CX42_VSI_CTL_LAS_PCI_MS 0
  457. #define CA91CX42_VSI_CTL_LAS_PCI_IO (1<<0)
  458. #define CA91CX42_VSI_CTL_LAS_PCI_CONF (1<<1)
  459. /* LM_CTL Register
  460. * offset F64
  461. */
  462. #define CA91CX42_LM_CTL_EN (1<<31)
  463. #define CA91CX42_LM_CTL_PGM (1<<23)
  464. #define CA91CX42_LM_CTL_DATA (1<<22)
  465. #define CA91CX42_LM_CTL_SUPR (1<<21)
  466. #define CA91CX42_LM_CTL_NPRIV (1<<20)
  467. #define CA91CX42_LM_CTL_AS_M (7<<16)
  468. #define CA91CX42_LM_CTL_AS_A16 0
  469. #define CA91CX42_LM_CTL_AS_A24 (1<<16)
  470. #define CA91CX42_LM_CTL_AS_A32 (1<<17)
  471. /*
  472. * VRAI_CTL Register
  473. * offset F70
  474. */
  475. #define CA91CX42_BM_VRAI_CTL_EN 0x80000000
  476. #define CA91CX42_BM_VRAI_CTL_PGM 0x00C00000
  477. #define CA91CX42_OF_VRAI_CTL_PGM 22
  478. #define CA91CX42_BM_VRAI_CTL_SUPER 0x00300000
  479. #define CA91CX42_OF_VRAI_CTL_SUPER 20
  480. #define CA91CX42_BM_VRAI_CTL_VAS 0x00030000
  481. #define CA91CX42_OF_VRAI_CTL_VAS 16
  482. /* VCSR_CTL Register
  483. * offset F80
  484. */
  485. #define CA91CX42_VCSR_CTL_EN (1<<31)
  486. #define CA91CX42_VCSR_CTL_LAS_M (3<<0)
  487. #define CA91CX42_VCSR_CTL_LAS_PCI_MS 0
  488. #define CA91CX42_VCSR_CTL_LAS_PCI_IO (1<<0)
  489. #define CA91CX42_VCSR_CTL_LAS_PCI_CONF (1<<1)
  490. /* VCSR_BS Register
  491. * offset FFC
  492. */
  493. #define CA91CX42_VCSR_BS_SLOT_M (0x1F<<27)
  494. #endif /* _CA91CX42_H */