home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2659 < prev    next >
Encoding:
Internet Message Format  |  1991-02-05  |  51.1 KB

  1. From: gemini@geminix.in-berlin.de (Uwe Doering)
  2. Newsgroups: comp.unix.sysv386,comp.unix.xenix.sco,alt.sources
  3. Subject: FAS 2.08 async driver, part 4/4
  4. Message-ID: <80TN5IE@geminix.in-berlin.de>
  5. Date: 3 Feb 91 22:18:49 GMT
  6.  
  7. Submitted-by: gemini@geminix.in-berlin.de
  8. Archive-name: fas208/part04
  9.  
  10. #!/bin/sh
  11. # this is fas208.04 (part 4 of fas208)
  12. # do not concatenate these parts, unpack them in order with /bin/sh
  13. # file fas.h continued
  14. #
  15. if test ! -r _shar_seq_.tmp; then
  16.     echo 'Please unpack part 1 first!'
  17.     exit 1
  18. fi
  19. (read Scheck
  20.  if test "$Scheck" != 4; then
  21.     echo Please unpack part "$Scheck" next!
  22.     exit 1
  23.  else
  24.     exit 0
  25.  fi
  26. ) < _shar_seq_.tmp || exit 1
  27. if test ! -f _shar_wnt_.tmp; then
  28.     echo 'x - still skipping fas.h'
  29. else
  30. echo 'x - continuing file fas.h'
  31. sed 's/^X//' << 'SHAR_EOF' >> 'fas.h' &&
  32. X
  33. X/* define an easy way to reference the port structures */
  34. X
  35. X#define RCV_DATA_PORT        (fip->port_0)
  36. X#define XMT_DATA_PORT        (fip->port_0)
  37. X#define INT_ENABLE_PORT        (fip->port_1)
  38. X#define INT_ID_PORT        (fip->port_2)
  39. X#define NS_FIFO_CTL_PORT    (fip->port_2)
  40. X#define I_BANK_PORT        (fip->port_2)
  41. X#define LINE_CTL_PORT        (fip->port_3)
  42. X#define MDM_CTL_PORT        (fip->port_4)
  43. X#define I_IDM_PORT        (fip->port_4)
  44. X#define LINE_STATUS_PORT    (fip->port_5)
  45. X#define I_RCM_PORT        (fip->port_5)
  46. X#define MDM_STATUS_PORT        (fip->port_6)
  47. X#define I_TCM_PORT        (fip->port_6)
  48. X#define DIVISOR_LSB_PORT    (fip->port_0)
  49. X#define DIVISOR_MSB_PORT    (fip->port_1)
  50. X#define CTL_PORT        (fip->ctl_port)
  51. X
  52. X/* modem control port */
  53. X
  54. X#define MC_SET_DTR        0x01
  55. X#define MC_SET_RTS        0x02
  56. X#define MC_SET_OUT1        0x04
  57. X#define MC_SET_OUT2        0x08    /* tristates int line when false */
  58. X#define MC_SET_LOOPBACK        0x10
  59. X
  60. X#define MC_ANY_CONTROL    (MC_SET_DTR | MC_SET_RTS)
  61. X
  62. X/* modem status port */
  63. X
  64. X#define MS_CTS_DELTA        0x01
  65. X#define MS_DSR_DELTA        0x02
  66. X#define MS_RING_TEDGE        0x04
  67. X#define MS_DCD_DELTA        0x08
  68. X#define MS_CTS_PRESENT        0x10
  69. X#define MS_DSR_PRESENT        0x20
  70. X#define MS_RING_PRESENT        0x40
  71. X#define MS_DCD_PRESENT        0x80
  72. X
  73. X#define MS_ANY_DELTA    (MS_CTS_DELTA | MS_DSR_DELTA | MS_RING_TEDGE \
  74. X                | MS_DCD_DELTA)
  75. X#define MS_ANY_PRESENT    (MS_CTS_PRESENT | MS_DSR_PRESENT | MS_RING_PRESENT \
  76. X                | MS_DCD_PRESENT)
  77. X
  78. X/* interrupt enable port */
  79. X
  80. X#define IE_NONE                0x00
  81. X#define    IE_RECV_DATA_AVAILABLE        0x01
  82. X#define    IE_XMIT_HOLDING_BUFFER_EMPTY    0x02
  83. X#define IE_LINE_STATUS            0x04
  84. X#define IE_MODEM_STATUS            0x08
  85. X
  86. X#define IE_INIT_MODE    (IE_RECV_DATA_AVAILABLE | IE_XMIT_HOLDING_BUFFER_EMPTY \
  87. X            | IE_LINE_STATUS | IE_MODEM_STATUS)
  88. X
  89. X/* interrupt id port */
  90. X
  91. X#define II_NO_INTS_PENDING    0x01
  92. X#define II_CODE_MASK        0x07
  93. X#define II_MODEM_STATE        0x00
  94. X#define II_XMTD_CHAR        0x02
  95. X#define II_RCVD_CHAR        0x04
  96. X#define II_RCV_ERROR        0x06
  97. X#define II_NS_FIFO_TIMEOUT    0x08
  98. X#define II_NS_FIFO_ENABLED    0xC0
  99. X
  100. X/* line control port */
  101. X
  102. X#define    LC_WORDLEN_MASK        0x03
  103. X#define    LC_WORDLEN_5        0x00
  104. X#define    LC_WORDLEN_6        0x01
  105. X#define    LC_WORDLEN_7        0x02
  106. X#define    LC_WORDLEN_8        0x03
  107. X#define LC_STOPBITS_LONG    0x04
  108. X#define LC_ENABLE_PARITY    0x08
  109. X#define LC_EVEN_PARITY        0x10
  110. X#define LC_STICK_PARITY        0x20
  111. X#define LC_SET_BREAK_LEVEL    0x40
  112. X#define LC_ENABLE_DIVISOR    0x80
  113. X
  114. X/* line status port */
  115. X
  116. X#define LS_RCV_AVAIL        0x01
  117. X#define LS_OVERRUN        0x02
  118. X#define LS_PARITY_ERROR        0x04
  119. X#define LS_FRAMING_ERROR    0x08
  120. X#define LS_BREAK_DETECTED    0x10
  121. X#define LS_XMIT_AVAIL        0x20
  122. X#define LS_XMIT_COMPLETE    0x40
  123. X#define LS_ERROR_IN_NS_FIFO    0x80    /* NS16550A only */
  124. X#define LS_RCV_INT    (LS_RCV_AVAIL | LS_OVERRUN | LS_PARITY_ERROR \
  125. X            | LS_FRAMING_ERROR | LS_BREAK_DETECTED)
  126. X
  127. X/* fifo control port (NS16550A only) */
  128. X
  129. X#define    NS_FIFO_ENABLE        0x01
  130. X#define    NS_FIFO_CLR_RECV    0x02
  131. X#define    NS_FIFO_CLR_XMIT    0x04
  132. X#define    NS_FIFO_START_DMA    0x08
  133. X#define NS_FIFO_SIZE_1        0x00
  134. X#define NS_FIFO_SIZE_4        0x40
  135. X#define NS_FIFO_SIZE_8        0x80
  136. X#define NS_FIFO_SIZE_14        0xC0
  137. X#define NS_FIFO_SIZE_MASK    0xC0
  138. X
  139. X#define NS_FIFO_CLEAR_CMD    0
  140. X#define NS_FIFO_DROP_CMD    (NS_FIFO_SIZE_1 | NS_FIFO_ENABLE)
  141. X#define NS_FIFO_SETUP_CMD    (NS_FIFO_SIZE_4 | NS_FIFO_ENABLE)
  142. X#define NS_FIFO_INIT_CMD    (NS_FIFO_SETUP_CMD | NS_FIFO_CLR_RECV \
  143. X                | NS_FIFO_CLR_XMIT)
  144. X
  145. X#define INPUT_NS_FIFO_SIZE    16
  146. X#define OUTPUT_NS_FIFO_SIZE    16
  147. X
  148. X/* fifo control ports (i82510 only) */
  149. X
  150. X#define I_BANK_0        0x00
  151. X#define I_BANK_1        0x20
  152. X#define I_BANK_2        0x40
  153. X#define I_BANK_3        0x60
  154. X#define I_FIFO_ENABLE        0x08
  155. X#define I_FIFO_CLR_RECV        0x30
  156. X#define I_FIFO_CLR_XMIT        0x0c
  157. X
  158. X#define I_FIFO_CLEAR_CMD    0
  159. X#define I_FIFO_SETUP_CMD    I_FIFO_ENABLE
  160. X
  161. X#define INPUT_I_FIFO_SIZE    4
  162. X#define OUTPUT_I_FIFO_SIZE    4
  163. X
  164. X/* defines for ioctl calls (VP/ix) */
  165. X
  166. X#define AIOC            ('A'<<8)
  167. X#define AIOCINTTYPE        (AIOC|60)    /* set interrupt type */
  168. X#define AIOCDOSMODE        (AIOC|61)    /* set DOS mode */
  169. X#define AIOCNONDOSMODE        (AIOC|62)    /* reset DOS mode */
  170. X#define AIOCSERIALOUT        (AIOC|63)    /* serial device data write */
  171. X#define AIOCSERIALIN        (AIOC|64)    /* serial device data read */
  172. X#define AIOCSETSS        (AIOC|65)    /* set start/stop chars */
  173. X#define AIOCINFO        (AIOC|66)    /* tell us what device we are */
  174. X
  175. X/* ioctl alternate names used by VP/ix */
  176. X
  177. X#define VPC_SERIAL_DOS        AIOCDOSMODE
  178. X#define VPC_SERIAL_NONDOS    AIOCNONDOSMODE
  179. X#define VPC_SERIAL_INFO        AIOCINFO
  180. X#define VPC_SERIAL_OUT        AIOCSERIALOUT
  181. X#define VPC_SERIAL_IN        AIOCSERIALIN
  182. X
  183. X/* serial in/out requests */
  184. X
  185. X#define SO_DIVLLSB        1
  186. X#define SO_DIVLMSB        2
  187. X#define SO_LCR            3
  188. X#define SO_MCR            4
  189. X#define SI_MSR            1
  190. X#define SIO_MASK(x)        (1<<((x)-1))
  191. X
  192. X
  193. X/* This structure contains everything one would like to know about
  194. X   an open device.  There is one of it for each physical unit.
  195. X
  196. X   We use several unions to eliminate most integer type conversions
  197. X   at run-time. The standard UNIX V 3.X/386 C compiler forces all
  198. X   operands in expressions and all function parameters to type int.
  199. X   To save some time, with the means of unions we deliver type int
  200. X   at the proper locations while dealing with the original type
  201. X   wherever int would be slower.
  202. X
  203. X   This is highly compiler implementation specific. But for the sake
  204. X   of speed the end justifies the means.
  205. X
  206. X   Take care that the size of the area that contains the various
  207. X   structure fields (up to, but excluding the ring buffers)
  208. X   is <= 128 bytes. Otherwise a 4-byte offset is used to access
  209. X   some of the structure fields. For the first 128 bytes a 1-byte
  210. X   offset is used, which is faster.
  211. X*/
  212. X
  213. Xstruct    fas_info
  214. X{
  215. X    struct    tty    *tty;    /* the tty structure */
  216. X    struct    fas_info *prev_int_user;/* link to previous fas_info struct */
  217. X    struct    fas_info *next_int_user;/* link to next fas_info struct */
  218. X    int    timeout_idx;    /* timeout index for untimeout () */
  219. X    uint    iflag;        /* current terminal input flags */
  220. X    uint    cflag;        /* current terminal hardware control flags */
  221. X    union {            /* flags about the device state */
  222. X        ushort    s;
  223. X        uint    i;
  224. X    } device_flags;
  225. X    union {            /* flags about the flow control state */
  226. X        ushort    s;
  227. X        uint    i;
  228. X    } flow_flags;
  229. X    union {            /* flags about the scheduled events */
  230. X        ushort    s;
  231. X        uint    i;
  232. X    } event_flags;
  233. X    uint    o_state;    /* current open state */
  234. X    uint    po_state;    /* previous open state */
  235. X    union {            /* modem control masks */
  236. X        struct {
  237. X            unchar    di;    /* mask for modem disable */
  238. X            unchar    eo;    /* mask for modem enable (dialout) */
  239. X            unchar    ei;    /* mask for modem enable (dialin) */
  240. X            unchar    ca;    /* mask for carrier detect */
  241. X        } m;
  242. X        ulong    l;
  243. X    } modem;
  244. X    union {            /* hardware flow control masks */
  245. X        struct {
  246. X            unchar    ic;    /* control mask for inp. flow ctrl */
  247. X            unchar    oc;    /* control mask for outp. flow ctrl */
  248. X            unchar    oe;    /* enable mask for outp. flow ctrl */
  249. X            unchar    hc;    /* control mask for hdx flow ctrl */
  250. X        } m;
  251. X        ulong    l;
  252. X    } flow;
  253. X    unchar    msr;        /* modem status register value */
  254. X    unchar    new_msr;    /* new modem status register value */
  255. X    unchar    mcr;        /* modem control register value */
  256. X    unchar    lcr;        /* line control register value */
  257. X    unchar    ier;        /* interrupt enable register value */
  258. X    unchar    vec;        /* interrupt vector for this struct */
  259. X    unchar    msi_cnt;    /* modem status interrupt counter */
  260. X#if defined (HAVE_VPIX)
  261. X    unchar    v86_intmask;    /* VP/ix pseudorupt mask */
  262. X    v86_t    *v86_proc;    /* VP/ix v86proc pointer for pseudorupts */
  263. X    struct termss    v86_ss;    /* VP/ix start/stop characters */
  264. X#endif
  265. X    uint    ctl_port;    /* muliplexer control port */
  266. X    union {            /* uart port addresses and control values */
  267. X        uint    addr;
  268. X        struct {
  269. X            ushort    addr;
  270. X            unchar    ctl;
  271. X        } p;
  272. X    } port_0, port_1, port_2, port_3, port_4, port_5, port_6;
  273. X    uint    recv_ring_cnt;    /* receiver ring buffer counter */
  274. X    unchar    *recv_ring_put_ptr;    /* recv ring buf put ptr */
  275. X    unchar    *recv_ring_take_ptr;    /* recv ring buf take ptr */
  276. X    ushort    xmit_fifo_size;    /* transmitter FIFO size */
  277. X    ushort    xmit_ring_size;    /* transmitter ring buffer size */
  278. X    uint    xmit_ring_cnt;    /* transmitter ring buffer counter */
  279. X    unchar    *xmit_ring_put_ptr;    /* xmit ring buf put ptr */
  280. X    unchar    *xmit_ring_take_ptr;    /* xmit ring buf take ptr */
  281. X    unchar    recv_buffer [RECV_BUFF_SIZE];    /* recv ring buf */
  282. X    unchar    xmit_buffer [XMIT_BUFF_SIZE];    /* xmit ring buf */
  283. X};
  284. SHAR_EOF
  285. echo 'File fas.h is complete' &&
  286. true || echo 'restore of fas.h failed'
  287. rm -f _shar_wnt_.tmp
  288. fi
  289. # ============= i_fas-ast4 ==============
  290. if test -f 'i_fas-ast4' -a X"$1" != X"-c"; then
  291.     echo 'x - skipping i_fas-ast4 (File already exists)'
  292.     rm -f _shar_wnt_.tmp
  293. else
  294. > _shar_wnt_.tmp
  295. echo 'x - extracting i_fas-ast4 (Text)'
  296. sed 's/^X//' << 'SHAR_EOF' > 'i_fas-ast4' &&
  297. XF0:23:off:/etc/getty ttyFM00 9600
  298. XF1:23:off:/etc/getty ttyFM01 9600
  299. XF2:23:off:/etc/getty ttyFM02 9600
  300. XF3:23:off:/etc/getty ttyFM03 9600
  301. SHAR_EOF
  302. true || echo 'restore of i_fas-ast4 failed'
  303. rm -f _shar_wnt_.tmp
  304. fi
  305. # ============= i_fas-ast4c12 ==============
  306. if test -f 'i_fas-ast4c12' -a X"$1" != X"-c"; then
  307.     echo 'x - skipping i_fas-ast4c12 (File already exists)'
  308.     rm -f _shar_wnt_.tmp
  309. else
  310. > _shar_wnt_.tmp
  311. echo 'x - extracting i_fas-ast4c12 (Text)'
  312. sed 's/^X//' << 'SHAR_EOF' > 'i_fas-ast4c12' &&
  313. XF0:23:off:/etc/getty ttyFM00 9600
  314. XF1:23:off:/etc/getty ttyFM01 9600
  315. XF2:23:off:/etc/getty ttyFM02 9600
  316. XF3:23:off:/etc/getty ttyFM03 9600
  317. XF4:23:off:/etc/getty ttyFM04 9600
  318. XF5:23:off:/etc/getty ttyFM05 9600
  319. SHAR_EOF
  320. true || echo 'restore of i_fas-ast4c12 failed'
  321. rm -f _shar_wnt_.tmp
  322. fi
  323. # ============= i_fas-c1-2 ==============
  324. if test -f 'i_fas-c1-2' -a X"$1" != X"-c"; then
  325.     echo 'x - skipping i_fas-c1-2 (File already exists)'
  326.     rm -f _shar_wnt_.tmp
  327. else
  328. > _shar_wnt_.tmp
  329. echo 'x - extracting i_fas-c1-2 (Text)'
  330. sed 's/^X//' << 'SHAR_EOF' > 'i_fas-c1-2' &&
  331. XF0:23:off:/etc/getty ttyFM00 9600
  332. XF1:23:off:/etc/getty ttyFM01 9600
  333. SHAR_EOF
  334. true || echo 'restore of i_fas-c1-2 failed'
  335. rm -f _shar_wnt_.tmp
  336. fi
  337. # ============= i_fas-c1-3 ==============
  338. if test -f 'i_fas-c1-3' -a X"$1" != X"-c"; then
  339.     echo 'x - skipping i_fas-c1-3 (File already exists)'
  340.     rm -f _shar_wnt_.tmp
  341. else
  342. > _shar_wnt_.tmp
  343. echo 'x - extracting i_fas-c1-3 (Text)'
  344. sed 's/^X//' << 'SHAR_EOF' > 'i_fas-c1-3' &&
  345. XF0:23:off:/etc/getty ttyFM00 9600
  346. XF1:23:off:/etc/getty ttyFM01 9600
  347. XF2:23:off:/etc/getty ttyFM02 9600
  348. SHAR_EOF
  349. true || echo 'restore of i_fas-c1-3 failed'
  350. rm -f _shar_wnt_.tmp
  351. fi
  352. # ============= i_fas-hub6 ==============
  353. if test -f 'i_fas-hub6' -a X"$1" != X"-c"; then
  354.     echo 'x - skipping i_fas-hub6 (File already exists)'
  355.     rm -f _shar_wnt_.tmp
  356. else
  357. > _shar_wnt_.tmp
  358. echo 'x - extracting i_fas-hub6 (Text)'
  359. sed 's/^X//' << 'SHAR_EOF' > 'i_fas-hub6' &&
  360. XF0:23:off:/etc/getty ttyFM00 9600
  361. XF1:23:off:/etc/getty ttyFM01 9600
  362. XF2:23:off:/etc/getty ttyFM02 9600
  363. XF3:23:off:/etc/getty ttyFM03 9600
  364. XF4:23:off:/etc/getty ttyFM04 9600
  365. XF5:23:off:/etc/getty ttyFM05 9600
  366. SHAR_EOF
  367. true || echo 'restore of i_fas-hub6 failed'
  368. rm -f _shar_wnt_.tmp
  369. fi
  370. # ============= n_fas-ast4 ==============
  371. if test -f 'n_fas-ast4' -a X"$1" != X"-c"; then
  372.     echo 'x - skipping n_fas-ast4 (File already exists)'
  373.     rm -f _shar_wnt_.tmp
  374. else
  375. > _shar_wnt_.tmp
  376. echo 'x - extracting n_fas-ast4 (Text)'
  377. sed 's/^X//' << 'SHAR_EOF' > 'n_fas-ast4' &&
  378. Xfas    ttyF00    c    80
  379. Xfas    ttyF01    c    81
  380. Xfas    ttyF02    c    82
  381. Xfas    ttyF03    c    83
  382. Xfas    ttyFM00    c    208
  383. Xfas    ttyFM01    c    209
  384. Xfas    ttyFM02    c    210
  385. Xfas    ttyFM03    c    211
  386. SHAR_EOF
  387. true || echo 'restore of n_fas-ast4 failed'
  388. rm -f _shar_wnt_.tmp
  389. fi
  390. # ============= n_fas-ast4c12 ==============
  391. if test -f 'n_fas-ast4c12' -a X"$1" != X"-c"; then
  392.     echo 'x - skipping n_fas-ast4c12 (File already exists)'
  393.     rm -f _shar_wnt_.tmp
  394. else
  395. > _shar_wnt_.tmp
  396. echo 'x - extracting n_fas-ast4c12 (Text)'
  397. sed 's/^X//' << 'SHAR_EOF' > 'n_fas-ast4c12' &&
  398. Xfas    ttyF00    c    80
  399. Xfas    ttyF01    c    81
  400. Xfas    ttyF02    c    82
  401. Xfas    ttyF03    c    83
  402. Xfas    ttyF04    c    84
  403. Xfas    ttyF05    c    85
  404. Xfas    ttyFM00    c    208
  405. Xfas    ttyFM01    c    209
  406. Xfas    ttyFM02    c    210
  407. Xfas    ttyFM03    c    211
  408. Xfas    ttyFM04    c    212
  409. Xfas    ttyFM05    c    213
  410. SHAR_EOF
  411. true || echo 'restore of n_fas-ast4c12 failed'
  412. rm -f _shar_wnt_.tmp
  413. fi
  414. # ============= n_fas-c1-2 ==============
  415. if test -f 'n_fas-c1-2' -a X"$1" != X"-c"; then
  416.     echo 'x - skipping n_fas-c1-2 (File already exists)'
  417.     rm -f _shar_wnt_.tmp
  418. else
  419. > _shar_wnt_.tmp
  420. echo 'x - extracting n_fas-c1-2 (Text)'
  421. sed 's/^X//' << 'SHAR_EOF' > 'n_fas-c1-2' &&
  422. Xfas    ttyF00    c    80
  423. Xfas    ttyF01    c    81
  424. Xfas    ttyFM00    c    208
  425. Xfas    ttyFM01    c    209
  426. SHAR_EOF
  427. true || echo 'restore of n_fas-c1-2 failed'
  428. rm -f _shar_wnt_.tmp
  429. fi
  430. # ============= n_fas-c1-3 ==============
  431. if test -f 'n_fas-c1-3' -a X"$1" != X"-c"; then
  432.     echo 'x - skipping n_fas-c1-3 (File already exists)'
  433.     rm -f _shar_wnt_.tmp
  434. else
  435. > _shar_wnt_.tmp
  436. echo 'x - extracting n_fas-c1-3 (Text)'
  437. sed 's/^X//' << 'SHAR_EOF' > 'n_fas-c1-3' &&
  438. Xfas    ttyF00    c    80
  439. Xfas    ttyF01    c    81
  440. Xfas    ttyF02    c    82
  441. Xfas    ttyFM00    c    208
  442. Xfas    ttyFM01    c    209
  443. Xfas    ttyFM02    c    210
  444. SHAR_EOF
  445. true || echo 'restore of n_fas-c1-3 failed'
  446. rm -f _shar_wnt_.tmp
  447. fi
  448. # ============= n_fas-hub6 ==============
  449. if test -f 'n_fas-hub6' -a X"$1" != X"-c"; then
  450.     echo 'x - skipping n_fas-hub6 (File already exists)'
  451.     rm -f _shar_wnt_.tmp
  452. else
  453. > _shar_wnt_.tmp
  454. echo 'x - extracting n_fas-hub6 (Text)'
  455. sed 's/^X//' << 'SHAR_EOF' > 'n_fas-hub6' &&
  456. Xfas    ttyF00    c    80
  457. Xfas    ttyF01    c    81
  458. Xfas    ttyF02    c    82
  459. Xfas    ttyF03    c    83
  460. Xfas    ttyF04    c    84
  461. Xfas    ttyF05    c    85
  462. Xfas    ttyFM00    c    208
  463. Xfas    ttyFM01    c    209
  464. Xfas    ttyFM02    c    210
  465. Xfas    ttyFM03    c    211
  466. Xfas    ttyFM04    c    212
  467. Xfas    ttyFM05    c    213
  468. SHAR_EOF
  469. true || echo 'restore of n_fas-hub6 failed'
  470. rm -f _shar_wnt_.tmp
  471. fi
  472. # ============= s_fas-ast4 ==============
  473. if test -f 's_fas-ast4' -a X"$1" != X"-c"; then
  474.     echo 'x - skipping s_fas-ast4 (File already exists)'
  475.     rm -f _shar_wnt_.tmp
  476. else
  477. > _shar_wnt_.tmp
  478. echo 'x - extracting s_fas-ast4 (Text)'
  479. sed 's/^X//' << 'SHAR_EOF' > 's_fas-ast4' &&
  480. Xfas    Y    4    7    1    4    2a0    2bf    0    0
  481. SHAR_EOF
  482. true || echo 'restore of s_fas-ast4 failed'
  483. rm -f _shar_wnt_.tmp
  484. fi
  485. # ============= s_fas-ast4c12 ==============
  486. if test -f 's_fas-ast4c12' -a X"$1" != X"-c"; then
  487.     echo 'x - skipping s_fas-ast4c12 (File already exists)'
  488.     rm -f _shar_wnt_.tmp
  489. else
  490. > _shar_wnt_.tmp
  491. echo 'x - extracting s_fas-ast4c12 (Text)'
  492. sed 's/^X//' << 'SHAR_EOF' > 's_fas-ast4c12' &&
  493. Xfas    Y    4    7    1    9    2a0    2bf    0    0
  494. Xfas    Y    1    7    1    4    3f8    3ff    0    0
  495. Xfas    Y    1    7    1    3    2f8    2ff    0    0
  496. SHAR_EOF
  497. true || echo 'restore of s_fas-ast4c12 failed'
  498. rm -f _shar_wnt_.tmp
  499. fi
  500. # ============= s_fas-c1-2 ==============
  501. if test -f 's_fas-c1-2' -a X"$1" != X"-c"; then
  502.     echo 'x - skipping s_fas-c1-2 (File already exists)'
  503.     rm -f _shar_wnt_.tmp
  504. else
  505. > _shar_wnt_.tmp
  506. echo 'x - extracting s_fas-c1-2 (Text)'
  507. sed 's/^X//' << 'SHAR_EOF' > 's_fas-c1-2' &&
  508. Xfas    Y    1    7    1    4    3f8    3ff    0    0
  509. Xfas    Y    1    7    1    3    2f8    2ff    0    0
  510. SHAR_EOF
  511. true || echo 'restore of s_fas-c1-2 failed'
  512. rm -f _shar_wnt_.tmp
  513. fi
  514. # ============= s_fas-c1-3 ==============
  515. if test -f 's_fas-c1-3' -a X"$1" != X"-c"; then
  516.     echo 'x - skipping s_fas-c1-3 (File already exists)'
  517.     rm -f _shar_wnt_.tmp
  518. else
  519. > _shar_wnt_.tmp
  520. echo 'x - extracting s_fas-c1-3 (Text)'
  521. sed 's/^X//' << 'SHAR_EOF' > 's_fas-c1-3' &&
  522. Xfas    Y    1    7    1    4    3f8    3ff    0    0
  523. Xfas    Y    1    7    1    3    2f8    2ff    0    0
  524. Xfas    Y    1    7    1    9    3e8    3ef    0    0
  525. SHAR_EOF
  526. true || echo 'restore of s_fas-c1-3 failed'
  527. rm -f _shar_wnt_.tmp
  528. fi
  529. # ============= s_fas-hub6 ==============
  530. if test -f 's_fas-hub6' -a X"$1" != X"-c"; then
  531.     echo 'x - skipping s_fas-hub6 (File already exists)'
  532.     rm -f _shar_wnt_.tmp
  533. else
  534. > _shar_wnt_.tmp
  535. echo 'x - extracting s_fas-hub6 (Text)'
  536. sed 's/^X//' << 'SHAR_EOF' > 's_fas-hub6' &&
  537. Xfas    Y    6    7    1    3    302    308    0    0
  538. SHAR_EOF
  539. true || echo 'restore of s_fas-hub6 failed'
  540. rm -f _shar_wnt_.tmp
  541. fi
  542. # ============= space-ast4 ==============
  543. if test -f 'space-ast4' -a X"$1" != X"-c"; then
  544.     echo 'x - skipping space-ast4 (File already exists)'
  545.     rm -f _shar_wnt_.tmp
  546. else
  547. > _shar_wnt_.tmp
  548. echo 'x - extracting space-ast4 (Text)'
  549. sed 's/^X//' << 'SHAR_EOF' > 'space-ast4' &&
  550. X/* Async device configuration file for the FAS async driver. */
  551. X
  552. X/* This version is for the AST 4-port card in expanded mode.
  553. X*/
  554. X/* FAS was developed by
  555. XUwe Doering             INET : gemini@geminix.in-berlin.de
  556. XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
  557. X1000 Berlin 20
  558. XGermany
  559. X*/
  560. X
  561. X#if !defined (M_I286)
  562. X#ident    "@(#)space.c    2.08"
  563. X#endif
  564. X
  565. X#if defined (XENIX)
  566. X#include "fas.h"
  567. X#else
  568. X#include <sys/fas.h>
  569. X#endif
  570. X
  571. X/* This is the number of devices to be handled by this driver.
  572. X   You may define up to 16 devices.  If this number is changed
  573. X   the arrays below must be filled in accordingly.
  574. X*/
  575. X#define NUM_PHYSICAL_UNITS    4
  576. X
  577. X#if NUM_PHYSICAL_UNITS > MAX_UNITS
  578. X#undef NUM_PHYSICAL_UNITS
  579. X#define NUM_PHYSICAL_UNITS    MAX_UNITS
  580. X#endif
  581. X
  582. X/* let the driver know the number of devices */
  583. Xuint    fas_physical_units = NUM_PHYSICAL_UNITS;
  584. X
  585. X/* array of base port addresses
  586. X   If you deliberately want to force off the FIFOs of a UART you have
  587. X   to "or" the NO_FIFO macro to its base port address. This is useful
  588. X   for mouse devices where you need immediate response to the mouse
  589. X   movement.
  590. X*/
  591. Xulong    fas_port [NUM_PHYSICAL_UNITS] =
  592. X{
  593. X    0x2a0,    0x2a8,    0x2b0,    0x2b8
  594. X};
  595. X
  596. X/* array of interrupt vectors */
  597. Xuint    fas_vec [NUM_PHYSICAL_UNITS] =
  598. X{
  599. X    0x4,    0x4,    0x4,    0x4
  600. X};
  601. X
  602. X/* initialization sequence for serial card
  603. X   This array contains pairs of values of the form:
  604. X
  605. X        portaddress, value,
  606. X              :
  607. X              :
  608. X        portaddress, value,
  609. X        0
  610. X
  611. X   For every line `value' will be written to `portaddress'. If
  612. X   `value' is replaced with the macro `READ_PORT' then a value
  613. X   is read from `portaddress' instead. The value itself will be
  614. X   discarded. Therefor this makes only sense if the read access
  615. X   to the port has a side effect like setting or resetting
  616. X   certain flags.
  617. X
  618. X   NOTE: This array *must* be terminated with a value of 0
  619. X         in the portaddress column!
  620. X*/
  621. Xuint    fas_init_seq [] =
  622. X{
  623. X    0x2bf,    0x80,
  624. X    0
  625. X};
  626. X
  627. X/* initial modem control port info
  628. X   This value is ored into the modem control value for each UART. This is
  629. X   normaly used to force out2 which is used to enable the interrupts of
  630. X   the standard com1 and com2 ports. Several brands of cards have modes
  631. X   that allow them to work in compatible mode like com1 and com2 or as a
  632. X   shared interrupts card. One of these cards is the AST 4-port card. When
  633. X   this card is used in shared interrupts mode out2 must _not_ be set.
  634. X
  635. X   Note: This is one of the major trouble-spots with shared interrupts
  636. X   cards. Check your manual.
  637. X*/
  638. Xuint    fas_mcb [NUM_PHYSICAL_UNITS] =
  639. X{
  640. X    0,    0,    0,    0
  641. X};
  642. X
  643. X/* array of modem control flags
  644. X   You can choose which signals to use for modem control. See fas.h
  645. X   for possible names and values. Whether or not modem control is
  646. X   used is determined by the minor device number at open time.
  647. X*/
  648. Xulong    fas_modem [NUM_PHYSICAL_UNITS] =
  649. X{
  650. X    EO_DTR | EI_DTR | CA_DCD,
  651. X    EO_DTR | EI_DTR | CA_DCD,
  652. X    EO_DTR | EI_DTR | CA_DCD,
  653. X    EO_DTR | EI_DTR | CA_DCD
  654. X};
  655. X
  656. X/* array of hardware flow control flags
  657. X   You can choose which signals to use for hardware handshake. See fas.h
  658. X   for possible names and values. Whether or not hardware handshake is
  659. X   used is determined by the minor device number at open time and by the
  660. X   RTSFLOW/CTSFLOW termio(7) flags.
  661. X*/
  662. Xulong    fas_flow [NUM_PHYSICAL_UNITS] =
  663. X{
  664. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  665. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  666. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  667. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS
  668. X};
  669. X
  670. X/* array of control register addresses
  671. X   There are serial boards available that have all serial ports
  672. X   multiplexed to one address location in order to save I/O address
  673. X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
  674. X   by a special register that needs to be written to before the actual
  675. X   port registers can be accessed. This array contains the addresses
  676. X   of these special registers.
  677. X   Enter the addresses on a per unit base. An address of zero
  678. X   disables this feature.
  679. X*/
  680. Xuint    fas_ctl_port [NUM_PHYSICAL_UNITS] =
  681. X{
  682. X    0,    0,    0,    0
  683. X};
  684. X
  685. X/* array of control register values
  686. X   These values are written to the corresponding control register
  687. X   before the first access to the actual port registers. If not only
  688. X   entire UART chips (blocks of 8 contiguous addresses) but even the
  689. X   single registers of the UART chips need to be multiplexed to one
  690. X   address you have to "or" a bit mask (shifted 8 times to the left)
  691. X   to the control register value. This mask determines at which bit
  692. X   locations the UART chip register number is "xored" into the control
  693. X   register value at runtime. This implies that you can also use
  694. X   negative logic by setting the bits in the control register value
  695. X   to 1 at the locations corresponding to the bit mask.
  696. X*/
  697. Xuint    fas_ctl_val [NUM_PHYSICAL_UNITS] =
  698. X{
  699. X    0,    0,    0,    0
  700. X};
  701. X
  702. X/* additional configurations for shared interrupts boards
  703. X   If you have a shared interrupts board, you may have to acknowledge
  704. X   interrupts by writing to a special register. The following arrays
  705. X   contain the special register addresses and the corresponding values
  706. X   that are written to them in response to an interrupt.
  707. X*/
  708. X
  709. X/* array of int ack register addresses
  710. X   These registers are written to every time after all interrupt
  711. X   sources in all of the UARTs that are tied to the corresponding
  712. X   interrupt vector have been cleared.
  713. X   Enter the addresses on a per vector base. An address of zero
  714. X   disables this feature.
  715. X*/
  716. Xuint    fas_int_ack_port [NUM_INT_VECTORS] =
  717. X{
  718. X    0,    0,    0,    0,
  719. X    0,    0,    0,    0,
  720. X    0,    0,    0,    0,
  721. X    0,    0,    0,    0,
  722. X    0,    0,    0,    0,
  723. X    0,    0,    0,    0,
  724. X    0,    0,    0,    0,
  725. X    0,    0,    0,    0
  726. X};
  727. X
  728. X/* array of int ack values
  729. X   These values are written to the corresponding int ack register
  730. X   in response to an interrupt.
  731. X*/
  732. Xuint    fas_int_ack [NUM_INT_VECTORS] =
  733. X{
  734. X    0,    0,    0,    0,
  735. X    0,    0,    0,    0,
  736. X    0,    0,    0,    0,
  737. X    0,    0,    0,    0,
  738. X    0,    0,    0,    0,
  739. X    0,    0,    0,    0,
  740. X    0,    0,    0,    0,
  741. X    0,    0,    0,    0
  742. X};
  743. X
  744. X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
  745. X   ============================================
  746. X*/
  747. X
  748. X/* array of structures to hold all info for a physical minor device */
  749. Xstruct fas_info    fas_info [NUM_PHYSICAL_UNITS];
  750. X
  751. X/* array of ttys for logical minor devices */
  752. Xstruct tty    fas_tty [NUM_PHYSICAL_UNITS * 2];
  753. X
  754. X/* array of pointers to fas_info structures
  755. X   this prevents time consuming multiplications for index calculation
  756. X*/
  757. Xstruct fas_info    *fas_info_ptr [NUM_PHYSICAL_UNITS];
  758. X
  759. X/* array of pointers to fas_tty structures
  760. X   this prevents time consuming multiplications for index calculation
  761. X*/
  762. Xstruct tty    *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
  763. SHAR_EOF
  764. true || echo 'restore of space-ast4 failed'
  765. rm -f _shar_wnt_.tmp
  766. fi
  767. # ============= space-ast4c12 ==============
  768. if test -f 'space-ast4c12' -a X"$1" != X"-c"; then
  769.     echo 'x - skipping space-ast4c12 (File already exists)'
  770.     rm -f _shar_wnt_.tmp
  771. else
  772. > _shar_wnt_.tmp
  773. echo 'x - extracting space-ast4c12 (Text)'
  774. sed 's/^X//' << 'SHAR_EOF' > 'space-ast4c12' &&
  775. X/* Async device configuration file for the FAS async driver. */
  776. X
  777. X/* This version is for the AST 4-port card in expanded mode plus
  778. X   the standard COM1 and COM2 ports.
  779. X*/
  780. X/* FAS was developed by
  781. XUwe Doering             INET : gemini@geminix.in-berlin.de
  782. XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
  783. X1000 Berlin 20
  784. XGermany
  785. X*/
  786. X
  787. X#if !defined (M_I286)
  788. X#ident    "@(#)space.c    2.08"
  789. X#endif
  790. X
  791. X#if defined (XENIX)
  792. X#include "fas.h"
  793. X#else
  794. X#include <sys/fas.h>
  795. X#endif
  796. X
  797. X/* This is the number of devices to be handled by this driver.
  798. X   You may define up to 16 devices.  If this number is changed
  799. X   the arrays below must be filled in accordingly.
  800. X*/
  801. X#define NUM_PHYSICAL_UNITS    6
  802. X
  803. X#if NUM_PHYSICAL_UNITS > MAX_UNITS
  804. X#undef NUM_PHYSICAL_UNITS
  805. X#define NUM_PHYSICAL_UNITS    MAX_UNITS
  806. X#endif
  807. X
  808. X/* let the driver know the number of devices */
  809. Xuint    fas_physical_units = NUM_PHYSICAL_UNITS;
  810. X
  811. X/* array of base port addresses
  812. X   If you deliberately want to force off the FIFOs of a UART you have
  813. X   to "or" the NO_FIFO macro to its base port address. This is useful
  814. X   for mouse devices where you need immediate response to the mouse
  815. X   movement.
  816. X*/
  817. Xulong    fas_port [NUM_PHYSICAL_UNITS] =
  818. X{
  819. X    0x2a0,    0x2a8,    0x2b0,    0x2b8,
  820. X    0x3f8,    0x2f8
  821. X};
  822. X
  823. X/* array of interrupt vectors */
  824. Xuint    fas_vec [NUM_PHYSICAL_UNITS] =
  825. X{
  826. X    0x9,    0x9,    0x9,    0x9,
  827. X    0x4,    0x3
  828. X};
  829. X
  830. X/* initialization sequence for serial card
  831. X   This array contains pairs of values of the form:
  832. X
  833. X        portaddress, value,
  834. X              :
  835. X              :
  836. X        portaddress, value,
  837. X        0
  838. X
  839. X   For every line `value' will be written to `portaddress'. If
  840. X   `value' is replaced with the macro `READ_PORT' then a value
  841. X   is read from `portaddress' instead. The value itself will be
  842. X   discarded. Therefor this makes only sense if the read access
  843. X   to the port has a side effect like setting or resetting
  844. X   certain flags.
  845. X
  846. X   NOTE: This array *must* be terminated with a value of 0
  847. X         in the portaddress column!
  848. X*/
  849. Xuint    fas_init_seq [] =
  850. X{
  851. X    0x2bf,    0x80,
  852. X    0
  853. X};
  854. X
  855. X/* initial modem control port info
  856. X   This value is ored into the modem control value for each UART. This is
  857. X   normaly used to force out2 which is used to enable the interrupts of
  858. X   the standard com1 and com2 ports. Several brands of cards have modes
  859. X   that allow them to work in compatible mode like com1 and com2 or as a
  860. X   shared interrupts card. One of these cards is the AST 4-port card. When
  861. X   this card is used in shared interrupts mode out2 must _not_ be set.
  862. X
  863. X   Note: This is one of the major trouble-spots with shared interrupts
  864. X   cards. Check your manual.
  865. X*/
  866. Xuint    fas_mcb [NUM_PHYSICAL_UNITS] =
  867. X{
  868. X    0,    0,    0,    0,
  869. X    MC_SET_OUT2,    MC_SET_OUT2
  870. X};
  871. X
  872. X/* array of modem control flags
  873. X   You can choose which signals to use for modem control. See fas.h
  874. X   for possible names and values. Whether or not modem control is
  875. X   used is determined by the minor device number at open time.
  876. X*/
  877. Xulong    fas_modem [NUM_PHYSICAL_UNITS] =
  878. X{
  879. X    EO_DTR | EI_DTR | CA_DCD,
  880. X    EO_DTR | EI_DTR | CA_DCD,
  881. X    EO_DTR | EI_DTR | CA_DCD,
  882. X    EO_DTR | EI_DTR | CA_DCD,
  883. X    EO_DTR | EI_DTR | CA_DCD,
  884. X    EO_DTR | EI_DTR | CA_DCD
  885. X};
  886. X
  887. X/* array of hardware flow control flags
  888. X   You can choose which signals to use for hardware handshake. See fas.h
  889. X   for possible names and values. Whether or not hardware handshake is
  890. X   used is determined by the minor device number at open time and by the
  891. X   RTSFLOW/CTSFLOW termio(7) flags.
  892. X*/
  893. Xulong    fas_flow [NUM_PHYSICAL_UNITS] =
  894. X{
  895. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  896. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  897. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  898. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  899. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  900. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS
  901. X};
  902. X
  903. X/* array of control register addresses
  904. X   There are serial boards available that have all serial ports
  905. X   multiplexed to one address location in order to save I/O address
  906. X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
  907. X   by a special register that needs to be written to before the actual
  908. X   port registers can be accessed. This array contains the addresses
  909. X   of these special registers.
  910. X   Enter the addresses on a per unit base. An address of zero
  911. X   disables this feature.
  912. X*/
  913. Xuint    fas_ctl_port [NUM_PHYSICAL_UNITS] =
  914. X{
  915. X    0,    0,    0,    0,
  916. X    0,    0
  917. X};
  918. X
  919. X/* array of control register values
  920. X   These values are written to the corresponding control register
  921. X   before the first access to the actual port registers. If not only
  922. X   entire UART chips (blocks of 8 contiguous addresses) but even the
  923. X   single registers of the UART chips need to be multiplexed to one
  924. X   address you have to "or" a bit mask (shifted 8 times to the left)
  925. X   to the control register value. This mask determines at which bit
  926. X   locations the UART chip register number is "xored" into the control
  927. X   register value at runtime. This implies that you can also use
  928. X   negative logic by setting the bits in the control register value
  929. X   to 1 at the locations corresponding to the bit mask.
  930. X*/
  931. Xuint    fas_ctl_val [NUM_PHYSICAL_UNITS] =
  932. X{
  933. X    0,    0,    0,    0,
  934. X    0,    0
  935. X};
  936. X
  937. X/* additional configurations for shared interrupts boards
  938. X   If you have a shared interrupts board, you may have to acknowledge
  939. X   interrupts by writing to a special register. The following arrays
  940. X   contain the special register addresses and the corresponding values
  941. X   that are written to them in response to an interrupt.
  942. X*/
  943. X
  944. X/* array of int ack register addresses
  945. X   These registers are written to every time after all interrupt
  946. X   sources in all of the UARTs that are tied to the corresponding
  947. X   interrupt vector have been cleared.
  948. X   Enter the addresses on a per vector base. An address of zero
  949. X   disables this feature.
  950. X*/
  951. Xuint    fas_int_ack_port [NUM_INT_VECTORS] =
  952. X{
  953. X    0,    0,    0,    0,
  954. X    0,    0,    0,    0,
  955. X    0,    0,    0,    0,
  956. X    0,    0,    0,    0,
  957. X    0,    0,    0,    0,
  958. X    0,    0,    0,    0,
  959. X    0,    0,    0,    0,
  960. X    0,    0,    0,    0
  961. X};
  962. X
  963. X/* array of int ack values
  964. X   These values are written to the corresponding int ack register
  965. X   in response to an interrupt.
  966. X*/
  967. Xuint    fas_int_ack [NUM_INT_VECTORS] =
  968. X{
  969. X    0,    0,    0,    0,
  970. X    0,    0,    0,    0,
  971. X    0,    0,    0,    0,
  972. X    0,    0,    0,    0,
  973. X    0,    0,    0,    0,
  974. X    0,    0,    0,    0,
  975. X    0,    0,    0,    0,
  976. X    0,    0,    0,    0
  977. X};
  978. X
  979. X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
  980. X   ============================================
  981. X*/
  982. X
  983. X/* array of structures to hold all info for a physical minor device */
  984. Xstruct fas_info    fas_info [NUM_PHYSICAL_UNITS];
  985. X
  986. X/* array of ttys for logical minor devices */
  987. Xstruct tty    fas_tty [NUM_PHYSICAL_UNITS * 2];
  988. X
  989. X/* array of pointers to fas_info structures
  990. X   this prevents time consuming multiplications for index calculation
  991. X*/
  992. Xstruct fas_info    *fas_info_ptr [NUM_PHYSICAL_UNITS];
  993. X
  994. X/* array of pointers to fas_tty structures
  995. X   this prevents time consuming multiplications for index calculation
  996. X*/
  997. Xstruct tty    *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
  998. SHAR_EOF
  999. true || echo 'restore of space-ast4c12 failed'
  1000. rm -f _shar_wnt_.tmp
  1001. fi
  1002. # ============= space-c1-2 ==============
  1003. if test -f 'space-c1-2' -a X"$1" != X"-c"; then
  1004.     echo 'x - skipping space-c1-2 (File already exists)'
  1005.     rm -f _shar_wnt_.tmp
  1006. else
  1007. > _shar_wnt_.tmp
  1008. echo 'x - extracting space-c1-2 (Text)'
  1009. sed 's/^X//' << 'SHAR_EOF' > 'space-c1-2' &&
  1010. X/* Async device configuration file for the FAS async driver. */
  1011. X
  1012. X/* This version is for the standard COM1 and COM2 ports.
  1013. X*/
  1014. X/* FAS was developed by
  1015. XUwe Doering             INET : gemini@geminix.in-berlin.de
  1016. XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
  1017. X1000 Berlin 20
  1018. XGermany
  1019. X*/
  1020. X
  1021. X#if !defined (M_I286)
  1022. X#ident    "@(#)space.c    2.08"
  1023. X#endif
  1024. X
  1025. X#if defined (XENIX)
  1026. X#include "fas.h"
  1027. X#else
  1028. X#include <sys/fas.h>
  1029. X#endif
  1030. X
  1031. X/* This is the number of devices to be handled by this driver.
  1032. X   You may define up to 16 devices.  If this number is changed
  1033. X   the arrays below must be filled in accordingly.
  1034. X*/
  1035. X#define NUM_PHYSICAL_UNITS    2
  1036. X
  1037. X#if NUM_PHYSICAL_UNITS > MAX_UNITS
  1038. X#undef NUM_PHYSICAL_UNITS
  1039. X#define NUM_PHYSICAL_UNITS    MAX_UNITS
  1040. X#endif
  1041. X
  1042. X/* let the driver know the number of devices */
  1043. Xuint    fas_physical_units = NUM_PHYSICAL_UNITS;
  1044. X
  1045. X/* array of base port addresses
  1046. X   If you deliberately want to force off the FIFOs of a UART you have
  1047. X   to "or" the NO_FIFO macro to its base port address. This is useful
  1048. X   for mouse devices where you need immediate response to the mouse
  1049. X   movement.
  1050. X*/
  1051. Xulong    fas_port [NUM_PHYSICAL_UNITS] =
  1052. X{
  1053. X    0x3f8,    0x2f8
  1054. X};
  1055. X
  1056. X/* array of interrupt vectors */
  1057. Xuint    fas_vec [NUM_PHYSICAL_UNITS] =
  1058. X{
  1059. X    0x4,    0x3
  1060. X};
  1061. X
  1062. X/* initialization sequence for serial card
  1063. X   This array contains pairs of values of the form:
  1064. X
  1065. X        portaddress, value,
  1066. X              :
  1067. X              :
  1068. X        portaddress, value,
  1069. X        0
  1070. X
  1071. X   For every line `value' will be written to `portaddress'. If
  1072. X   `value' is replaced with the macro `READ_PORT' then a value
  1073. X   is read from `portaddress' instead. The value itself will be
  1074. X   discarded. Therefor this makes only sense if the read access
  1075. X   to the port has a side effect like setting or resetting
  1076. X   certain flags.
  1077. X
  1078. X   NOTE: This array *must* be terminated with a value of 0
  1079. X         in the portaddress column!
  1080. X*/
  1081. Xuint    fas_init_seq [] =
  1082. X{
  1083. X    0
  1084. X};
  1085. X
  1086. X/* initial modem control port info
  1087. X   This value is ored into the modem control value for each UART. This is
  1088. X   normaly used to force out2 which is used to enable the interrupts of
  1089. X   the standard com1 and com2 ports. Several brands of cards have modes
  1090. X   that allow them to work in compatible mode like com1 and com2 or as a
  1091. X   shared interrupts card. One of these cards is the AST 4-port card. When
  1092. X   this card is used in shared interrupts mode out2 must _not_ be set.
  1093. X
  1094. X   Note: This is one of the major trouble-spots with shared interrupts
  1095. X   cards. Check your manual.
  1096. X*/
  1097. Xuint    fas_mcb [NUM_PHYSICAL_UNITS] =
  1098. X{
  1099. X    MC_SET_OUT2,    MC_SET_OUT2
  1100. X};
  1101. X
  1102. X/* array of modem control flags
  1103. X   You can choose which signals to use for modem control. See fas.h
  1104. X   for possible names and values. Whether or not modem control is
  1105. X   used is determined by the minor device number at open time.
  1106. X*/
  1107. Xulong    fas_modem [NUM_PHYSICAL_UNITS] =
  1108. X{
  1109. X    EO_DTR | EI_DTR | CA_DCD,
  1110. X    EO_DTR | EI_DTR | CA_DCD
  1111. X};
  1112. X
  1113. X/* array of hardware flow control flags
  1114. X   You can choose which signals to use for hardware handshake. See fas.h
  1115. X   for possible names and values. Whether or not hardware handshake is
  1116. X   used is determined by the minor device number at open time and by the
  1117. X   RTSFLOW/CTSFLOW termio(7) flags.
  1118. X*/
  1119. Xulong    fas_flow [NUM_PHYSICAL_UNITS] =
  1120. X{
  1121. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  1122. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS
  1123. X};
  1124. X
  1125. X/* array of control register addresses
  1126. X   There are serial boards available that have all serial ports
  1127. X   multiplexed to one address location in order to save I/O address
  1128. X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
  1129. X   by a special register that needs to be written to before the actual
  1130. X   port registers can be accessed. This array contains the addresses
  1131. X   of these special registers.
  1132. X   Enter the addresses on a per unit base. An address of zero
  1133. X   disables this feature.
  1134. X*/
  1135. Xuint    fas_ctl_port [NUM_PHYSICAL_UNITS] =
  1136. X{
  1137. X    0,    0
  1138. X};
  1139. X
  1140. X/* array of control register values
  1141. X   These values are written to the corresponding control register
  1142. X   before the first access to the actual port registers. If not only
  1143. X   entire UART chips (blocks of 8 contiguous addresses) but even the
  1144. X   single registers of the UART chips need to be multiplexed to one
  1145. X   address you have to "or" a bit mask (shifted 8 times to the left)
  1146. X   to the control register value. This mask determines at which bit
  1147. X   locations the UART chip register number is "xored" into the control
  1148. X   register value at runtime. This implies that you can also use
  1149. X   negative logic by setting the bits in the control register value
  1150. X   to 1 at the locations corresponding to the bit mask.
  1151. X*/
  1152. Xuint    fas_ctl_val [NUM_PHYSICAL_UNITS] =
  1153. X{
  1154. X    0,    0
  1155. X};
  1156. X
  1157. X/* additional configurations for shared interrupts boards
  1158. X   If you have a shared interrupts board, you may have to acknowledge
  1159. X   interrupts by writing to a special register. The following arrays
  1160. X   contain the special register addresses and the corresponding values
  1161. X   that are written to them in response to an interrupt.
  1162. X*/
  1163. X
  1164. X/* array of int ack register addresses
  1165. X   These registers are written to every time after all interrupt
  1166. X   sources in all of the UARTs that are tied to the corresponding
  1167. X   interrupt vector have been cleared.
  1168. X   Enter the addresses on a per vector base. An address of zero
  1169. X   disables this feature.
  1170. X*/
  1171. Xuint    fas_int_ack_port [NUM_INT_VECTORS] =
  1172. X{
  1173. X    0,    0,    0,    0,
  1174. X    0,    0,    0,    0,
  1175. X    0,    0,    0,    0,
  1176. X    0,    0,    0,    0,
  1177. X    0,    0,    0,    0,
  1178. X    0,    0,    0,    0,
  1179. X    0,    0,    0,    0,
  1180. X    0,    0,    0,    0
  1181. X};
  1182. X
  1183. X/* array of int ack values
  1184. X   These values are written to the corresponding int ack register
  1185. X   in response to an interrupt.
  1186. X*/
  1187. Xuint    fas_int_ack [NUM_INT_VECTORS] =
  1188. X{
  1189. X    0,    0,    0,    0,
  1190. X    0,    0,    0,    0,
  1191. X    0,    0,    0,    0,
  1192. X    0,    0,    0,    0,
  1193. X    0,    0,    0,    0,
  1194. X    0,    0,    0,    0,
  1195. X    0,    0,    0,    0,
  1196. X    0,    0,    0,    0
  1197. X};
  1198. X
  1199. X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
  1200. X   ============================================
  1201. X*/
  1202. X
  1203. X/* array of structures to hold all info for a physical minor device */
  1204. Xstruct fas_info    fas_info [NUM_PHYSICAL_UNITS];
  1205. X
  1206. X/* array of ttys for logical minor devices */
  1207. Xstruct tty    fas_tty [NUM_PHYSICAL_UNITS * 2];
  1208. X
  1209. X/* array of pointers to fas_info structures
  1210. X   this prevents time consuming multiplications for index calculation
  1211. X*/
  1212. Xstruct fas_info    *fas_info_ptr [NUM_PHYSICAL_UNITS];
  1213. X
  1214. X/* array of pointers to fas_tty structures
  1215. X   this prevents time consuming multiplications for index calculation
  1216. X*/
  1217. Xstruct tty    *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
  1218. SHAR_EOF
  1219. true || echo 'restore of space-c1-2 failed'
  1220. rm -f _shar_wnt_.tmp
  1221. fi
  1222. # ============= space-c1-3 ==============
  1223. if test -f 'space-c1-3' -a X"$1" != X"-c"; then
  1224.     echo 'x - skipping space-c1-3 (File already exists)'
  1225.     rm -f _shar_wnt_.tmp
  1226. else
  1227. > _shar_wnt_.tmp
  1228. echo 'x - extracting space-c1-3 (Text)'
  1229. sed 's/^X//' << 'SHAR_EOF' > 'space-c1-3' &&
  1230. X/* Async device configuration file for the FAS async driver. */
  1231. X
  1232. X/* This version is for the standard COM1 and COM2 and additional COM3
  1233. X   ports.
  1234. X*/
  1235. X/* FAS was developed by
  1236. XUwe Doering             INET : gemini@geminix.in-berlin.de
  1237. XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
  1238. X1000 Berlin 20
  1239. XGermany
  1240. X*/
  1241. X
  1242. X#if !defined (M_I286)
  1243. X#ident    "@(#)space.c    2.08"
  1244. X#endif
  1245. X
  1246. X#if defined (XENIX)
  1247. X#include "fas.h"
  1248. X#else
  1249. X#include <sys/fas.h>
  1250. X#endif
  1251. X
  1252. X/* This is the number of devices to be handled by this driver.
  1253. X   You may define up to 16 devices.  If this number is changed
  1254. X   the arrays below must be filled in accordingly.
  1255. X*/
  1256. X#define NUM_PHYSICAL_UNITS    3
  1257. X
  1258. X#if NUM_PHYSICAL_UNITS > MAX_UNITS
  1259. X#undef NUM_PHYSICAL_UNITS
  1260. X#define NUM_PHYSICAL_UNITS    MAX_UNITS
  1261. X#endif
  1262. X
  1263. X/* let the driver know the number of devices */
  1264. Xuint    fas_physical_units = NUM_PHYSICAL_UNITS;
  1265. X
  1266. X/* array of base port addresses
  1267. X   If you deliberately want to force off the FIFOs of a UART you have
  1268. X   to "or" the NO_FIFO macro to its base port address. This is useful
  1269. X   for mouse devices where you need immediate response to the mouse
  1270. X   movement.
  1271. X*/
  1272. Xulong    fas_port [NUM_PHYSICAL_UNITS] =
  1273. X{
  1274. X    0x3f8,    0x2f8,    0x3e8
  1275. X};
  1276. X
  1277. X/* array of interrupt vectors */
  1278. Xuint    fas_vec [NUM_PHYSICAL_UNITS] =
  1279. X{
  1280. X    0x4,    0x3,    0x9
  1281. X};
  1282. X
  1283. X/* initialization sequence for serial card
  1284. X   This array contains pairs of values of the form:
  1285. X
  1286. X        portaddress, value,
  1287. X              :
  1288. X              :
  1289. X        portaddress, value,
  1290. X        0
  1291. X
  1292. X   For every line `value' will be written to `portaddress'. If
  1293. X   `value' is replaced with the macro `READ_PORT' then a value
  1294. X   is read from `portaddress' instead. The value itself will be
  1295. X   discarded. Therefor this makes only sense if the read access
  1296. X   to the port has a side effect like setting or resetting
  1297. X   certain flags.
  1298. X
  1299. X   NOTE: This array *must* be terminated with a value of 0
  1300. X         in the portaddress column!
  1301. X*/
  1302. Xuint    fas_init_seq [] =
  1303. X{
  1304. X    0
  1305. X};
  1306. X
  1307. X/* initial modem control port info
  1308. X   This value is ored into the modem control value for each UART. This is
  1309. X   normaly used to force out2 which is used to enable the interrupts of
  1310. X   the standard com1 and com2 ports. Several brands of cards have modes
  1311. X   that allow them to work in compatible mode like com1 and com2 or as a
  1312. X   shared interrupts card. One of these cards is the AST 4-port card. When
  1313. X   this card is used in shared interrupts mode out2 must _not_ be set.
  1314. X
  1315. X   Note: This is one of the major trouble-spots with shared interrupts
  1316. X   cards. Check your manual.
  1317. X*/
  1318. Xuint    fas_mcb [NUM_PHYSICAL_UNITS] =
  1319. X{
  1320. X    MC_SET_OUT2,    MC_SET_OUT2,    MC_SET_OUT2
  1321. X};
  1322. X
  1323. X/* array of modem control flags
  1324. X   You can choose which signals to use for modem control. See fas.h
  1325. X   for possible names and values. Whether or not modem control is
  1326. X   used is determined by the minor device number at open time.
  1327. X*/
  1328. Xulong    fas_modem [NUM_PHYSICAL_UNITS] =
  1329. X{
  1330. X    EO_DTR | EI_DTR | CA_DCD,
  1331. X    EO_DTR | EI_DTR | CA_DCD,
  1332. X    EO_DTR | EI_DTR | CA_DCD
  1333. X};
  1334. X
  1335. X/* array of hardware flow control flags
  1336. X   You can choose which signals to use for hardware handshake. See fas.h
  1337. X   for possible names and values. Whether or not hardware handshake is
  1338. X   used is determined by the minor device number at open time and by the
  1339. X   RTSFLOW/CTSFLOW termio(7) flags.
  1340. X*/
  1341. Xulong    fas_flow [NUM_PHYSICAL_UNITS] =
  1342. X{
  1343. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  1344. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS,
  1345. X    HI_RTS | HO_CTS_ON_DSR | HX_RTS
  1346. X};
  1347. X
  1348. X/* array of control register addresses
  1349. X   There are serial boards available that have all serial ports
  1350. X   multiplexed to one address location in order to save I/O address
  1351. X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
  1352. X   by a special register that needs to be written to before the actual
  1353. X   port registers can be accessed. This array contains the addresses
  1354. X   of these special registers.
  1355. X   Enter the addresses on a per unit base. An address of zero
  1356. X   disables this feature.
  1357. X*/
  1358. Xuint    fas_ctl_port [NUM_PHYSICAL_UNITS] =
  1359. X{
  1360. X    0,    0,    0
  1361. X};
  1362. X
  1363. X/* array of control register values
  1364. X   These values are written to the corresponding control register
  1365. X   before the first access to the actual port registers. If not only
  1366. X   entire UART chips (blocks of 8 contiguous addresses) but even the
  1367. X   single registers of the UART chips need to be multiplexed to one
  1368. X   address you have to "or" a bit mask (shifted 8 times to the left)
  1369. X   to the control register value. This mask determines at which bit
  1370. X   locations the UART chip register number is "xored" into the control
  1371. X   register value at runtime. This implies that you can also use
  1372. X   negative logic by setting the bits in the control register value
  1373. X   to 1 at the locations corresponding to the bit mask.
  1374. X*/
  1375. Xuint    fas_ctl_val [NUM_PHYSICAL_UNITS] =
  1376. X{
  1377. X    0,    0,    0
  1378. X};
  1379. X
  1380. X/* additional configurations for shared interrupts boards
  1381. X   If you have a shared interrupts board, you may have to acknowledge
  1382. X   interrupts by writing to a special register. The following arrays
  1383. X   contain the special register addresses and the corresponding values
  1384. X   that are written to them in response to an interrupt.
  1385. X*/
  1386. X
  1387. X/* array of int ack register addresses
  1388. X   These registers are written to every time after all interrupt
  1389. X   sources in all of the UARTs that are tied to the corresponding
  1390. X   interrupt vector have been cleared.
  1391. X   Enter the addresses on a per vector base. An address of zero
  1392. X   disables this feature.
  1393. X*/
  1394. Xuint    fas_int_ack_port [NUM_INT_VECTORS] =
  1395. X{
  1396. X    0,    0,    0,    0,
  1397. X    0,    0,    0,    0,
  1398. X    0,    0,    0,    0,
  1399. X    0,    0,    0,    0,
  1400. X    0,    0,    0,    0,
  1401. X    0,    0,    0,    0,
  1402. X    0,    0,    0,    0,
  1403. X    0,    0,    0,    0
  1404. X};
  1405. X
  1406. X/* array of int ack values
  1407. X   These values are written to the corresponding int ack register
  1408. X   in response to an interrupt.
  1409. X*/
  1410. Xuint    fas_int_ack [NUM_INT_VECTORS] =
  1411. X{
  1412. X    0,    0,    0,    0,
  1413. X    0,    0,    0,    0,
  1414. X    0,    0,    0,    0,
  1415. X    0,    0,    0,    0,
  1416. X    0,    0,    0,    0,
  1417. X    0,    0,    0,    0,
  1418. X    0,    0,    0,    0,
  1419. X    0,    0,    0,    0
  1420. X};
  1421. X
  1422. X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
  1423. X   ============================================
  1424. X*/
  1425. X
  1426. X/* array of structures to hold all info for a physical minor device */
  1427. Xstruct fas_info    fas_info [NUM_PHYSICAL_UNITS];
  1428. X
  1429. X/* array of ttys for logical minor devices */
  1430. Xstruct tty    fas_tty [NUM_PHYSICAL_UNITS * 2];
  1431. X
  1432. X/* array of pointers to fas_info structures
  1433. X   this prevents time consuming multiplications for index calculation
  1434. X*/
  1435. Xstruct fas_info    *fas_info_ptr [NUM_PHYSICAL_UNITS];
  1436. X
  1437. X/* array of pointers to fas_tty structures
  1438. X   this prevents time consuming multiplications for index calculation
  1439. X*/
  1440. Xstruct tty    *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
  1441. SHAR_EOF
  1442. true || echo 'restore of space-c1-3 failed'
  1443. rm -f _shar_wnt_.tmp
  1444. fi
  1445. # ============= space-hub6 ==============
  1446. if test -f 'space-hub6' -a X"$1" != X"-c"; then
  1447.     echo 'x - skipping space-hub6 (File already exists)'
  1448.     rm -f _shar_wnt_.tmp
  1449. else
  1450. > _shar_wnt_.tmp
  1451. echo 'x - extracting space-hub6 (Text)'
  1452. sed 's/^X//' << 'SHAR_EOF' > 'space-hub6' &&
  1453. X/* Async device configuration file for the FAS async driver. */
  1454. X
  1455. X/* This version is for the Bell Tech HUB-6 card.
  1456. X*/
  1457. X/* FAS was developed by
  1458. XUwe Doering             INET : gemini@geminix.in-berlin.de
  1459. XBillstedter Pfad 17 b   UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
  1460. X1000 Berlin 20
  1461. XGermany
  1462. X*/
  1463. X
  1464. X#if !defined (M_I286)
  1465. X#ident    "@(#)space.c    2.08"
  1466. X#endif
  1467. X
  1468. X#if defined (XENIX)
  1469. X#include "fas.h"
  1470. X#else
  1471. X#include <sys/fas.h>
  1472. X#endif
  1473. X
  1474. X/* This is the number of devices to be handled by this driver.
  1475. X   You may define up to 16 devices.  If this number is changed
  1476. X   the arrays below must be filled in accordingly.
  1477. X*/
  1478. X#define NUM_PHYSICAL_UNITS    6
  1479. X
  1480. X#if NUM_PHYSICAL_UNITS > MAX_UNITS
  1481. X#undef NUM_PHYSICAL_UNITS
  1482. X#define NUM_PHYSICAL_UNITS    MAX_UNITS
  1483. X#endif
  1484. X
  1485. X/* let the driver know the number of devices */
  1486. Xuint    fas_physical_units = NUM_PHYSICAL_UNITS;
  1487. X
  1488. X/* array of base port addresses
  1489. X   If you deliberately want to force off the FIFOs of a UART you have
  1490. X   to "or" the NO_FIFO macro to its base port address. This is useful
  1491. X   for mouse devices where you need immediate response to the mouse
  1492. X   movement.
  1493. X*/
  1494. Xulong    fas_port [NUM_PHYSICAL_UNITS] =
  1495. X{
  1496. X    0x303,    0x303,    0x303,    0x303,    0x303,    0x303
  1497. X};
  1498. X
  1499. X/* array of interrupt vectors */
  1500. Xuint    fas_vec [NUM_PHYSICAL_UNITS] =
  1501. X{
  1502. X    0x3,    0x3,    0x3,    0x3,    0x3,    0x3
  1503. X};
  1504. X
  1505. X/* initialization sequence for serial card
  1506. X   This array contains pairs of values of the form:
  1507. X
  1508. X        portaddress, value,
  1509. X              :
  1510. X              :
  1511. X        portaddress, value,
  1512. X        0
  1513. X
  1514. X   For every line `value' will be written to `portaddress'. If
  1515. X   `value' is replaced with the macro `READ_PORT' then a value
  1516. X   is read from `portaddress' instead. The value itself will be
  1517. X   discarded. Therefor this makes only sense if the read access
  1518. X   to the port has a side effect like setting or resetting
  1519. X   certain flags.
  1520. X
  1521. X   NOTE: This array *must* be terminated with a value of 0
  1522. X         in the portaddress column!
  1523. X*/
  1524. Xuint    fas_init_seq [] =
  1525. X{
  1526. X    0
  1527. X};
  1528. X
  1529. X/* initial modem control port info
  1530. X   This value is ored into the modem control value for each UART. This is
  1531. X   normaly used to force out2 which is used to enable the interrupts of
  1532. X   the standard com1 and com2 ports. Several brands of cards have modes
  1533. X   that allow them to work in compatible mode like com1 and com2 or as a
  1534. X   shared interrupts card. One of these cards is the AST 4-port card. When
  1535. X   this card is used in shared interrupts mode out2 must _not_ be set.
  1536. X
  1537. X   Note: This is one of the major trouble-spots with shared interrupts
  1538. X   cards. Check your manual.
  1539. X*/
  1540. Xuint    fas_mcb [NUM_PHYSICAL_UNITS] =
  1541. X{
  1542. X    0,    0,    0,    0,    0,    0
  1543. X};
  1544. X
  1545. X/* array of modem control flags
  1546. X   You can choose which signals to use for modem control. See fas.h
  1547. X   for possible names and values. Whether or not modem control is
  1548. X   used is determined by the minor device number at open time.
  1549. X*/
  1550. Xulong    fas_modem [NUM_PHYSICAL_UNITS] =
  1551. X{
  1552. X    EO_DTR | EI_DTR | CA_DCD,
  1553. X    EO_DTR | EI_DTR | CA_DCD,
  1554. X    EO_DTR | EI_DTR | CA_DCD,
  1555. X    EO_DTR | EI_DTR | CA_DCD,
  1556. X    EO_DTR | EI_DTR | CA_DCD,
  1557. X    EO_DTR | EI_DTR | CA_DCD
  1558. X};
  1559. X
  1560. X/* array of hardware flow control flags
  1561. X   You can choose which signals to use for hardware handshake. See fas.h
  1562. X   for possible names and values. Whether or not hardware handshake is
  1563. X   used is determined by the minor device number at open time and by the
  1564. X   RTSFLOW/CTSFLOW termio(7) flags.
  1565. X*/
  1566. Xulong    fas_flow [NUM_PHYSICAL_UNITS] =
  1567. X{
  1568. X    HI_RTS | HO_CTS | HX_RTS,
  1569. X    HI_RTS | HO_CTS | HX_RTS,
  1570. X    HI_RTS | HO_CTS | HX_RTS,
  1571. X    HI_RTS | HO_CTS | HX_RTS,
  1572. X    HI_RTS | HO_CTS | HX_RTS,
  1573. X    HI_RTS | HO_CTS | HX_RTS
  1574. X};
  1575. X
  1576. X/* array of control register addresses
  1577. X   There are serial boards available that have all serial ports
  1578. X   multiplexed to one address location in order to save I/O address
  1579. X   space (Bell Tech HUB-6 card etc.). This multiplexing is controlled
  1580. X   by a special register that needs to be written to before the actual
  1581. X   port registers can be accessed. This array contains the addresses
  1582. X   of these special registers.
  1583. X   Enter the addresses on a per unit base. An address of zero
  1584. X   disables this feature.
  1585. X*/
  1586. Xuint    fas_ctl_port [NUM_PHYSICAL_UNITS] =
  1587. X{
  1588. X    0x302,    0x302,    0x302,    0x302,    0x302,    0x302
  1589. X};
  1590. X
  1591. X/* array of control register values
  1592. X   These values are written to the corresponding control register
  1593. X   before the first access to the actual port registers. If not only
  1594. X   entire UART chips (blocks of 8 contiguous addresses) but even the
  1595. X   single registers of the UART chips need to be multiplexed to one
  1596. X   address you have to "or" a bit mask (shifted 8 times to the left)
  1597. X   to the control register value. This mask determines at which bit
  1598. X   locations the UART chip register number is "xored" into the control
  1599. X   register value at runtime. This implies that you can also use
  1600. X   negative logic by setting the bits in the control register value
  1601. X   to 1 at the locations corresponding to the bit mask.
  1602. X*/
  1603. Xuint    fas_ctl_val [NUM_PHYSICAL_UNITS] =
  1604. X{
  1605. X    0x700,    0x708,    0x710,    0x718,    0x720,    0x728
  1606. X};
  1607. X
  1608. X/* additional configurations for shared interrupts boards
  1609. X   If you have a shared interrupts board, you may have to acknowledge
  1610. X   interrupts by writing to a special register. The following arrays
  1611. X   contain the special register addresses and the corresponding values
  1612. X   that are written to them in response to an interrupt.
  1613. X*/
  1614. X
  1615. X/* array of int ack register addresses
  1616. X   These registers are written to every time after all interrupt
  1617. X   sources in all of the UARTs that are tied to the corresponding
  1618. X   interrupt vector have been cleared.
  1619. X   Enter the addresses on a per vector base. An address of zero
  1620. X   disables this feature.
  1621. X*/
  1622. Xuint    fas_int_ack_port [NUM_INT_VECTORS] =
  1623. X{
  1624. X    0,    0,    0,    0,
  1625. X    0,    0,    0,    0,
  1626. X    0,    0,    0,    0,
  1627. X    0,    0,    0,    0,
  1628. X    0,    0,    0,    0,
  1629. X    0,    0,    0,    0,
  1630. X    0,    0,    0,    0,
  1631. X    0,    0,    0,    0
  1632. X};
  1633. X
  1634. X/* array of int ack values
  1635. X   These values are written to the corresponding int ack register
  1636. X   in response to an interrupt.
  1637. X*/
  1638. Xuint    fas_int_ack [NUM_INT_VECTORS] =
  1639. X{
  1640. X    0,    0,    0,    0,
  1641. X    0,    0,    0,    0,
  1642. X    0,    0,    0,    0,
  1643. X    0,    0,    0,    0,
  1644. X    0,    0,    0,    0,
  1645. X    0,    0,    0,    0,
  1646. X    0,    0,    0,    0,
  1647. X    0,    0,    0,    0
  1648. X};
  1649. X
  1650. X/* NOTHING NEEDS TO BE CHANGED BELOW THIS LINE.
  1651. X   ============================================
  1652. X*/
  1653. X
  1654. X/* array of structures to hold all info for a physical minor device */
  1655. Xstruct fas_info    fas_info [NUM_PHYSICAL_UNITS];
  1656. X
  1657. X/* array of ttys for logical minor devices */
  1658. Xstruct tty    fas_tty [NUM_PHYSICAL_UNITS * 2];
  1659. X
  1660. X/* array of pointers to fas_info structures
  1661. X   this prevents time consuming multiplications for index calculation
  1662. X*/
  1663. Xstruct fas_info    *fas_info_ptr [NUM_PHYSICAL_UNITS];
  1664. X
  1665. X/* array of pointers to fas_tty structures
  1666. X   this prevents time consuming multiplications for index calculation
  1667. X*/
  1668. Xstruct tty    *fas_tty_ptr [NUM_PHYSICAL_UNITS * 2];
  1669. SHAR_EOF
  1670. true || echo 'restore of space-hub6 failed'
  1671. rm -f _shar_wnt_.tmp
  1672. fi
  1673. # ============= update_desc ==============
  1674. if test -f 'update_desc' -a X"$1" != X"-c"; then
  1675.     echo 'x - skipping update_desc (File already exists)'
  1676.     rm -f _shar_wnt_.tmp
  1677. else
  1678. > _shar_wnt_.tmp
  1679. echo 'x - extracting update_desc (Text)'
  1680. sed 's/^X//' << 'SHAR_EOF' > 'update_desc' &&
  1681. X# Update the kernel description file
  1682. X
  1683. Xgrep '^fas[     ]' $1 > /dev/null 2>&1
  1684. Xif [ $? -eq 1 ]
  1685. Xthen
  1686. X    echo 'fas     -    -     io     -             FAS Serial I/O Driver' >> $1
  1687. Xfi
  1688. SHAR_EOF
  1689. true || echo 'restore of update_desc failed'
  1690. rm -f _shar_wnt_.tmp
  1691. fi
  1692. rm -f _shar_seq_.tmp
  1693. echo You have unpacked the last part
  1694. exit 0
  1695. -- 
  1696. Uwe Doering  |  INET : gemini@geminix.in-berlin.de
  1697. Berlin       |----------------------------------------------------------------
  1698. Germany      |  UUCP : ...!unido!fub!geminix.in-berlin.de!gemini
  1699.