|
|
1.1 root 1: /* (-lgl
2: * COHERENT Driver Kit Version 1.1.0
3: * Copyright (c) 1982, 1990 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: * $Log: poll_clk.h,v $
10: * Revision 1.1 92/07/31 16:07:22 root
11: * Initial revision
12: *
13: * Revision 1.4 91/12/10 07:57:01 hal
14: * Add uart_type and has_irq usage fields.
15: * Change in_use from boolean (:1) to short.
16: *
17: * Revision 1.3 91/11/14 14:11:13 hal
18: * Re-entrancy fix. Make com_usage bit field.
19: *
20: * Revision 1.2 91/06/04 14:36:10 hal
21: * Imports are from support.c.
22: *
23: * Revision 1.1 91/06/04 14:34:49 hal
24: * Initial version - imported from tty.c.
25: *
26: */
27:
28: #ifndef POLL_CLK_H
29: #define POLL_CLK_H
30:
31: #include <sys/silo.h>
32: /*
33: * bit fields in com_usage[0..3]
34: * in_use is incremented each time open is attempted, and decremented
35: * when the open fails or the corresponding close completes
36: * irq is true when the port is in use (open or hanging) with interrupts
37: * has_irq is true when the irq vector for the port is usable;
38: * it is not ok to enable interrupts until this goes true!
39: * poll is true when the port is open for polling
40: * hcls is true while the port is doing last close
41: * ohlt is true while CTS flow control halts output
42: */
43: typedef struct {
44: short uart_type; /* see US_* in ins8250.h */
45: short in_use;
46: int irq:1;
47: int has_irq:1;
48: int poll:1;
49: int hcls:1;
50: int ohlt:1;
51: silo_t raw_in;
52: silo_t raw_out;
53: } com_usage_t;
54:
55: /* bits in poll_owner - at most one will be set at a time */
56: #define POLL_AL 1
57: #define POLL_HS 2
58: #define POLL_ASY 4
59:
60: /*
61: * The following variables are defined in support.c
62: *
63: * "poll_rate" is the polling rate in HZ, 0 if no polling being done
64: * "poll_owner" is a bit array so only one driver at a time can
65: * use an alternate clock routine
66: * "com_usage" is used only by al0/al1 drivers
67: */
68: extern com_usage_t com_usage[]; /* COM_UNUSED/COM_IRQ/COM_POLLED */
69: extern int poll_rate; /* used by "prate" command */
70: extern int poll_owner; /* checked during *open() of port */
71: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.