rioboard.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /************************************************************************/
  2. /* */
  3. /* Title : RIO Host Card Hardware Definitions */
  4. /* */
  5. /* Author : N.P.Vassallo */
  6. /* */
  7. /* Creation : 26th April 1999 */
  8. /* */
  9. /* Version : 1.0.0 */
  10. /* */
  11. /* Copyright : (c) Specialix International Ltd. 1999 *
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; either version 2 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26. * */
  27. /* Description : Prototypes, structures and definitions */
  28. /* describing the RIO board hardware */
  29. /* */
  30. /************************************************************************/
  31. #ifndef _rioboard_h /* If RIOBOARD.H not already defined */
  32. #define _rioboard_h 1
  33. /*****************************************************************************
  34. *********************** ***********************
  35. *********************** Hardware Control Registers ***********************
  36. *********************** ***********************
  37. *****************************************************************************/
  38. /* Hardware Registers... */
  39. #define RIO_REG_BASE 0x7C00 /* Base of control registers */
  40. #define RIO_CONFIG RIO_REG_BASE + 0x0000 /* WRITE: Configuration Register */
  41. #define RIO_INTSET RIO_REG_BASE + 0x0080 /* WRITE: Interrupt Set */
  42. #define RIO_RESET RIO_REG_BASE + 0x0100 /* WRITE: Host Reset */
  43. #define RIO_INTRESET RIO_REG_BASE + 0x0180 /* WRITE: Interrupt Reset */
  44. #define RIO_VPD_ROM RIO_REG_BASE + 0x0000 /* READ: Vital Product Data ROM */
  45. #define RIO_INTSTAT RIO_REG_BASE + 0x0080 /* READ: Interrupt Status (Jet boards only) */
  46. #define RIO_RESETSTAT RIO_REG_BASE + 0x0100 /* READ: Reset Status (Jet boards only) */
  47. /* RIO_VPD_ROM definitions... */
  48. #define VPD_SLX_ID1 0x00 /* READ: Specialix Identifier #1 */
  49. #define VPD_SLX_ID2 0x01 /* READ: Specialix Identifier #2 */
  50. #define VPD_HW_REV 0x02 /* READ: Hardware Revision */
  51. #define VPD_HW_ASSEM 0x03 /* READ: Hardware Assembly Level */
  52. #define VPD_UNIQUEID4 0x04 /* READ: Unique Identifier #4 */
  53. #define VPD_UNIQUEID3 0x05 /* READ: Unique Identifier #3 */
  54. #define VPD_UNIQUEID2 0x06 /* READ: Unique Identifier #2 */
  55. #define VPD_UNIQUEID1 0x07 /* READ: Unique Identifier #1 */
  56. #define VPD_MANU_YEAR 0x08 /* READ: Year Of Manufacture (0 = 1970) */
  57. #define VPD_MANU_WEEK 0x09 /* READ: Week Of Manufacture (0 = week 1 Jan) */
  58. #define VPD_HWFEATURE1 0x0A /* READ: Hardware Feature Byte 1 */
  59. #define VPD_HWFEATURE2 0x0B /* READ: Hardware Feature Byte 2 */
  60. #define VPD_HWFEATURE3 0x0C /* READ: Hardware Feature Byte 3 */
  61. #define VPD_HWFEATURE4 0x0D /* READ: Hardware Feature Byte 4 */
  62. #define VPD_HWFEATURE5 0x0E /* READ: Hardware Feature Byte 5 */
  63. #define VPD_OEMID 0x0F /* READ: OEM Identifier */
  64. #define VPD_IDENT 0x10 /* READ: Identifier string (16 bytes) */
  65. #define VPD_IDENT_LEN 0x10
  66. /* VPD ROM Definitions... */
  67. #define SLX_ID1 0x4D
  68. #define SLX_ID2 0x98
  69. #define PRODUCT_ID(a) ((a>>4)&0xF) /* Use to obtain Product ID from VPD_UNIQUEID1 */
  70. #define ID_SX_ISA 0x2
  71. #define ID_RIO_EISA 0x3
  72. #define ID_SX_PCI 0x5
  73. #define ID_SX_EISA 0x7
  74. #define ID_RIO_RTA16 0x9
  75. #define ID_RIO_ISA 0xA
  76. #define ID_RIO_MCA 0xB
  77. #define ID_RIO_SBUS 0xC
  78. #define ID_RIO_PCI 0xD
  79. #define ID_RIO_RTA8 0xE
  80. /* Transputer bootstrap definitions... */
  81. #define BOOTLOADADDR (0x8000 - 6)
  82. #define BOOTINDICATE (0x8000 - 2)
  83. /* Firmware load position... */
  84. #define FIRMWARELOADADDR 0x7C00 /* Firmware is loaded _before_ this address */
  85. /*****************************************************************************
  86. ***************************** *****************************
  87. ***************************** RIO (Rev1) ISA *****************************
  88. ***************************** *****************************
  89. *****************************************************************************/
  90. /* Control Register Definitions... */
  91. #define RIO_ISA_IDENT "JBJGPGGHINSMJPJR"
  92. #define RIO_ISA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
  93. #define RIO_ISA_CFG_BUSENABLE 0x02 /* Enable processor bus */
  94. #define RIO_ISA_CFG_IRQMASK 0x30 /* Interrupt mask */
  95. #define RIO_ISA_CFG_IRQ12 0x10 /* Interrupt Level 12 */
  96. #define RIO_ISA_CFG_IRQ11 0x20 /* Interrupt Level 11 */
  97. #define RIO_ISA_CFG_IRQ9 0x30 /* Interrupt Level 9 */
  98. #define RIO_ISA_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
  99. #define RIO_ISA_CFG_WAITSTATE0 0x80 /* 0 waitstates, else 1 */
  100. /*****************************************************************************
  101. ***************************** *****************************
  102. ***************************** RIO (Rev2) ISA *****************************
  103. ***************************** *****************************
  104. *****************************************************************************/
  105. /* Control Register Definitions... */
  106. #define RIO_ISA2_IDENT "JBJGPGGHINSMJPJR"
  107. #define RIO_ISA2_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
  108. #define RIO_ISA2_CFG_BUSENABLE 0x02 /* Enable processor bus */
  109. #define RIO_ISA2_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
  110. #define RIO_ISA2_CFG_16BIT 0x08 /* 16bit mode, else 8bit */
  111. #define RIO_ISA2_CFG_IRQMASK 0x30 /* Interrupt mask */
  112. #define RIO_ISA2_CFG_IRQ15 0x00 /* Interrupt Level 15 */
  113. #define RIO_ISA2_CFG_IRQ12 0x10 /* Interrupt Level 12 */
  114. #define RIO_ISA2_CFG_IRQ11 0x20 /* Interrupt Level 11 */
  115. #define RIO_ISA2_CFG_IRQ9 0x30 /* Interrupt Level 9 */
  116. #define RIO_ISA2_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
  117. #define RIO_ISA2_CFG_WAITSTATE0 0x80 /* 0 waitstates, else 1 */
  118. /*****************************************************************************
  119. ***************************** ******************************
  120. ***************************** RIO (Jet) ISA ******************************
  121. ***************************** ******************************
  122. *****************************************************************************/
  123. /* Control Register Definitions... */
  124. #define RIO_ISA3_IDENT "JET HOST BY KEV#"
  125. #define RIO_ISA3_CFG_BUSENABLE 0x02 /* Enable processor bus */
  126. #define RIO_ISA3_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
  127. #define RIO_ISA32_CFG_IRQMASK 0xF30 /* Interrupt mask */
  128. #define RIO_ISA3_CFG_IRQ15 0xF0 /* Interrupt Level 15 */
  129. #define RIO_ISA3_CFG_IRQ12 0xC0 /* Interrupt Level 12 */
  130. #define RIO_ISA3_CFG_IRQ11 0xB0 /* Interrupt Level 11 */
  131. #define RIO_ISA3_CFG_IRQ10 0xA0 /* Interrupt Level 10 */
  132. #define RIO_ISA3_CFG_IRQ9 0x90 /* Interrupt Level 9 */
  133. /*****************************************************************************
  134. ********************************* ********************************
  135. ********************************* RIO MCA ********************************
  136. ********************************* ********************************
  137. *****************************************************************************/
  138. /* Control Register Definitions... */
  139. #define RIO_MCA_IDENT "JBJGPGGHINSMJPJR"
  140. #define RIO_MCA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
  141. #define RIO_MCA_CFG_BUSENABLE 0x02 /* Enable processor bus */
  142. #define RIO_MCA_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
  143. /*****************************************************************************
  144. ******************************** ********************************
  145. ******************************** RIO EISA ********************************
  146. ******************************** ********************************
  147. *****************************************************************************/
  148. /* EISA Configuration Space Definitions... */
  149. #define EISA_PRODUCT_ID1 0xC80
  150. #define EISA_PRODUCT_ID2 0xC81
  151. #define EISA_PRODUCT_NUMBER 0xC82
  152. #define EISA_REVISION_NUMBER 0xC83
  153. #define EISA_CARD_ENABLE 0xC84
  154. #define EISA_VPD_UNIQUEID4 0xC88 /* READ: Unique Identifier #4 */
  155. #define EISA_VPD_UNIQUEID3 0xC8A /* READ: Unique Identifier #3 */
  156. #define EISA_VPD_UNIQUEID2 0xC90 /* READ: Unique Identifier #2 */
  157. #define EISA_VPD_UNIQUEID1 0xC92 /* READ: Unique Identifier #1 */
  158. #define EISA_VPD_MANU_YEAR 0xC98 /* READ: Year Of Manufacture (0 = 1970) */
  159. #define EISA_VPD_MANU_WEEK 0xC9A /* READ: Week Of Manufacture (0 = week 1 Jan) */
  160. #define EISA_MEM_ADDR_23_16 0xC00
  161. #define EISA_MEM_ADDR_31_24 0xC01
  162. #define EISA_RIO_CONFIG 0xC02 /* WRITE: Configuration Register */
  163. #define EISA_RIO_INTSET 0xC03 /* WRITE: Interrupt Set */
  164. #define EISA_RIO_INTRESET 0xC03 /* READ: Interrupt Reset */
  165. /* Control Register Definitions... */
  166. #define RIO_EISA_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
  167. #define RIO_EISA_CFG_LINK20 0x02 /* 20Mbps link, else 10Mbps */
  168. #define RIO_EISA_CFG_BUSENABLE 0x04 /* Enable processor bus */
  169. #define RIO_EISA_CFG_PROCRUN 0x08 /* Processor running, else reset */
  170. #define RIO_EISA_CFG_IRQMASK 0xF0 /* Interrupt mask */
  171. #define RIO_EISA_CFG_IRQ15 0xF0 /* Interrupt Level 15 */
  172. #define RIO_EISA_CFG_IRQ14 0xE0 /* Interrupt Level 14 */
  173. #define RIO_EISA_CFG_IRQ12 0xC0 /* Interrupt Level 12 */
  174. #define RIO_EISA_CFG_IRQ11 0xB0 /* Interrupt Level 11 */
  175. #define RIO_EISA_CFG_IRQ10 0xA0 /* Interrupt Level 10 */
  176. #define RIO_EISA_CFG_IRQ9 0x90 /* Interrupt Level 9 */
  177. #define RIO_EISA_CFG_IRQ7 0x70 /* Interrupt Level 7 */
  178. #define RIO_EISA_CFG_IRQ6 0x60 /* Interrupt Level 6 */
  179. #define RIO_EISA_CFG_IRQ5 0x50 /* Interrupt Level 5 */
  180. #define RIO_EISA_CFG_IRQ4 0x40 /* Interrupt Level 4 */
  181. #define RIO_EISA_CFG_IRQ3 0x30 /* Interrupt Level 3 */
  182. /*****************************************************************************
  183. ******************************** ********************************
  184. ******************************** RIO SBus ********************************
  185. ******************************** ********************************
  186. *****************************************************************************/
  187. /* Control Register Definitions... */
  188. #define RIO_SBUS_IDENT "JBPGK#\0\0\0\0\0\0\0\0\0\0"
  189. #define RIO_SBUS_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
  190. #define RIO_SBUS_CFG_BUSENABLE 0x02 /* Enable processor bus */
  191. #define RIO_SBUS_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
  192. #define RIO_SBUS_CFG_IRQMASK 0x38 /* Interrupt mask */
  193. #define RIO_SBUS_CFG_IRQNONE 0x00 /* No Interrupt */
  194. #define RIO_SBUS_CFG_IRQ7 0x38 /* Interrupt Level 7 */
  195. #define RIO_SBUS_CFG_IRQ6 0x30 /* Interrupt Level 6 */
  196. #define RIO_SBUS_CFG_IRQ5 0x28 /* Interrupt Level 5 */
  197. #define RIO_SBUS_CFG_IRQ4 0x20 /* Interrupt Level 4 */
  198. #define RIO_SBUS_CFG_IRQ3 0x18 /* Interrupt Level 3 */
  199. #define RIO_SBUS_CFG_IRQ2 0x10 /* Interrupt Level 2 */
  200. #define RIO_SBUS_CFG_IRQ1 0x08 /* Interrupt Level 1 */
  201. #define RIO_SBUS_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
  202. #define RIO_SBUS_CFG_PROC25 0x80 /* 25Mhz processor clock, else 20Mhz */
  203. /*****************************************************************************
  204. ********************************* ********************************
  205. ********************************* RIO PCI ********************************
  206. ********************************* ********************************
  207. *****************************************************************************/
  208. /* Control Register Definitions... */
  209. #define RIO_PCI_IDENT "ECDDPGJGJHJRGSK#"
  210. #define RIO_PCI_CFG_BOOTRAM 0x01 /* Boot from RAM, else Link */
  211. #define RIO_PCI_CFG_BUSENABLE 0x02 /* Enable processor bus */
  212. #define RIO_PCI_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
  213. #define RIO_PCI_CFG_LINK20 0x40 /* 20Mbps link, else 10Mbps */
  214. #define RIO_PCI_CFG_PROC25 0x80 /* 25Mhz processor clock, else 20Mhz */
  215. /* PCI Definitions... */
  216. #define SPX_VENDOR_ID 0x11CB /* Assigned by the PCI SIG */
  217. #define SPX_DEVICE_ID 0x8000 /* RIO bridge boards */
  218. #define SPX_PLXDEVICE_ID 0x2000 /* PLX bridge boards */
  219. #define SPX_SUB_VENDOR_ID SPX_VENDOR_ID /* Same as vendor id */
  220. #define RIO_SUB_SYS_ID 0x0800 /* RIO PCI board */
  221. /*****************************************************************************
  222. ***************************** ******************************
  223. ***************************** RIO (Jet) PCI ******************************
  224. ***************************** ******************************
  225. *****************************************************************************/
  226. /* Control Register Definitions... */
  227. #define RIO_PCI2_IDENT "JET HOST BY KEV#"
  228. #define RIO_PCI2_CFG_BUSENABLE 0x02 /* Enable processor bus */
  229. #define RIO_PCI2_CFG_INTENABLE 0x04 /* Interrupt enable, else disable */
  230. /* PCI Definitions... */
  231. #define RIO2_SUB_SYS_ID 0x0100 /* RIO (Jet) PCI board */
  232. #endif /*_rioboard_h */
  233. /* End of RIOBOARD.H */