home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1067 / space-mux4 < prev   
Text File  |  1990-12-28  |  5KB  |  174 lines

  1. /* Async device configuration file for the FAS async driver. */
  2.  
  3. /* This version is for the DFI MU440 mux board in expanded mode. This board
  4.    is reported to be compatible with the AST 4-port card.
  5. */
  6.  
  7. /* Originally written by
  8. Jim Murray              encore!cloud9!jjmhome!jjm
  9. 2 Mohawk Circle         harvard!m2c!jjmhome!jjm
  10. Westboro Mass 01581     jjm%jjmhome@m2c.m2c.org
  11. USA                     voice (508) 366-2813
  12. */
  13.  
  14. /* Current author:
  15. Uwe Doering        gemini@geminix.mbx.sub.org
  16. Billstedter Pfad 17 B
  17. 1000 Berlin 20
  18. West Germany
  19. */
  20.  
  21. #ident    "@(#)space.c    2.06"
  22.  
  23. #include <sys/fas.h>
  24.  
  25. /* This is the number of devices to be handled by this driver.
  26.    You may define up to 16 devices.  If this number is changed
  27.    the arrays below must be filled in accordingly.
  28. */
  29. #define NUM_PHYSICAL_UNITS    4
  30.  
  31. #if NUM_PHYSICAL_UNITS > MAX_UNITS
  32. #undef NUM_PHYSICAL_UNITS
  33. #define NUM_PHYSICAL_UNITS    MAX_UNITS
  34. #endif
  35.  
  36. /* let the driver know the number of devices */
  37. uint    fas_physical_units = NUM_PHYSICAL_UNITS;
  38.  
  39. /* array of base port addresses */
  40. uint    fas_port [NUM_PHYSICAL_UNITS] =
  41. {
  42.     0x2a0,    0x2a8,    0x2b0,    0x2b8
  43. };
  44.  
  45. /* array of interrupt vectors */
  46. uint    fas_vec [NUM_PHYSICAL_UNITS] =
  47. {
  48.     0x4,    0x4,    0x4,    0x4
  49. };
  50.  
  51. /* initial modem control port info
  52.    This value is ored into the modem control value for each UART.  This is
  53.    normaly used to force out2 which is used to enable the interrupts of
  54.    the standard com1 and com2 ports.  Several brands of cards have modes
  55.    that allow them to work in compatible mode like com1 and com2 or as a
  56.    mux.  One of these cards is the MU-440 card by DFI.  When this card is
  57.    used with the common interrupt out2 must not be set or there will be
  58.    a fight on the bus.
  59.  
  60.    Note: This is one of the major trouble-spots with mux cards. Check
  61.          your manual.
  62. */
  63.  
  64. uint    fas_mcb [NUM_PHYSICAL_UNITS] =
  65. {
  66.     0,    0,    0,    0
  67. };
  68.  
  69. /* array of modem control flags
  70.    You can choose which signals to use for modem control. See fas.h
  71.    for possible names and values. Whether or not modem control is
  72.    used is determined by the minor device number at open time.
  73. */
  74. uint    fas_modem [NUM_PHYSICAL_UNITS] =
  75. {
  76.     EN_DTR | CA_DCD | UB_RING,
  77.     EN_DTR | CA_DCD | UB_RING,
  78.     EN_DTR | CA_DCD | UB_RING,
  79.     EN_DTR | CA_DCD | UB_RING
  80. };
  81.  
  82. /* array of hardware flow control flags
  83.    You can choose which signals to use for hardware handshake. See fas.h
  84.    for possible names and values. Whether or not hardware handshake is
  85.    used is determined by the minor device number at open time.
  86. */
  87. uint    fas_flow [NUM_PHYSICAL_UNITS] =
  88. {
  89.     HI_RTS | HO_CTS_ON_DSR,
  90.     HI_RTS | HO_CTS_ON_DSR,
  91.     HI_RTS | HO_CTS_ON_DSR,
  92.     HI_RTS | HO_CTS_ON_DSR
  93. };
  94.  
  95. /* additional configurations for multiplexed interrupt boards
  96.    If you have a mux board, you may have to acknowledge interrupts
  97.    by writing to a special register. There may be a separate register
  98.    for every single port or for every interrupt vector or both.
  99.    The following arrays contain the special register addresses and
  100.    the corresponding values that are written to them in response
  101.    to an interrupt.
  102. */
  103.  
  104. /* array of int ack register addresses
  105.    These registers are written to every time after all interrupt
  106.    sources in the corresponding UART have been cleared.
  107.    Enter the addresses on a per unit base. An address of zero
  108.    disables this feature.
  109. */
  110.  
  111. uint    fas_int_ack_port [NUM_PHYSICAL_UNITS] =
  112. {
  113.     0,    0,    0,    0
  114. };
  115.  
  116. /* array of int ack values
  117.    These values are written to the corresponding int ack register
  118.    in response to an interrupt.
  119. */
  120.  
  121. uint    fas_int_ack [NUM_PHYSICAL_UNITS] =
  122. {
  123.     0,    0,    0,    0
  124. };
  125.  
  126. /* array of int ack mux register addresses
  127.    These registers are written to every time after all interrupt
  128.    sources in all of the UARTs that are tied to the corresponding
  129.    interrupt vector have been cleared.
  130.    Enter the addresses on a per vector base. An address of zero
  131.    disables this feature.
  132. */
  133.  
  134. uint    fas_mux_ack_port [NUM_INT_VECTORS] =
  135. {
  136.     0,    0,    0,    0,
  137.     0x2bf,    0,    0,    0,
  138.     0,    0,    0,    0,
  139.     0,    0,    0,    0
  140. };
  141.  
  142. /* array of int ack mux values
  143.    These values are written to the corresponding int ack mux register
  144.    in response to an interrupt.
  145. */
  146.  
  147. uint    fas_mux_ack [NUM_INT_VECTORS] =
  148. {
  149.     0,    0,    0,    0,
  150.     0x80,    0,    0,    0,
  151.     0,    0,    0,    0,
  152.     0,    0,    0,    0
  153. };
  154.  
  155. /* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
  156.    ============================================
  157. */
  158.  
  159. /* array of structures to hold all info for a physical minor device */
  160. struct fas_info    fas_info [NUM_PHYSICAL_UNITS];
  161.  
  162. /* array of ttys for logical minor devices */
  163. struct tty    fas_tty [NUM_PHYSICAL_UNITS * 2];
  164.  
  165. /* array of pointers to fas_info structures
  166.    this prevents time consuming multiplications for index calculation
  167. */
  168. struct fas_info    *fas_info_ptr [NUM_PHYSICAL_UNITS];
  169.  
  170. /* array of pointers to fas_tty structures
  171.    this prevents time consuming multiplications for index calculation
  172. */
  173. struct tty    *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
  174.