aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hayesesp.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/hayesesp.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/linux/hayesesp.h')
-rw-r--r--include/linux/hayesesp.h124
1 files changed, 124 insertions, 0 deletions
diff --git a/include/linux/hayesesp.h b/include/linux/hayesesp.h
new file mode 100644
index 000000000000..b436be7a7fff
--- /dev/null
+++ b/include/linux/hayesesp.h
@@ -0,0 +1,124 @@
1#ifndef HAYESESP_H
2#define HAYESESP_H
3
4struct hayes_esp_config {
5 short flow_on;
6 short flow_off;
7 short rx_trigger;
8 short tx_trigger;
9 short pio_threshold;
10 unsigned char rx_timeout;
11 char dma_channel;
12};
13
14#ifdef __KERNEL__
15
16#define ESP_DMA_CHANNEL 0
17#define ESP_RX_TRIGGER 768
18#define ESP_TX_TRIGGER 768
19#define ESP_FLOW_OFF 1016
20#define ESP_FLOW_ON 944
21#define ESP_RX_TMOUT 128
22#define ESP_PIO_THRESHOLD 32
23
24#define ESP_IN_MAJOR 57 /* major dev # for dial in */
25#define ESP_OUT_MAJOR 58 /* major dev # for dial out */
26#define ESPC_SCALE 3
27#define UART_ESI_BASE 0x00
28#define UART_ESI_SID 0x01
29#define UART_ESI_RX 0x02
30#define UART_ESI_TX 0x02
31#define UART_ESI_CMD1 0x04
32#define UART_ESI_CMD2 0x05
33#define UART_ESI_STAT1 0x04
34#define UART_ESI_STAT2 0x05
35#define UART_ESI_RWS 0x07
36
37#define UART_IER_DMA_TMOUT 0x80
38#define UART_IER_DMA_TC 0x08
39
40#define ESI_SET_IRQ 0x04
41#define ESI_SET_DMA_TMOUT 0x05
42#define ESI_SET_SRV_MASK 0x06
43#define ESI_SET_ERR_MASK 0x07
44#define ESI_SET_FLOW_CNTL 0x08
45#define ESI_SET_FLOW_CHARS 0x09
46#define ESI_SET_FLOW_LVL 0x0a
47#define ESI_SET_TRIGGER 0x0b
48#define ESI_SET_RX_TIMEOUT 0x0c
49#define ESI_SET_FLOW_TMOUT 0x0d
50#define ESI_WRITE_UART 0x0e
51#define ESI_READ_UART 0x0f
52#define ESI_SET_MODE 0x10
53#define ESI_GET_ERR_STAT 0x12
54#define ESI_GET_UART_STAT 0x13
55#define ESI_GET_RX_AVAIL 0x14
56#define ESI_GET_TX_AVAIL 0x15
57#define ESI_START_DMA_RX 0x16
58#define ESI_START_DMA_TX 0x17
59#define ESI_ISSUE_BREAK 0x1a
60#define ESI_FLUSH_RX 0x1b
61#define ESI_FLUSH_TX 0x1c
62#define ESI_SET_BAUD 0x1d
63#define ESI_SET_ENH_IRQ 0x1f
64#define ESI_SET_REINTR 0x20
65#define ESI_SET_PRESCALAR 0x23
66#define ESI_NO_COMMAND 0xff
67
68#define ESP_STAT_RX_TIMEOUT 0x01
69#define ESP_STAT_DMA_RX 0x02
70#define ESP_STAT_DMA_TX 0x04
71#define ESP_STAT_NEVER_DMA 0x08
72#define ESP_STAT_USE_PIO 0x10
73
74#define ESP_EVENT_WRITE_WAKEUP 0
75#define ESP_MAGIC 0x53ee
76#define ESP_XMIT_SIZE 4096
77
78struct esp_struct {
79 int magic;
80 spinlock_t lock;
81 int port;
82 int irq;
83 int flags; /* defined in tty.h */
84 struct tty_struct *tty;
85 int read_status_mask;
86 int ignore_status_mask;
87 int timeout;
88 int stat_flags;
89 int custom_divisor;
90 int close_delay;
91 unsigned short closing_wait;
92 unsigned short closing_wait2;
93 int IER; /* Interrupt Enable Register */
94 int MCR; /* Modem control register */
95 unsigned long event;
96 unsigned long last_active;
97 int line;
98 int count; /* # of fd on device */
99 int blocked_open; /* # of blocked opens */
100 unsigned char *xmit_buf;
101 int xmit_head;
102 int xmit_tail;
103 int xmit_cnt;
104 struct work_struct tqueue;
105 struct work_struct tqueue_hangup;
106 wait_queue_head_t open_wait;
107 wait_queue_head_t close_wait;
108 wait_queue_head_t delta_msr_wait;
109 wait_queue_head_t break_wait;
110 struct async_icount icount; /* kernel counters for the 4 input interrupts */
111 struct hayes_esp_config config; /* port configuration */
112 struct esp_struct *next_port; /* For the linked list */
113};
114
115struct esp_pio_buffer {
116 unsigned char data[1024];
117 struct esp_pio_buffer *next;
118};
119
120#endif /* __KERNEL__ */
121
122
123#endif /* ESP_H */
124