xref: /openbmc/qemu/linux-user/cris/termbits.h (revision e4c4f7db)
1e69b4065Sths /* from asm/termbits.h */
2e69b4065Sths 
3f91005e1SMarkus Armbruster #ifndef LINUX_USER_CRIS_TERMBITS_H
4f91005e1SMarkus Armbruster #define LINUX_USER_CRIS_TERMBITS_H
5f91005e1SMarkus Armbruster 
6e69b4065Sths #define TARGET_NCCS 19
7e69b4065Sths 
8*c218b4edSFilip Bozuta typedef unsigned char   target_cc_t;        /* cc_t */
9*c218b4edSFilip Bozuta typedef unsigned int    target_speed_t;     /* speed_t */
10*c218b4edSFilip Bozuta typedef unsigned int    target_tcflag_t;    /* tcflag_t */
11*c218b4edSFilip Bozuta 
12e69b4065Sths struct target_termios {
13*c218b4edSFilip Bozuta     target_tcflag_t c_iflag;               /* input mode flags */
14*c218b4edSFilip Bozuta     target_tcflag_t c_oflag;               /* output mode flags */
15*c218b4edSFilip Bozuta     target_tcflag_t c_cflag;               /* control mode flags */
16*c218b4edSFilip Bozuta     target_tcflag_t c_lflag;               /* local mode flags */
17*c218b4edSFilip Bozuta     target_cc_t c_line;                    /* line discipline */
18*c218b4edSFilip Bozuta     target_cc_t c_cc[TARGET_NCCS];         /* control characters */
19e69b4065Sths };
20e69b4065Sths 
21e69b4065Sths /* c_iflag bits */
22e69b4065Sths #define TARGET_IGNBRK  0000001
23e69b4065Sths #define TARGET_BRKINT  0000002
24e69b4065Sths #define TARGET_IGNPAR  0000004
25e69b4065Sths #define TARGET_PARMRK  0000010
26e69b4065Sths #define TARGET_INPCK   0000020
27e69b4065Sths #define TARGET_ISTRIP  0000040
28e69b4065Sths #define TARGET_INLCR   0000100
29e69b4065Sths #define TARGET_IGNCR   0000200
30e69b4065Sths #define TARGET_ICRNL   0000400
31e69b4065Sths #define TARGET_IUCLC   0001000
32e69b4065Sths #define TARGET_IXON    0002000
33e69b4065Sths #define TARGET_IXANY   0004000
34e69b4065Sths #define TARGET_IXOFF   0010000
35e69b4065Sths #define TARGET_IMAXBEL 0020000
36*c218b4edSFilip Bozuta #define TARGET_IUTF8   0040000
37e69b4065Sths 
38e69b4065Sths /* c_oflag bits */
39e69b4065Sths #define TARGET_OPOST   0000001
40e69b4065Sths #define TARGET_OLCUC   0000002
41e69b4065Sths #define TARGET_ONLCR   0000004
42e69b4065Sths #define TARGET_OCRNL   0000010
43e69b4065Sths #define TARGET_ONOCR   0000020
44e69b4065Sths #define TARGET_ONLRET  0000040
45e69b4065Sths #define TARGET_OFILL   0000100
46e69b4065Sths #define TARGET_OFDEL   0000200
47e69b4065Sths #define TARGET_NLDLY   0000400
48e69b4065Sths #define   TARGET_NL0   0000000
49e69b4065Sths #define   TARGET_NL1   0000400
50e69b4065Sths #define TARGET_CRDLY   0003000
51e69b4065Sths #define   TARGET_CR0   0000000
52e69b4065Sths #define   TARGET_CR1   0001000
53e69b4065Sths #define   TARGET_CR2   0002000
54e69b4065Sths #define   TARGET_CR3   0003000
55e69b4065Sths #define TARGET_TABDLY  0014000
56e69b4065Sths #define   TARGET_TAB0  0000000
57e69b4065Sths #define   TARGET_TAB1  0004000
58e69b4065Sths #define   TARGET_TAB2  0010000
59e69b4065Sths #define   TARGET_TAB3  0014000
60e69b4065Sths #define   TARGET_XTABS 0014000
61e69b4065Sths #define TARGET_BSDLY   0020000
62e69b4065Sths #define   TARGET_BS0   0000000
63e69b4065Sths #define   TARGET_BS1   0020000
64e69b4065Sths #define TARGET_VTDLY   0040000
65e69b4065Sths #define   TARGET_VT0   0000000
66e69b4065Sths #define   TARGET_VT1   0040000
67e69b4065Sths #define TARGET_FFDLY   0100000
68e69b4065Sths #define   TARGET_FF0   0000000
69e69b4065Sths #define   TARGET_FF1   0100000
70e69b4065Sths 
71e69b4065Sths /* c_cflag bit meaning */
72e69b4065Sths #define TARGET_CBAUD   0010017
73e69b4065Sths #define  TARGET_B0     0000000         /* hang up */
74e69b4065Sths #define  TARGET_B50    0000001
75e69b4065Sths #define  TARGET_B75    0000002
76e69b4065Sths #define  TARGET_B110   0000003
77e69b4065Sths #define  TARGET_B134   0000004
78e69b4065Sths #define  TARGET_B150   0000005
79e69b4065Sths #define  TARGET_B200   0000006
80e69b4065Sths #define  TARGET_B300   0000007
81e69b4065Sths #define  TARGET_B600   0000010
82e69b4065Sths #define  TARGET_B1200  0000011
83e69b4065Sths #define  TARGET_B1800  0000012
84e69b4065Sths #define  TARGET_B2400  0000013
85e69b4065Sths #define  TARGET_B4800  0000014
86e69b4065Sths #define  TARGET_B9600  0000015
87e69b4065Sths #define  TARGET_B19200 0000016
88e69b4065Sths #define  TARGET_B38400 0000017
89e69b4065Sths #define TARGET_EXTA B19200
90e69b4065Sths #define TARGET_EXTB B38400
91e69b4065Sths #define TARGET_CSIZE   0000060
92e69b4065Sths #define   TARGET_CS5   0000000
93e69b4065Sths #define   TARGET_CS6   0000020
94e69b4065Sths #define   TARGET_CS7   0000040
95e69b4065Sths #define   TARGET_CS8   0000060
96e69b4065Sths #define TARGET_CSTOPB  0000100
97e69b4065Sths #define TARGET_CREAD   0000200
98e69b4065Sths #define TARGET_PARENB  0000400
99e69b4065Sths #define TARGET_PARODD  0001000
100e69b4065Sths #define TARGET_HUPCL   0002000
101e69b4065Sths #define TARGET_CLOCAL  0004000
102e69b4065Sths #define TARGET_CBAUDEX 0010000
103e69b4065Sths #define  TARGET_B57600  0010001
104e69b4065Sths #define  TARGET_B115200 0010002
105e69b4065Sths #define  TARGET_B230400 0010003
106e69b4065Sths #define  TARGET_B460800 0010004
107e69b4065Sths #define TARGET_CIBAUD    002003600000  /* input baud rate (not used) */
108e69b4065Sths #define TARGET_CRTSCTS   020000000000          /* flow control */
109e69b4065Sths 
110e69b4065Sths /* c_lflag bits */
111e69b4065Sths #define TARGET_ISIG    0000001
112e69b4065Sths #define TARGET_ICANON  0000002
113e69b4065Sths #define TARGET_XCASE   0000004
114e69b4065Sths #define TARGET_ECHO    0000010
115e69b4065Sths #define TARGET_ECHOE   0000020
116e69b4065Sths #define TARGET_ECHOK   0000040
117e69b4065Sths #define TARGET_ECHONL  0000100
118e69b4065Sths #define TARGET_NOFLSH  0000200
119e69b4065Sths #define TARGET_TOSTOP  0000400
120e69b4065Sths #define TARGET_ECHOCTL 0001000
121e69b4065Sths #define TARGET_ECHOPRT 0002000
122e69b4065Sths #define TARGET_ECHOKE  0004000
123e69b4065Sths #define TARGET_FLUSHO  0010000
124e69b4065Sths #define TARGET_PENDIN  0040000
125e69b4065Sths #define TARGET_IEXTEN  0100000
126*c218b4edSFilip Bozuta #define TARGET_EXTPROC 0200000
127e69b4065Sths 
128e69b4065Sths /* c_cc character offsets */
129e69b4065Sths #define TARGET_VINTR	0
130e69b4065Sths #define TARGET_VQUIT	1
131e69b4065Sths #define TARGET_VERASE	2
132e69b4065Sths #define TARGET_VKILL	3
133e69b4065Sths #define TARGET_VEOF	4
134e69b4065Sths #define TARGET_VTIME	5
135e69b4065Sths #define TARGET_VMIN	6
136e69b4065Sths #define TARGET_VSWTC	7
137e69b4065Sths #define TARGET_VSTART	8
138e69b4065Sths #define TARGET_VSTOP	9
139e69b4065Sths #define TARGET_VSUSP	10
140e69b4065Sths #define TARGET_VEOL	11
141e69b4065Sths #define TARGET_VREPRINT	12
142e69b4065Sths #define TARGET_VDISCARD	13
143e69b4065Sths #define TARGET_VWERASE	14
144e69b4065Sths #define TARGET_VLNEXT	15
145e69b4065Sths #define TARGET_VEOL2	16
146e69b4065Sths 
147e69b4065Sths /* ioctls */
148e69b4065Sths 
149e69b4065Sths #define TARGET_TCGETS		0x5401
150e69b4065Sths #define TARGET_TCSETS		0x5402
151e69b4065Sths #define TARGET_TCSETSW		0x5403
152e69b4065Sths #define TARGET_TCSETSF		0x5404
153e69b4065Sths #define TARGET_TCGETA		0x5405
154e69b4065Sths #define TARGET_TCSETA		0x5406
155e69b4065Sths #define TARGET_TCSETAW		0x5407
156e69b4065Sths #define TARGET_TCSETAF		0x5408
157e69b4065Sths #define TARGET_TCSBRK		0x5409
158e69b4065Sths #define TARGET_TCXONC		0x540A
159e69b4065Sths #define TARGET_TCFLSH		0x540B
160e69b4065Sths 
161e69b4065Sths #define TARGET_TIOCEXCL	0x540C
162e69b4065Sths #define TARGET_TIOCNXCL	0x540D
163e69b4065Sths #define TARGET_TIOCSCTTY	0x540E
164e69b4065Sths #define TARGET_TIOCGPGRP	0x540F
165e69b4065Sths #define TARGET_TIOCSPGRP	0x5410
166e69b4065Sths #define TARGET_TIOCOUTQ	0x5411
167e69b4065Sths #define TARGET_TIOCSTI		0x5412
168e69b4065Sths #define TARGET_TIOCGWINSZ	0x5413
169e69b4065Sths #define TARGET_TIOCSWINSZ	0x5414
170e69b4065Sths #define TARGET_TIOCMGET	0x5415
171e69b4065Sths #define TARGET_TIOCMBIS	0x5416
172e69b4065Sths #define TARGET_TIOCMBIC	0x5417
173e69b4065Sths #define TARGET_TIOCMSET	0x5418
174e69b4065Sths #define TARGET_TIOCGSOFTCAR	0x5419
175e69b4065Sths #define TARGET_TIOCSSOFTCAR	0x541A
176e69b4065Sths #define TARGET_FIONREAD	0x541B
177e69b4065Sths #define TARGET_TIOCINQ		TARGET_FIONREAD
178e69b4065Sths #define TARGET_TIOCLINUX	0x541C
179e69b4065Sths #define TARGET_TIOCCONS	0x541D
180e69b4065Sths #define TARGET_TIOCGSERIAL	0x541E
181e69b4065Sths #define TARGET_TIOCSSERIAL	0x541F
182e69b4065Sths #define TARGET_TIOCPKT		0x5420
183e69b4065Sths #define TARGET_FIONBIO		0x5421
184e69b4065Sths #define TARGET_TIOCNOTTY	0x5422
185e69b4065Sths #define TARGET_TIOCSETD	0x5423
186e69b4065Sths #define TARGET_TIOCGETD	0x5424
187e69b4065Sths #define TARGET_TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
188e69b4065Sths #define TARGET_TIOCTTYGSTRUCT	0x5426  /* For debugging only */
189e69b4065Sths #define TARGET_TIOCSBRK	0x5427  /* BSD compatibility */
190e69b4065Sths #define TARGET_TIOCCBRK	0x5428  /* BSD compatibility */
191e69b4065Sths #define TARGET_TIOCGSID	0x5429  /* Return the session ID of FD */
192e69b4065Sths #define TARGET_TIOCGPTN	TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
193e69b4065Sths #define TARGET_TIOCSPTLCK	TARGET_IOW('T',0x31, int)  /* Lock/unlock Pty */
1942b74f621SAndreas Schwab #define TARGET_TIOCGPTPEER      TARGET_IO('T', 0x41) /* Safely open the slave */
195e69b4065Sths 
196e69b4065Sths #define TARGET_FIONCLEX	0x5450  /* these numbers need to be adjusted. */
197e69b4065Sths #define TARGET_FIOCLEX		0x5451
198e69b4065Sths #define TARGET_FIOASYNC	0x5452
199e69b4065Sths #define TARGET_TIOCSERCONFIG	0x5453
200e69b4065Sths #define TARGET_TIOCSERGWILD	0x5454
201e69b4065Sths #define TARGET_TIOCSERSWILD	0x5455
202e69b4065Sths #define TARGET_TIOCGLCKTRMIOS	0x5456
203e69b4065Sths #define TARGET_TIOCSLCKTRMIOS	0x5457
204e69b4065Sths #define TARGET_TIOCSERGSTRUCT	0x5458 /* For debugging only */
205e69b4065Sths #define TARGET_TIOCSERGETLSR   0x5459 /* Get line status register */
206e69b4065Sths #define TARGET_TIOCSERGETMULTI 0x545A /* Get multiport config  */
207e69b4065Sths #define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */
208e69b4065Sths 
209e69b4065Sths #define TARGET_TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
210e69b4065Sths #define TARGET_TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
211e69b4065Sths #define TARGET_TIOCGHAYESESP   0x545E  /* Get Hayes ESP configuration */
212e69b4065Sths #define TARGET_TIOCSHAYESESP   0x545F  /* Set Hayes ESP configuration */
213e69b4065Sths 
214e69b4065Sths /* Used for packet mode */
215e69b4065Sths #define TARGET_TIOCPKT_DATA		 0
216e69b4065Sths #define TARGET_TIOCPKT_FLUSHREAD	 1
217e69b4065Sths #define TARGET_TIOCPKT_FLUSHWRITE	 2
218e69b4065Sths #define TARGET_TIOCPKT_STOP		 4
219e69b4065Sths #define TARGET_TIOCPKT_START		 8
220e69b4065Sths #define TARGET_TIOCPKT_NOSTOP		16
221e69b4065Sths #define TARGET_TIOCPKT_DOSTOP		32
222e69b4065Sths 
223e69b4065Sths #define TARGET_TIOCSER_TEMT    0x01	/* Transmitter physically empty */
224f91005e1SMarkus Armbruster 
225f91005e1SMarkus Armbruster #endif
226