[buildroot] disable sstrip when using musl
[openwrt/svn-archive/archive.git] / target / linux / ubicom32 / files / arch / ubicom32 / include / asm / termbits.h
1 /*
2 * arch/ubicom32/include/asm/termbits.h
3 * Terminal/serial port definitions for Ubicom32 architecture.
4 *
5 * (C) Copyright 2009, Ubicom, Inc.
6 *
7 * This file is part of the Ubicom32 Linux Kernel Port.
8 *
9 * The Ubicom32 Linux Kernel Port is free software: you can redistribute
10 * it and/or modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation, either version 2 of the
12 * License, or (at your option) any later version.
13 *
14 * The Ubicom32 Linux Kernel Port is distributed in the hope that it
15 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
16 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
17 * the GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with the Ubicom32 Linux Kernel Port. If not,
21 * see <http://www.gnu.org/licenses/>.
22 *
23 * Ubicom32 implementation derived from (with many thanks):
24 * arch/m68knommu
25 * arch/blackfin
26 * arch/parisc
27 */
28 #ifndef _ASM_UBICOM32_TERMBITS_H
29 #define _ASM_UBICOM32_TERMBITS_H
30
31 #include <linux/posix_types.h>
32
33 typedef unsigned char cc_t;
34 typedef unsigned int speed_t;
35 typedef unsigned int tcflag_t;
36
37 #define NCCS 19
38 struct termios {
39 tcflag_t c_iflag; /* input mode flags */
40 tcflag_t c_oflag; /* output mode flags */
41 tcflag_t c_cflag; /* control mode flags */
42 tcflag_t c_lflag; /* local mode flags */
43 cc_t c_line; /* line discipline */
44 cc_t c_cc[NCCS]; /* control characters */
45 };
46
47 struct termios2 {
48 tcflag_t c_iflag; /* input mode flags */
49 tcflag_t c_oflag; /* output mode flags */
50 tcflag_t c_cflag; /* control mode flags */
51 tcflag_t c_lflag; /* local mode flags */
52 cc_t c_line; /* line discipline */
53 cc_t c_cc[NCCS]; /* control characters */
54 speed_t c_ispeed; /* input speed */
55 speed_t c_ospeed; /* output speed */
56 };
57
58 struct ktermios {
59 tcflag_t c_iflag; /* input mode flags */
60 tcflag_t c_oflag; /* output mode flags */
61 tcflag_t c_cflag; /* control mode flags */
62 tcflag_t c_lflag; /* local mode flags */
63 cc_t c_line; /* line discipline */
64 cc_t c_cc[NCCS]; /* control characters */
65 speed_t c_ispeed; /* input speed */
66 speed_t c_ospeed; /* output speed */
67 };
68
69 /* c_cc characters */
70 #define VINTR 0
71 #define VQUIT 1
72 #define VERASE 2
73 #define VKILL 3
74 #define VEOF 4
75 #define VTIME 5
76 #define VMIN 6
77 #define VSWTC 7
78 #define VSTART 8
79 #define VSTOP 9
80 #define VSUSP 10
81 #define VEOL 11
82 #define VREPRINT 12
83 #define VDISCARD 13
84 #define VWERASE 14
85 #define VLNEXT 15
86 #define VEOL2 16
87
88
89 /* c_iflag bits */
90 #define IGNBRK 0000001
91 #define BRKINT 0000002
92 #define IGNPAR 0000004
93 #define PARMRK 0000010
94 #define INPCK 0000020
95 #define ISTRIP 0000040
96 #define INLCR 0000100
97 #define IGNCR 0000200
98 #define ICRNL 0000400
99 #define IUCLC 0001000
100 #define IXON 0002000
101 #define IXANY 0004000
102 #define IXOFF 0010000
103 #define IMAXBEL 0020000
104 #define IUTF8 0040000
105
106 /* c_oflag bits */
107 #define OPOST 0000001
108 #define OLCUC 0000002
109 #define ONLCR 0000004
110 #define OCRNL 0000010
111 #define ONOCR 0000020
112 #define ONLRET 0000040
113 #define OFILL 0000100
114 #define OFDEL 0000200
115 #define NLDLY 0000400
116 #define NL0 0000000
117 #define NL1 0000400
118 #define CRDLY 0003000
119 #define CR0 0000000
120 #define CR1 0001000
121 #define CR2 0002000
122 #define CR3 0003000
123 #define TABDLY 0014000
124 #define TAB0 0000000
125 #define TAB1 0004000
126 #define TAB2 0010000
127 #define TAB3 0014000
128 #define XTABS 0014000
129 #define BSDLY 0020000
130 #define BS0 0000000
131 #define BS1 0020000
132 #define VTDLY 0040000
133 #define VT0 0000000
134 #define VT1 0040000
135 #define FFDLY 0100000
136 #define FF0 0000000
137 #define FF1 0100000
138
139 /* c_cflag bit meaning */
140 #define CBAUD 0010017
141 #define B0 0000000 /* hang up */
142 #define B50 0000001
143 #define B75 0000002
144 #define B110 0000003
145 #define B134 0000004
146 #define B150 0000005
147 #define B200 0000006
148 #define B300 0000007
149 #define B600 0000010
150 #define B1200 0000011
151 #define B1800 0000012
152 #define B2400 0000013
153 #define B4800 0000014
154 #define B9600 0000015
155 #define B19200 0000016
156 #define B38400 0000017
157 #define EXTA B19200
158 #define EXTB B38400
159 #define CSIZE 0000060
160 #define CS5 0000000
161 #define CS6 0000020
162 #define CS7 0000040
163 #define CS8 0000060
164 #define CSTOPB 0000100
165 #define CREAD 0000200
166 #define PARENB 0000400
167 #define PARODD 0001000
168 #define HUPCL 0002000
169 #define CLOCAL 0004000
170 #define CBAUDEX 0010000
171 #define BOTHER 0010000
172 #define B57600 0010001
173 #define B115200 0010002
174 #define B230400 0010003
175 #define B460800 0010004
176 #define B500000 0010005
177 #define B576000 0010006
178 #define B921600 0010007
179 #define B1000000 0010010
180 #define B1152000 0010011
181 #define B1500000 0010012
182 #define B2000000 0010013
183 #define B2500000 0010014
184 #define B3000000 0010015
185 #define B3500000 0010016
186 #define B4000000 0010017
187 #define CIBAUD 002003600000 /* input baud rate */
188 #define CMSPAR 010000000000 /* mark or space (stick) parity */
189 #define CRTSCTS 020000000000 /* flow control */
190
191 #define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */
192
193 /* c_lflag bits */
194 #define ISIG 0000001
195 #define ICANON 0000002
196 #define XCASE 0000004
197 #define ECHO 0000010
198 #define ECHOE 0000020
199 #define ECHOK 0000040
200 #define ECHONL 0000100
201 #define NOFLSH 0000200
202 #define TOSTOP 0000400
203 #define ECHOCTL 0001000
204 #define ECHOPRT 0002000
205 #define ECHOKE 0004000
206 #define FLUSHO 0010000
207 #define PENDIN 0040000
208 #define IEXTEN 0100000
209
210
211 /* tcflow() and TCXONC use these */
212 #define TCOOFF 0
213 #define TCOON 1
214 #define TCIOFF 2
215 #define TCION 3
216
217 /* tcflush() and TCFLSH use these */
218 #define TCIFLUSH 0
219 #define TCOFLUSH 1
220 #define TCIOFLUSH 2
221
222 /* tcsetattr uses these */
223 #define TCSANOW 0
224 #define TCSADRAIN 1
225 #define TCSAFLUSH 2
226
227 #endif /* _ASM_UBICOM32_TERMBITS_H */