18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_POWERPC_TERMBITS_H 38c2ecf20Sopenharmony_ci#define _ASM_POWERPC_TERMBITS_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci/* 68c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or 78c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License 88c2ecf20Sopenharmony_ci * as published by the Free Software Foundation; either version 98c2ecf20Sopenharmony_ci * 2 of the License, or (at your option) any later version. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_citypedef unsigned char cc_t; 138c2ecf20Sopenharmony_citypedef unsigned int speed_t; 148c2ecf20Sopenharmony_citypedef unsigned int tcflag_t; 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci/* 178c2ecf20Sopenharmony_ci * termios type and macro definitions. Be careful about adding stuff 188c2ecf20Sopenharmony_ci * to this file since it's used in GNU libc and there are strict rules 198c2ecf20Sopenharmony_ci * concerning namespace pollution. 208c2ecf20Sopenharmony_ci */ 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#define NCCS 19 238c2ecf20Sopenharmony_cistruct termios { 248c2ecf20Sopenharmony_ci tcflag_t c_iflag; /* input mode flags */ 258c2ecf20Sopenharmony_ci tcflag_t c_oflag; /* output mode flags */ 268c2ecf20Sopenharmony_ci tcflag_t c_cflag; /* control mode flags */ 278c2ecf20Sopenharmony_ci tcflag_t c_lflag; /* local mode flags */ 288c2ecf20Sopenharmony_ci cc_t c_cc[NCCS]; /* control characters */ 298c2ecf20Sopenharmony_ci cc_t c_line; /* line discipline (== c_cc[19]) */ 308c2ecf20Sopenharmony_ci speed_t c_ispeed; /* input speed */ 318c2ecf20Sopenharmony_ci speed_t c_ospeed; /* output speed */ 328c2ecf20Sopenharmony_ci}; 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ci/* For PowerPC the termios and ktermios are the same */ 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_cistruct ktermios { 378c2ecf20Sopenharmony_ci tcflag_t c_iflag; /* input mode flags */ 388c2ecf20Sopenharmony_ci tcflag_t c_oflag; /* output mode flags */ 398c2ecf20Sopenharmony_ci tcflag_t c_cflag; /* control mode flags */ 408c2ecf20Sopenharmony_ci tcflag_t c_lflag; /* local mode flags */ 418c2ecf20Sopenharmony_ci cc_t c_cc[NCCS]; /* control characters */ 428c2ecf20Sopenharmony_ci cc_t c_line; /* line discipline (== c_cc[19]) */ 438c2ecf20Sopenharmony_ci speed_t c_ispeed; /* input speed */ 448c2ecf20Sopenharmony_ci speed_t c_ospeed; /* output speed */ 458c2ecf20Sopenharmony_ci}; 468c2ecf20Sopenharmony_ci 478c2ecf20Sopenharmony_ci/* c_cc characters */ 488c2ecf20Sopenharmony_ci#define VINTR 0 498c2ecf20Sopenharmony_ci#define VQUIT 1 508c2ecf20Sopenharmony_ci#define VERASE 2 518c2ecf20Sopenharmony_ci#define VKILL 3 528c2ecf20Sopenharmony_ci#define VEOF 4 538c2ecf20Sopenharmony_ci#define VMIN 5 548c2ecf20Sopenharmony_ci#define VEOL 6 558c2ecf20Sopenharmony_ci#define VTIME 7 568c2ecf20Sopenharmony_ci#define VEOL2 8 578c2ecf20Sopenharmony_ci#define VSWTC 9 588c2ecf20Sopenharmony_ci#define VWERASE 10 598c2ecf20Sopenharmony_ci#define VREPRINT 11 608c2ecf20Sopenharmony_ci#define VSUSP 12 618c2ecf20Sopenharmony_ci#define VSTART 13 628c2ecf20Sopenharmony_ci#define VSTOP 14 638c2ecf20Sopenharmony_ci#define VLNEXT 15 648c2ecf20Sopenharmony_ci#define VDISCARD 16 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci/* c_iflag bits */ 678c2ecf20Sopenharmony_ci#define IGNBRK 0000001 688c2ecf20Sopenharmony_ci#define BRKINT 0000002 698c2ecf20Sopenharmony_ci#define IGNPAR 0000004 708c2ecf20Sopenharmony_ci#define PARMRK 0000010 718c2ecf20Sopenharmony_ci#define INPCK 0000020 728c2ecf20Sopenharmony_ci#define ISTRIP 0000040 738c2ecf20Sopenharmony_ci#define INLCR 0000100 748c2ecf20Sopenharmony_ci#define IGNCR 0000200 758c2ecf20Sopenharmony_ci#define ICRNL 0000400 768c2ecf20Sopenharmony_ci#define IXON 0001000 778c2ecf20Sopenharmony_ci#define IXOFF 0002000 788c2ecf20Sopenharmony_ci#define IXANY 0004000 798c2ecf20Sopenharmony_ci#define IUCLC 0010000 808c2ecf20Sopenharmony_ci#define IMAXBEL 0020000 818c2ecf20Sopenharmony_ci#define IUTF8 0040000 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci/* c_oflag bits */ 848c2ecf20Sopenharmony_ci#define OPOST 0000001 858c2ecf20Sopenharmony_ci#define ONLCR 0000002 868c2ecf20Sopenharmony_ci#define OLCUC 0000004 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci#define OCRNL 0000010 898c2ecf20Sopenharmony_ci#define ONOCR 0000020 908c2ecf20Sopenharmony_ci#define ONLRET 0000040 918c2ecf20Sopenharmony_ci 928c2ecf20Sopenharmony_ci#define OFILL 00000100 938c2ecf20Sopenharmony_ci#define OFDEL 00000200 948c2ecf20Sopenharmony_ci#define NLDLY 00001400 958c2ecf20Sopenharmony_ci#define NL0 00000000 968c2ecf20Sopenharmony_ci#define NL1 00000400 978c2ecf20Sopenharmony_ci#define NL2 00001000 988c2ecf20Sopenharmony_ci#define NL3 00001400 998c2ecf20Sopenharmony_ci#define TABDLY 00006000 1008c2ecf20Sopenharmony_ci#define TAB0 00000000 1018c2ecf20Sopenharmony_ci#define TAB1 00002000 1028c2ecf20Sopenharmony_ci#define TAB2 00004000 1038c2ecf20Sopenharmony_ci#define TAB3 00006000 1048c2ecf20Sopenharmony_ci#define XTABS 00006000 /* required by POSIX to == TAB3 */ 1058c2ecf20Sopenharmony_ci#define CRDLY 00030000 1068c2ecf20Sopenharmony_ci#define CR0 00000000 1078c2ecf20Sopenharmony_ci#define CR1 00010000 1088c2ecf20Sopenharmony_ci#define CR2 00020000 1098c2ecf20Sopenharmony_ci#define CR3 00030000 1108c2ecf20Sopenharmony_ci#define FFDLY 00040000 1118c2ecf20Sopenharmony_ci#define FF0 00000000 1128c2ecf20Sopenharmony_ci#define FF1 00040000 1138c2ecf20Sopenharmony_ci#define BSDLY 00100000 1148c2ecf20Sopenharmony_ci#define BS0 00000000 1158c2ecf20Sopenharmony_ci#define BS1 00100000 1168c2ecf20Sopenharmony_ci#define VTDLY 00200000 1178c2ecf20Sopenharmony_ci#define VT0 00000000 1188c2ecf20Sopenharmony_ci#define VT1 00200000 1198c2ecf20Sopenharmony_ci 1208c2ecf20Sopenharmony_ci/* c_cflag bit meaning */ 1218c2ecf20Sopenharmony_ci#define CBAUD 0000377 1228c2ecf20Sopenharmony_ci#define B0 0000000 /* hang up */ 1238c2ecf20Sopenharmony_ci#define B50 0000001 1248c2ecf20Sopenharmony_ci#define B75 0000002 1258c2ecf20Sopenharmony_ci#define B110 0000003 1268c2ecf20Sopenharmony_ci#define B134 0000004 1278c2ecf20Sopenharmony_ci#define B150 0000005 1288c2ecf20Sopenharmony_ci#define B200 0000006 1298c2ecf20Sopenharmony_ci#define B300 0000007 1308c2ecf20Sopenharmony_ci#define B600 0000010 1318c2ecf20Sopenharmony_ci#define B1200 0000011 1328c2ecf20Sopenharmony_ci#define B1800 0000012 1338c2ecf20Sopenharmony_ci#define B2400 0000013 1348c2ecf20Sopenharmony_ci#define B4800 0000014 1358c2ecf20Sopenharmony_ci#define B9600 0000015 1368c2ecf20Sopenharmony_ci#define B19200 0000016 1378c2ecf20Sopenharmony_ci#define B38400 0000017 1388c2ecf20Sopenharmony_ci#define EXTA B19200 1398c2ecf20Sopenharmony_ci#define EXTB B38400 1408c2ecf20Sopenharmony_ci#define CBAUDEX 0000000 1418c2ecf20Sopenharmony_ci#define B57600 00020 1428c2ecf20Sopenharmony_ci#define B115200 00021 1438c2ecf20Sopenharmony_ci#define B230400 00022 1448c2ecf20Sopenharmony_ci#define B460800 00023 1458c2ecf20Sopenharmony_ci#define B500000 00024 1468c2ecf20Sopenharmony_ci#define B576000 00025 1478c2ecf20Sopenharmony_ci#define B921600 00026 1488c2ecf20Sopenharmony_ci#define B1000000 00027 1498c2ecf20Sopenharmony_ci#define B1152000 00030 1508c2ecf20Sopenharmony_ci#define B1500000 00031 1518c2ecf20Sopenharmony_ci#define B2000000 00032 1528c2ecf20Sopenharmony_ci#define B2500000 00033 1538c2ecf20Sopenharmony_ci#define B3000000 00034 1548c2ecf20Sopenharmony_ci#define B3500000 00035 1558c2ecf20Sopenharmony_ci#define B4000000 00036 1568c2ecf20Sopenharmony_ci#define BOTHER 00037 1578c2ecf20Sopenharmony_ci 1588c2ecf20Sopenharmony_ci#define CIBAUD 077600000 1598c2ecf20Sopenharmony_ci#define IBSHIFT 16 /* Shift from CBAUD to CIBAUD */ 1608c2ecf20Sopenharmony_ci 1618c2ecf20Sopenharmony_ci#define CSIZE 00001400 1628c2ecf20Sopenharmony_ci#define CS5 00000000 1638c2ecf20Sopenharmony_ci#define CS6 00000400 1648c2ecf20Sopenharmony_ci#define CS7 00001000 1658c2ecf20Sopenharmony_ci#define CS8 00001400 1668c2ecf20Sopenharmony_ci 1678c2ecf20Sopenharmony_ci#define CSTOPB 00002000 1688c2ecf20Sopenharmony_ci#define CREAD 00004000 1698c2ecf20Sopenharmony_ci#define PARENB 00010000 1708c2ecf20Sopenharmony_ci#define PARODD 00020000 1718c2ecf20Sopenharmony_ci#define HUPCL 00040000 1728c2ecf20Sopenharmony_ci 1738c2ecf20Sopenharmony_ci#define CLOCAL 00100000 1748c2ecf20Sopenharmony_ci#define CMSPAR 010000000000 /* mark or space (stick) parity */ 1758c2ecf20Sopenharmony_ci#define CRTSCTS 020000000000 /* flow control */ 1768c2ecf20Sopenharmony_ci 1778c2ecf20Sopenharmony_ci/* c_lflag bits */ 1788c2ecf20Sopenharmony_ci#define ISIG 0x00000080 1798c2ecf20Sopenharmony_ci#define ICANON 0x00000100 1808c2ecf20Sopenharmony_ci#define XCASE 0x00004000 1818c2ecf20Sopenharmony_ci#define ECHO 0x00000008 1828c2ecf20Sopenharmony_ci#define ECHOE 0x00000002 1838c2ecf20Sopenharmony_ci#define ECHOK 0x00000004 1848c2ecf20Sopenharmony_ci#define ECHONL 0x00000010 1858c2ecf20Sopenharmony_ci#define NOFLSH 0x80000000 1868c2ecf20Sopenharmony_ci#define TOSTOP 0x00400000 1878c2ecf20Sopenharmony_ci#define ECHOCTL 0x00000040 1888c2ecf20Sopenharmony_ci#define ECHOPRT 0x00000020 1898c2ecf20Sopenharmony_ci#define ECHOKE 0x00000001 1908c2ecf20Sopenharmony_ci#define FLUSHO 0x00800000 1918c2ecf20Sopenharmony_ci#define PENDIN 0x20000000 1928c2ecf20Sopenharmony_ci#define IEXTEN 0x00000400 1938c2ecf20Sopenharmony_ci#define EXTPROC 0x10000000 1948c2ecf20Sopenharmony_ci 1958c2ecf20Sopenharmony_ci/* Values for the ACTION argument to `tcflow'. */ 1968c2ecf20Sopenharmony_ci#define TCOOFF 0 1978c2ecf20Sopenharmony_ci#define TCOON 1 1988c2ecf20Sopenharmony_ci#define TCIOFF 2 1998c2ecf20Sopenharmony_ci#define TCION 3 2008c2ecf20Sopenharmony_ci 2018c2ecf20Sopenharmony_ci/* Values for the QUEUE_SELECTOR argument to `tcflush'. */ 2028c2ecf20Sopenharmony_ci#define TCIFLUSH 0 2038c2ecf20Sopenharmony_ci#define TCOFLUSH 1 2048c2ecf20Sopenharmony_ci#define TCIOFLUSH 2 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_ci/* Values for the OPTIONAL_ACTIONS argument to `tcsetattr'. */ 2078c2ecf20Sopenharmony_ci#define TCSANOW 0 2088c2ecf20Sopenharmony_ci#define TCSADRAIN 1 2098c2ecf20Sopenharmony_ci#define TCSAFLUSH 2 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci#endif /* _ASM_POWERPC_TERMBITS_H */ 212