|
|
1.1 root 1: /* (-lgl
2: * COHERENT 386 Device Driver Kit release 2.0
3: * Copyright (c) 1982, 1992 by Mark Williams Company.
4: * All rights reserved. May not be copied without permission.
5: -lgl) */
6: /*
7: * poll_clk.h - include file for drivers using altclk_in()/altclk_out()
8: */
9:
10: #ifndef __SYS_POLL_CLK_H__
11: #define __SYS_POLL_CLK_H__
12:
13: #include <sys/silo.h>
14: /*
15: * bit fields in com_usage[0..3]
16: * in_use is incremented each time open is attempted, and decremented
17: * when the open fails or the corresponding close completes
18: * irq is true when the port is in use (open or hanging) with interrupts
19: * has_irq is true when the irq vector for the port is usable;
20: * it is not ok to enable interrupts until this goes true!
21: * poll is true when the port is open for polling
22: * hcls is true while the port is doing last close
23: * ohlt is true while CTS flow control halts output
24: */
25: typedef struct {
26: short uart_type; /* see US_* in ins8250.h */
27: short in_use;
28: int irq:1;
29: int has_irq:1;
30: int poll:1;
31: int hcls:1;
32: int ohlt:1;
33: silo_t raw_in;
34: silo_t raw_out;
35: } com_usage_t;
36:
37: /* bits in poll_owner - at most one will be set at a time */
38: #define POLL_AL 1
39: #define POLL_HS 2
40: #define POLL_ASY 4
41:
42: /*
43: * The following variables are defined in support.c
44: *
45: * "poll_rate" is the polling rate in HZ, 0 if no polling being done
46: * "poll_owner" is a bit array so only one driver at a time can
47: * use an alternate clock routine
48: * "com_usage" is used only by al0/al1 drivers
49: */
50: extern com_usage_t com_usage[]; /* COM_UNUSED/COM_IRQ/COM_POLLED */
51: extern int poll_rate; /* used by "prate" command */
52: extern int poll_owner; /* checked during *open() of port */
53: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.