Optimize andes_clear_page() and andes_copy_page() with prefetch
[linux-2.6/linux-mips.git] / include / asm-mips64 / termbits.h
blob498fbdd3bfff9aa48d28d535a15e50b6a66b7997
1 /* $Id$
3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
5 * for more details.
7 * Copyright (C) 1995, 1996, 1999 by Ralf Baechle
8 * Copyright (C) 1999 Silicon Graphics, Inc.
9 */
10 #ifndef _ASM_TERMBITS_H
11 #define _ASM_TERMBITS_H
13 #include <linux/posix_types.h>
15 typedef unsigned char cc_t;
16 #if (_MIPS_SZLONG == 32)
17 typedef unsigned long speed_t;
18 typedef unsigned long tcflag_t;
19 #endif
20 #if (_MIPS_SZLONG == 64)
21 typedef __u32 speed_t;
22 typedef __u32 tcflag_t;
23 #endif
26 * The ABI says nothing about NCC but seems to use NCCS as
27 * replacement for it in struct termio
29 #define NCCS 23
30 struct termios {
31 tcflag_t c_iflag; /* input mode flags */
32 tcflag_t c_oflag; /* output mode flags */
33 tcflag_t c_cflag; /* control mode flags */
34 tcflag_t c_lflag; /* local mode flags */
35 cc_t c_line; /* line discipline */
36 cc_t c_cc[NCCS]; /* control characters */
39 /* c_cc characters */
40 #define VINTR 0 /* Interrupt character [ISIG]. */
41 #define VQUIT 1 /* Quit character [ISIG]. */
42 #define VERASE 2 /* Erase character [ICANON]. */
43 #define VKILL 3 /* Kill-line character [ICANON]. */
44 #define VMIN 4 /* Minimum number of bytes read at once [!ICANON]. */
45 #define VTIME 5 /* Time-out value (tenths of a second) [!ICANON]. */
46 #define VEOL2 6 /* Second EOL character [ICANON]. */
47 #define VSWTC 7 /* ??? */
48 #define VSWTCH VSWTC
49 #define VSTART 8 /* Start (X-ON) character [IXON, IXOFF]. */
50 #define VSTOP 9 /* Stop (X-OFF) character [IXON, IXOFF]. */
51 #define VSUSP 10 /* Suspend character [ISIG]. */
52 #if 0
54 * VDSUSP is not supported
56 #define VDSUSP 11 /* Delayed suspend character [ISIG]. */
57 #endif
58 #define VREPRINT 12 /* Reprint-line character [ICANON]. */
59 #define VDISCARD 13 /* Discard character [IEXTEN]. */
60 #define VWERASE 14 /* Word-erase character [ICANON]. */
61 #define VLNEXT 15 /* Literal-next character [IEXTEN]. */
62 #define VEOF 16 /* End-of-file character [ICANON]. */
63 #define VEOL 17 /* End-of-line character [ICANON]. */
65 /* c_iflag bits */
66 #define IGNBRK 0000001 /* Ignore break condition. */
67 #define BRKINT 0000002 /* Signal interrupt on break. */
68 #define IGNPAR 0000004 /* Ignore characters with parity errors. */
69 #define PARMRK 0000010 /* Mark parity and framing errors. */
70 #define INPCK 0000020 /* Enable input parity check. */
71 #define ISTRIP 0000040 /* Strip 8th bit off characters. */
72 #define INLCR 0000100 /* Map NL to CR on input. */
73 #define IGNCR 0000200 /* Ignore CR. */
74 #define ICRNL 0000400 /* Map CR to NL on input. */
75 #if defined (__USE_BSD) || defined (__KERNEL__)
76 #define IUCLC 0001000 /* Map upper case to lower case on input. */
77 #endif
78 #define IXON 0002000 /* Enable start/stop output control. */
79 #if defined (__USE_BSD) || defined (__KERNEL__)
80 #define IXANY 0004000 /* Any character will restart after stop. */
81 #endif
82 #define IXOFF 0010000 /* Enable start/stop input control. */
83 #if defined (__USE_BSD) || defined (__KERNEL__)
84 #define IMAXBEL 0020000 /* Ring bell when input queue is full. */
85 #endif
87 /* c_oflag bits */
88 #define OPOST 0000001 /* Perform output processing. */
89 #if defined (__USE_BSD) || defined (__KERNEL__)
90 #define OLCUC 0000002 /* Map lower case to upper case on output. */
91 #define ONLCR 0000004 /* Map NL to CR-NL on output. */
92 #define OCRNL 0000010
93 #define ONOCR 0000020
94 #define ONLRET 0000040
95 #define OFILL 0000100
96 #define OFDEL 0000200
97 #define NLDLY 0000400
98 #define NL0 0000000
99 #define NL1 0000400
100 #define CRDLY 0003000
101 #define CR0 0000000
102 #define CR1 0001000
103 #define CR2 0002000
104 #define CR3 0003000
105 #define TABDLY 0014000
106 #define TAB0 0000000
107 #define TAB1 0004000
108 #define TAB2 0010000
109 #define TAB3 0014000
110 #define XTABS 0014000
111 #define BSDLY 0020000
112 #define BS0 0000000
113 #define BS1 0020000
114 #define VTDLY 0040000
115 #define VT0 0000000
116 #define VT1 0040000
117 #define FFDLY 0100000
118 #define FF0 0000000
119 #define FF1 0100000
121 #define PAGEOUT ???
122 #define WRAP ???
124 #endif
126 /* c_cflag bit meaning */
127 #define CBAUD 0010017
128 #define B0 0000000 /* hang up */
129 #define B50 0000001
130 #define B75 0000002
131 #define B110 0000003
132 #define B134 0000004
133 #define B150 0000005
134 #define B200 0000006
135 #define B300 0000007
136 #define B600 0000010
137 #define B1200 0000011
138 #define B1800 0000012
139 #define B2400 0000013
140 #define B4800 0000014
141 #define B9600 0000015
142 #define B19200 0000016
143 #define B38400 0000017
144 #define EXTA B19200
145 #define EXTB B38400
146 #define CSIZE 0000060 /* Number of bits per byte (mask). */
147 #define CS5 0000000 /* 5 bits per byte. */
148 #define CS6 0000020 /* 6 bits per byte. */
149 #define CS7 0000040 /* 7 bits per byte. */
150 #define CS8 0000060 /* 8 bits per byte. */
151 #define CSTOPB 0000100 /* Two stop bits instead of one. */
152 #define CREAD 0000200 /* Enable receiver. */
153 #define PARENB 0000400 /* Parity enable. */
154 #define PARODD 0001000 /* Odd parity instead of even. */
155 #define HUPCL 0002000 /* Hang up on last close. */
156 #define CLOCAL 0004000 /* Ignore modem status lines. */
157 #if defined (__USE_BSD) || defined (__KERNEL__)
158 #define CBAUDEX 0010000
159 #define B57600 0010001
160 #define B115200 0010002
161 #define B230400 0010003
162 #define B460800 0010004
163 #define B500000 0010005
164 #define B576000 0010006
165 #define B921600 0010007
166 #define B1000000 0010010
167 #define B1152000 0010011
168 #define B1500000 0010012
169 #define B2000000 0010013
170 #define B2500000 0010014
171 #define B3000000 0010015
172 #define B3500000 0010016
173 #define B4000000 0010017
174 #define CIBAUD 002003600000 /* input baud rate (not used) */
175 #define CMSPAR 010000000000 /* mark or space (stick) parity */
176 #define CRTSCTS 020000000000 /* flow control */
177 #endif
179 /* c_lflag bits */
180 #define ISIG 0000001 /* Enable signals. */
181 #define ICANON 0000002 /* Do erase and kill processing. */
182 #define XCASE 0000004
183 #define ECHO 0000010 /* Enable echo. */
184 #define ECHOE 0000020 /* Visual erase for ERASE. */
185 #define ECHOK 0000040 /* Echo NL after KILL. */
186 #define ECHONL 0000100 /* Echo NL even if ECHO is off. */
187 #define NOFLSH 0000200 /* Disable flush after interrupt. */
188 #define IEXTEN 0000400 /* Enable DISCARD and LNEXT. */
189 #if defined (__USE_BSD) || defined (__KERNEL__)
190 #define ECHOCTL 0001000 /* Echo control characters as ^X. */
191 #define ECHOPRT 0002000 /* Hardcopy visual erase. */
192 #define ECHOKE 0004000 /* Visual erase for KILL. */
193 #endif
194 #define FLUSHO 0020000
195 #if defined (__USE_BSD) || defined (__KERNEL__)
196 #define PENDIN 0040000 /* Retype pending input (state). */
197 #endif
198 #define TOSTOP 0100000 /* Send SIGTTOU for background output. */
199 #define ITOSTOP TOSTOP
201 /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
202 #define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
204 /* tcflow() and TCXONC use these */
205 #define TCOOFF 0 /* Suspend output. */
206 #define TCOON 1 /* Restart suspended output. */
207 #define TCIOFF 2 /* Send a STOP character. */
208 #define TCION 3 /* Send a START character. */
210 /* tcflush() and TCFLSH use these */
211 #define TCIFLUSH 0 /* Discard data received but not yet read. */
212 #define TCOFLUSH 1 /* Discard data written but not yet sent. */
213 #define TCIOFLUSH 2 /* Discard all pending data. */
215 /* tcsetattr uses these */
216 #define TCSANOW TCSETS /* Change immediately. */
217 #define TCSADRAIN TCSETSW /* Change when pending output is written. */
218 #define TCSAFLUSH TCSETSF /* Flush pending input before changing. */
220 #endif /* _ASM_TERMBITS_H */