[PATCH] spinlock consolidation
[pandora-kernel.git] / include / asm-cris / termbits.h
1 /* $Id: termbits.h,v 1.1 2000/07/10 16:32:31 bjornw Exp $ */
2
3 #ifndef __ARCH_ETRAX100_TERMBITS_H__
4 #define __ARCH_ETRAX100_TERMBITS_H__
5
6 #include <linux/posix_types.h>
7
8 typedef unsigned char   cc_t;
9 typedef unsigned int    speed_t;
10 typedef unsigned int    tcflag_t;
11
12 #define NCCS 19
13 struct termios {
14         tcflag_t c_iflag;               /* input mode flags */
15         tcflag_t c_oflag;               /* output mode flags */
16         tcflag_t c_cflag;               /* control mode flags */
17         tcflag_t c_lflag;               /* local mode flags */
18         cc_t c_line;                    /* line discipline */
19         cc_t c_cc[NCCS];                /* control characters */
20 };
21
22 /* c_cc characters */
23 #define VINTR 0
24 #define VQUIT 1
25 #define VERASE 2
26 #define VKILL 3
27 #define VEOF 4
28 #define VTIME 5
29 #define VMIN 6
30 #define VSWTC 7
31 #define VSTART 8
32 #define VSTOP 9
33 #define VSUSP 10
34 #define VEOL 11
35 #define VREPRINT 12
36 #define VDISCARD 13
37 #define VWERASE 14
38 #define VLNEXT 15
39 #define VEOL2 16
40
41 /* c_iflag bits */
42 #define IGNBRK  0000001
43 #define BRKINT  0000002
44 #define IGNPAR  0000004
45 #define PARMRK  0000010
46 #define INPCK   0000020
47 #define ISTRIP  0000040
48 #define INLCR   0000100
49 #define IGNCR   0000200
50 #define ICRNL   0000400
51 #define IUCLC   0001000
52 #define IXON    0002000
53 #define IXANY   0004000
54 #define IXOFF   0010000
55 #define IMAXBEL 0020000
56 #define IUTF8   0040000
57
58 /* c_oflag bits */
59 #define OPOST   0000001
60 #define OLCUC   0000002
61 #define ONLCR   0000004
62 #define OCRNL   0000010
63 #define ONOCR   0000020
64 #define ONLRET  0000040
65 #define OFILL   0000100
66 #define OFDEL   0000200
67 #define NLDLY   0000400
68 #define   NL0   0000000
69 #define   NL1   0000400
70 #define CRDLY   0003000
71 #define   CR0   0000000
72 #define   CR1   0001000
73 #define   CR2   0002000
74 #define   CR3   0003000
75 #define TABDLY  0014000
76 #define   TAB0  0000000
77 #define   TAB1  0004000
78 #define   TAB2  0010000
79 #define   TAB3  0014000
80 #define   XTABS 0014000
81 #define BSDLY   0020000
82 #define   BS0   0000000
83 #define   BS1   0020000
84 #define VTDLY   0040000
85 #define   VT0   0000000
86 #define   VT1   0040000
87 #define FFDLY   0100000
88 #define   FF0   0000000
89 #define   FF1   0100000
90
91 /* c_cflag bit meaning */
92 /*
93  *     3             2            1
94  *    10 987 654 321 098 765 432 109 876 543 210
95  *                             |           | ||| CBAUD
96  *                                         obaud    
97  *
98  *                                       ||CSIZE
99  *
100  *                                     |CSTOP
101  *                                    |CREAD
102  *                                   |CPARENB
103  *
104  *                                 |CPARODD 
105  *                                |HUPCL
106  *                               |CLOCAL
107  *                             |CBAUDEX
108  *    10 987 654 321 098 765 432 109 876 543 210
109  *        |           || ||   CIBAUD, IBSHIFT=16
110  *                    ibaud
111  *     |CMSPAR
112  *    | CRTSCTS
113  *       x x xxx xxx x     x xx Free bits
114  */
115
116 #define CBAUD   0010017
117 #define  B0     0000000         /* hang up */
118 #define  B50    0000001
119 #define  B75    0000002
120 #define  B110   0000003
121 #define  B134   0000004
122 #define  B150   0000005
123 #define  B200   0000006
124 #define  B300   0000007
125 #define  B600   0000010
126 #define  B1200  0000011
127 #define  B1800  0000012
128 #define  B2400  0000013
129 #define  B4800  0000014
130 #define  B9600  0000015
131 #define  B19200 0000016
132 #define  B38400 0000017
133 #define EXTA B19200
134 #define EXTB B38400
135 #define CSIZE   0000060
136 #define   CS5   0000000
137 #define   CS6   0000020
138 #define   CS7   0000040
139 #define   CS8   0000060
140 #define CSTOPB  0000100
141 #define CREAD   0000200
142 #define PARENB  0000400
143 #define PARODD  0001000
144 #define HUPCL   0002000
145 #define CLOCAL  0004000
146 #define CBAUDEX 0010000
147 #define  B57600  0010001
148 #define  B115200 0010002
149 #define  B230400 0010003
150 #define  B460800 0010004
151 /* etrax supports these additional three baud rates */
152 #define  B921600   0010005
153 #define  B1843200  0010006
154 #define  B6250000  0010007
155 /* ETRAX FS supports this as well */
156 #define  B12500000 0010010
157 #define CIBAUD    002003600000  /* input baud rate (used in v32) */
158 /* The values for CIBAUD bits are the same as the values for CBAUD and CBAUDEX
159  * shifted left IBSHIFT bits.
160  */
161 #define IBSHIFT   16
162 #define CMSPAR    010000000000 /* mark or space (stick) parity - PARODD=space*/
163 #define CRTSCTS   020000000000          /* flow control */
164
165 /* c_lflag bits */
166 #define ISIG    0000001
167 #define ICANON  0000002
168 #define XCASE   0000004
169 #define ECHO    0000010
170 #define ECHOE   0000020
171 #define ECHOK   0000040
172 #define ECHONL  0000100
173 #define NOFLSH  0000200
174 #define TOSTOP  0000400
175 #define ECHOCTL 0001000
176 #define ECHOPRT 0002000
177 #define ECHOKE  0004000
178 #define FLUSHO  0010000
179 #define PENDIN  0040000
180 #define IEXTEN  0100000
181
182 /* tcflow() and TCXONC use these */
183 #define TCOOFF          0
184 #define TCOON           1
185 #define TCIOFF          2
186 #define TCION           3
187
188 /* tcflush() and TCFLSH use these */
189 #define TCIFLUSH        0
190 #define TCOFLUSH        1
191 #define TCIOFLUSH       2
192
193 /* tcsetattr uses these */
194 #define TCSANOW         0
195 #define TCSADRAIN       1
196 #define TCSAFLUSH       2
197
198 #endif