riospace.h 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*
  2. ** -----------------------------------------------------------------------------
  3. **
  4. ** Perle Specialix driver for Linux
  5. ** Ported from existing RIO Driver for SCO sources.
  6. *
  7. * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
  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 as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; if not, write to the Free Software
  21. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. **
  23. ** Module : riospace.h
  24. ** SID : 1.2
  25. ** Last Modified : 11/6/98 11:34:13
  26. ** Retrieved : 11/6/98 11:34:22
  27. **
  28. ** ident @(#)riospace.h 1.2
  29. **
  30. ** -----------------------------------------------------------------------------
  31. */
  32. #ifndef __rio_riospace_h__
  33. #define __rio_riospace_h__
  34. #ifdef SCCS_LABELS
  35. static char *_riospace_h_sccs_ = "@(#)riospace.h 1.2";
  36. #endif
  37. #define RIO_LOCATOR_LEN 16
  38. #define MAX_RIO_BOARDS 4
  39. /*
  40. ** DONT change this file. At all. Unless you can rebuild the entire
  41. ** device driver, which you probably can't, then the rest of the
  42. ** driver won't see any changes you make here. So don't make any.
  43. ** In particular, it won't be able to see changes to RIO_SLOTS
  44. */
  45. struct Conf {
  46. char Locator[24];
  47. unsigned int StartupTime;
  48. unsigned int SlowCook;
  49. unsigned int IntrPollTime;
  50. unsigned int BreakInterval;
  51. unsigned int Timer;
  52. unsigned int RtaLoadBase;
  53. unsigned int HostLoadBase;
  54. unsigned int XpHz;
  55. unsigned int XpCps;
  56. char *XpOn;
  57. char *XpOff;
  58. unsigned int MaxXpCps;
  59. unsigned int MinXpCps;
  60. unsigned int SpinCmds;
  61. unsigned int FirstAddr;
  62. unsigned int LastAddr;
  63. unsigned int BufferSize;
  64. unsigned int LowWater;
  65. unsigned int LineLength;
  66. unsigned int CmdTime;
  67. };
  68. /*
  69. ** Board types - these MUST correspond to product codes!
  70. */
  71. #define RIO_EMPTY 0x0
  72. #define RIO_EISA 0x3
  73. #define RIO_RTA_16 0x9
  74. #define RIO_AT 0xA
  75. #define RIO_MCA 0xB
  76. #define RIO_PCI 0xD
  77. #define RIO_RTA 0xE
  78. /*
  79. ** Board data structure. This is used for configuration info
  80. */
  81. struct Brd {
  82. unsigned char Type; /* RIO_EISA, RIO_MCA, RIO_AT, RIO_EMPTY... */
  83. unsigned char Ivec; /* POLLED or ivec number */
  84. unsigned char Mode; /* Control stuff, see below */
  85. };
  86. struct Board {
  87. char Locator[RIO_LOCATOR_LEN];
  88. int NumSlots;
  89. struct Brd Boards[MAX_RIO_BOARDS];
  90. };
  91. #define BOOT_FROM_LINK 0x00
  92. #define BOOT_FROM_RAM 0x01
  93. #define EXTERNAL_BUS_OFF 0x00
  94. #define EXTERNAL_BUS_ON 0x02
  95. #define INTERRUPT_DISABLE 0x00
  96. #define INTERRUPT_ENABLE 0x04
  97. #define BYTE_OPERATION 0x00
  98. #define WORD_OPERATION 0x08
  99. #define POLLED INTERRUPT_DISABLE
  100. #define IRQ_15 (0x00 | INTERRUPT_ENABLE)
  101. #define IRQ_12 (0x10 | INTERRUPT_ENABLE)
  102. #define IRQ_11 (0x20 | INTERRUPT_ENABLE)
  103. #define IRQ_9 (0x30 | INTERRUPT_ENABLE)
  104. #define SLOW_LINKS 0x00
  105. #define FAST_LINKS 0x40
  106. #define SLOW_AT_BUS 0x00
  107. #define FAST_AT_BUS 0x80
  108. #define SLOW_PCI_TP 0x00
  109. #define FAST_PCI_TP 0x80
  110. /*
  111. ** Debug levels
  112. */
  113. #define DBG_NONE 0x00000000
  114. #define DBG_INIT 0x00000001
  115. #define DBG_OPEN 0x00000002
  116. #define DBG_CLOSE 0x00000004
  117. #define DBG_IOCTL 0x00000008
  118. #define DBG_READ 0x00000010
  119. #define DBG_WRITE 0x00000020
  120. #define DBG_INTR 0x00000040
  121. #define DBG_PROC 0x00000080
  122. #define DBG_PARAM 0x00000100
  123. #define DBG_CMD 0x00000200
  124. #define DBG_XPRINT 0x00000400
  125. #define DBG_POLL 0x00000800
  126. #define DBG_DAEMON 0x00001000
  127. #define DBG_FAIL 0x00002000
  128. #define DBG_MODEM 0x00004000
  129. #define DBG_LIST 0x00008000
  130. #define DBG_ROUTE 0x00010000
  131. #define DBG_UTIL 0x00020000
  132. #define DBG_BOOT 0x00040000
  133. #define DBG_BUFFER 0x00080000
  134. #define DBG_MON 0x00100000
  135. #define DBG_SPECIAL 0x00200000
  136. #define DBG_VPIX 0x00400000
  137. #define DBG_FLUSH 0x00800000
  138. #define DBG_QENABLE 0x01000000
  139. #define DBG_ALWAYS 0x80000000
  140. #endif /* __rio_riospace_h__ */