mantis_reg.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /*
  2. Mantis PCI bridge driver
  3. Copyright (C) Manu Abraham (abraham.manu@gmail.com)
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. */
  16. #ifndef __MANTIS_REG_H
  17. #define __MANTIS_REG_H
  18. /* Interrupts */
  19. #define MANTIS_INT_STAT 0x00
  20. #define MANTIS_INT_MASK 0x04
  21. #define MANTIS_INT_RISCSTAT (0x0f << 28)
  22. #define MANTIS_INT_RISCEN (0x01 << 27)
  23. #define MANTIS_INT_I2CRACK (0x01 << 26)
  24. /* #define MANTIS_INT_GPIF (0xff << 12) */
  25. #define MANTIS_INT_PCMCIA7 (0x01 << 19)
  26. #define MANTIS_INT_PCMCIA6 (0x01 << 18)
  27. #define MANTIS_INT_PCMCIA5 (0x01 << 17)
  28. #define MANTIS_INT_PCMCIA4 (0x01 << 16)
  29. #define MANTIS_INT_PCMCIA3 (0x01 << 15)
  30. #define MANTIS_INT_PCMCIA2 (0x01 << 14)
  31. #define MANTIS_INT_PCMCIA1 (0x01 << 13)
  32. #define MANTIS_INT_PCMCIA0 (0x01 << 12)
  33. #define MANTIS_INT_IRQ1 (0x01 << 11)
  34. #define MANTIS_INT_IRQ0 (0x01 << 10)
  35. #define MANTIS_INT_OCERR (0x01 << 8)
  36. #define MANTIS_INT_PABORT (0x01 << 7)
  37. #define MANTIS_INT_RIPERR (0x01 << 6)
  38. #define MANTIS_INT_PPERR (0x01 << 5)
  39. #define MANTIS_INT_FTRGT (0x01 << 3)
  40. #define MANTIS_INT_RISCI (0x01 << 1)
  41. #define MANTIS_INT_I2CDONE (0x01 << 0)
  42. /* DMA */
  43. #define MANTIS_DMA_CTL 0x08
  44. #define MANTIS_GPIF_RD (0xff << 24)
  45. #define MANTIS_GPIF_WR (0xff << 16)
  46. #define MANTIS_CPU_DO (0x01 << 10)
  47. #define MANTIS_DRV_DO (0x01 << 9)
  48. #define MANTIS_I2C_RD (0x01 << 7)
  49. #define MANTIS_I2C_WR (0x01 << 6)
  50. #define MANTIS_DCAP_MODE (0x01 << 5)
  51. #define MANTIS_FIFO_TP_4 (0x00 << 3)
  52. #define MANTIS_FIFO_TP_8 (0x01 << 3)
  53. #define MANTIS_FIFO_TP_16 (0x02 << 3)
  54. #define MANTIS_FIFO_EN (0x01 << 2)
  55. #define MANTIS_DCAP_EN (0x01 << 1)
  56. #define MANTIS_RISC_EN (0x01 << 0)
  57. /* DEBUG */
  58. #define MANTIS_DEBUGREG 0x0c
  59. #define MANTIS_DATINV (0x0e << 7)
  60. #define MANTIS_TOP_DEBUGSEL (0x07 << 4)
  61. #define MANTIS_PCMCIA_DEBUGSEL (0x0f << 0)
  62. #define MANTIS_RISC_START 0x10
  63. #define MANTIS_RISC_PC 0x14
  64. /* I2C */
  65. #define MANTIS_I2CDATA_CTL 0x18
  66. #define MANTIS_I2C_RATE_1 (0x00 << 6)
  67. #define MANTIS_I2C_RATE_2 (0x01 << 6)
  68. #define MANTIS_I2C_RATE_3 (0x02 << 6)
  69. #define MANTIS_I2C_RATE_4 (0x03 << 6)
  70. #define MANTIS_I2C_STOP (0x01 << 5)
  71. #define MANTIS_I2C_PGMODE (0x01 << 3)
  72. /* DATA */
  73. #define MANTIS_CMD_DATA_R1 0x20
  74. #define MANTIS_CMD_DATA_3 (0xff << 24)
  75. #define MANTIS_CMD_DATA_2 (0xff << 16)
  76. #define MANTIS_CMD_DATA_1 (0xff << 8)
  77. #define MANTIS_CMD_DATA_0 (0xff << 0)
  78. #define MANTIS_CMD_DATA_R2 0x24
  79. #define MANTIS_CMD_DATA_7 (0xff << 24)
  80. #define MANTIS_CMD_DATA_6 (0xff << 16)
  81. #define MANTIS_CMD_DATA_5 (0xff << 8)
  82. #define MANTIS_CMD_DATA_4 (0xff << 0)
  83. #define MANTIS_CONTROL 0x28
  84. #define MANTIS_DET (0x01 << 7)
  85. #define MANTIS_DAT_CF_EN (0x01 << 6)
  86. #define MANTIS_ACS (0x03 << 4)
  87. #define MANTIS_VCCEN (0x01 << 3)
  88. #define MANTIS_BYPASS (0x01 << 2)
  89. #define MANTIS_MRST (0x01 << 1)
  90. #define MANTIS_CRST_INT (0x01 << 0)
  91. #define MANTIS_GPIF_CFGSLA 0x84
  92. #define MANTIS_GPIF_WAITSMPL (0x07 << 28)
  93. #define MANTIS_GPIF_BYTEADDRSUB (0x01 << 25)
  94. #define MANTIS_GPIF_WAITPOL (0x01 << 24)
  95. #define MANTIS_GPIF_NCDELAY (0x07 << 20)
  96. #define MANTIS_GPIF_RW2CSDELAY (0x07 << 16)
  97. #define MANTIS_GPIF_SLFTIMEDMODE (0x01 << 15)
  98. #define MANTIS_GPIF_SLFTIMEDDELY (0x7f << 8)
  99. #define MANTIS_GPIF_DEVTYPE (0x07 << 4)
  100. #define MANTIS_GPIF_BIGENDIAN (0x01 << 3)
  101. #define MANTIS_GPIF_FETCHCMD (0x03 << 1)
  102. #define MANTIS_GPIF_HWORDDEV (0x01 << 0)
  103. #define MANTIS_GPIF_WSTOPER 0x90
  104. #define MANTIS_GPIF_WSTOPERWREN3 (0x01 << 31)
  105. #define MANTIS_GPIF_PARBOOTN (0x01 << 29)
  106. #define MANTIS_GPIF_WSTOPERSLID3 (0x1f << 24)
  107. #define MANTIS_GPIF_WSTOPERWREN2 (0x01 << 23)
  108. #define MANTIS_GPIF_WSTOPERSLID2 (0x1f << 16)
  109. #define MANTIS_GPIF_WSTOPERWREN1 (0x01 << 15)
  110. #define MANTIS_GPIF_WSTOPERSLID1 (0x1f << 8)
  111. #define MANTIS_GPIF_WSTOPERWREN0 (0x01 << 7)
  112. #define MANTIS_GPIF_WSTOPERSLID0 (0x1f << 0)
  113. #define MANTIS_GPIF_CS2RW 0x94
  114. #define MANTIS_GPIF_CS2RWWREN3 (0x01 << 31)
  115. #define MANTIS_GPIF_CS2RWDELY3 (0x3f << 24)
  116. #define MANTIS_GPIF_CS2RWWREN2 (0x01 << 23)
  117. #define MANTIS_GPIF_CS2RWDELY2 (0x3f << 16)
  118. #define MANTIS_GPIF_CS2RWWREN1 (0x01 << 15)
  119. #define MANTIS_GPIF_CS2RWDELY1 (0x3f << 8)
  120. #define MANTIS_GPIF_CS2RWWREN0 (0x01 << 7)
  121. #define MANTIS_GPIF_CS2RWDELY0 (0x3f << 0)
  122. #define MANTIS_GPIF_IRQCFG 0x98
  123. #define MANTIS_GPIF_IRQPOL (0x01 << 8)
  124. #define MANTIS_MASK_WRACK (0x01 << 7)
  125. #define MANTIS_MASK_BRRDY (0x01 << 6)
  126. #define MANTIS_MASK_OVFLW (0x01 << 5)
  127. #define MANTIS_MASK_OTHERR (0x01 << 4)
  128. #define MANTIS_MASK_WSTO (0x01 << 3)
  129. #define MANTIS_MASK_EXTIRQ (0x01 << 2)
  130. #define MANTIS_MASK_PLUGIN (0x01 << 1)
  131. #define MANTIS_MASK_PLUGOUT (0x01 << 0)
  132. #define MANTIS_GPIF_STATUS 0x9c
  133. #define MANTIS_SBUF_KILLOP (0x01 << 15)
  134. #define MANTIS_SBUF_OPDONE (0x01 << 14)
  135. #define MANTIS_SBUF_EMPTY (0x01 << 13)
  136. #define MANTIS_GPIF_DETSTAT (0x01 << 9)
  137. #define MANTIS_GPIF_INTSTAT (0x01 << 8)
  138. #define MANTIS_GPIF_WRACK (0x01 << 7)
  139. #define MANTIS_GPIF_BRRDY (0x01 << 6)
  140. #define MANTIS_SBUF_OVFLW (0x01 << 5)
  141. #define MANTIS_GPIF_OTHERR (0x01 << 4)
  142. #define MANTIS_SBUF_WSTO (0x01 << 3)
  143. #define MANTIS_GPIF_EXTIRQ (0x01 << 2)
  144. #define MANTIS_CARD_PLUGIN (0x01 << 1)
  145. #define MANTIS_CARD_PLUGOUT (0x01 << 0)
  146. #define MANTIS_GPIF_BRADDR 0xa0
  147. #define MANTIS_GPIF_PCMCIAREG (0x01 << 27)
  148. #define MANTIS_GPIF_PCMCIAIOM (0x01 << 26)
  149. #define MANTIS_GPIF_BR_ADDR (0xfffffff << 0)
  150. #define MANTIS_GPIF_BRBYTES 0xa4
  151. #define MANTIS_GPIF_BRCNT (0xfff << 0)
  152. #define MANTIS_PCMCIA_RESET 0xa8
  153. #define MANTIS_PCMCIA_RSTVAL (0xff << 0)
  154. #define MANTIS_CARD_RESET 0xac
  155. #define MANTIS_GPIF_ADDR 0xb0
  156. #define MANTIS_GPIF_HIFRDWRN (0x01 << 31)
  157. #define MANTIS_GPIF_PCMCIAREG (0x01 << 27)
  158. #define MANTIS_GPIF_PCMCIAIOM (0x01 << 26)
  159. #define MANTIS_GPIF_HIFADDR (0xfffffff << 0)
  160. #define MANTIS_GPIF_DOUT 0xb4
  161. #define MANTIS_GPIF_HIFDOUT (0xfffffff << 0)
  162. #define MANTIS_GPIF_DIN 0xb8
  163. #define MANTIS_GPIF_HIFDIN (0xfffffff << 0)
  164. #define MANTIS_GPIF_SPARE 0xbc
  165. #define MANTIS_GPIF_LOGICRD (0xffff << 16)
  166. #define MANTIS_GPIF_LOGICRW (0xffff << 0)
  167. #endif /* __MANTIS_REG_H */