xref: /openbmc/qemu/linux-user/hppa/termbits.h (revision 2b74f621)
19cad44acSRichard Henderson /* from asm/termbits.h */
29cad44acSRichard Henderson 
39cad44acSRichard Henderson #define TARGET_NCCS 19
49cad44acSRichard Henderson 
59cad44acSRichard Henderson struct target_termios {
69cad44acSRichard Henderson     unsigned int c_iflag;               /* input mode flags */
79cad44acSRichard Henderson     unsigned int c_oflag;               /* output mode flags */
89cad44acSRichard Henderson     unsigned int c_cflag;               /* control mode flags */
99cad44acSRichard Henderson     unsigned int c_lflag;               /* local mode flags */
109cad44acSRichard Henderson     unsigned char c_line;                    /* line discipline */
119cad44acSRichard Henderson     unsigned char c_cc[TARGET_NCCS];                /* control characters */
129cad44acSRichard Henderson };
139cad44acSRichard Henderson 
149cad44acSRichard Henderson /* c_iflag bits */
159cad44acSRichard Henderson #define TARGET_IGNBRK  0000001
169cad44acSRichard Henderson #define TARGET_BRKINT  0000002
179cad44acSRichard Henderson #define TARGET_IGNPAR  0000004
189cad44acSRichard Henderson #define TARGET_PARMRK  0000010
199cad44acSRichard Henderson #define TARGET_INPCK   0000020
209cad44acSRichard Henderson #define TARGET_ISTRIP  0000040
219cad44acSRichard Henderson #define TARGET_INLCR   0000100
229cad44acSRichard Henderson #define TARGET_IGNCR   0000200
239cad44acSRichard Henderson #define TARGET_ICRNL   0000400
249cad44acSRichard Henderson #define TARGET_IUCLC   0001000
259cad44acSRichard Henderson #define TARGET_IXON    0002000
269cad44acSRichard Henderson #define TARGET_IXANY   0004000
279cad44acSRichard Henderson #define TARGET_IXOFF   0010000
289cad44acSRichard Henderson #define TARGET_IMAXBEL 0040000
299cad44acSRichard Henderson #define TARGET_IUTF8   0100000
309cad44acSRichard Henderson 
319cad44acSRichard Henderson /* c_oflag bits */
329cad44acSRichard Henderson #define TARGET_OPOST   0000001
339cad44acSRichard Henderson #define TARGET_OLCUC   0000002
349cad44acSRichard Henderson #define TARGET_ONLCR   0000004
359cad44acSRichard Henderson #define TARGET_OCRNL   0000010
369cad44acSRichard Henderson #define TARGET_ONOCR   0000020
379cad44acSRichard Henderson #define TARGET_ONLRET  0000040
389cad44acSRichard Henderson #define TARGET_OFILL   0000100
399cad44acSRichard Henderson #define TARGET_OFDEL   0000200
409cad44acSRichard Henderson #define TARGET_NLDLY   0000400
419cad44acSRichard Henderson #define   TARGET_NL0   0000000
429cad44acSRichard Henderson #define   TARGET_NL1   0000400
439cad44acSRichard Henderson #define TARGET_CRDLY   0003000
449cad44acSRichard Henderson #define   TARGET_CR0   0000000
459cad44acSRichard Henderson #define   TARGET_CR1   0001000
469cad44acSRichard Henderson #define   TARGET_CR2   0002000
479cad44acSRichard Henderson #define   TARGET_CR3   0003000
489cad44acSRichard Henderson #define TARGET_TABDLY  0014000
499cad44acSRichard Henderson #define   TARGET_TAB0  0000000
509cad44acSRichard Henderson #define   TARGET_TAB1  0004000
519cad44acSRichard Henderson #define   TARGET_TAB2  0010000
529cad44acSRichard Henderson #define   TARGET_TAB3  0014000
539cad44acSRichard Henderson #define   TARGET_XTABS 0014000
549cad44acSRichard Henderson #define TARGET_BSDLY   0020000
559cad44acSRichard Henderson #define   TARGET_BS0   0000000
569cad44acSRichard Henderson #define   TARGET_BS1   0020000
579cad44acSRichard Henderson #define TARGET_VTDLY   0040000
589cad44acSRichard Henderson #define   TARGET_VT0   0000000
599cad44acSRichard Henderson #define   TARGET_VT1   0040000
609cad44acSRichard Henderson #define TARGET_FFDLY   0100000
619cad44acSRichard Henderson #define   TARGET_FF0   0000000
629cad44acSRichard Henderson #define   TARGET_FF1   0100000
639cad44acSRichard Henderson 
649cad44acSRichard Henderson /* c_cflag bit meaning */
659cad44acSRichard Henderson #define TARGET_CBAUD   0010017
669cad44acSRichard Henderson #define  TARGET_B0     0000000         /* hang up */
679cad44acSRichard Henderson #define  TARGET_B50    0000001
689cad44acSRichard Henderson #define  TARGET_B75    0000002
699cad44acSRichard Henderson #define  TARGET_B110   0000003
709cad44acSRichard Henderson #define  TARGET_B134   0000004
719cad44acSRichard Henderson #define  TARGET_B150   0000005
729cad44acSRichard Henderson #define  TARGET_B200   0000006
739cad44acSRichard Henderson #define  TARGET_B300   0000007
749cad44acSRichard Henderson #define  TARGET_B600   0000010
759cad44acSRichard Henderson #define  TARGET_B1200  0000011
769cad44acSRichard Henderson #define  TARGET_B1800  0000012
779cad44acSRichard Henderson #define  TARGET_B2400  0000013
789cad44acSRichard Henderson #define  TARGET_B4800  0000014
799cad44acSRichard Henderson #define  TARGET_B9600  0000015
809cad44acSRichard Henderson #define  TARGET_B19200 0000016
819cad44acSRichard Henderson #define  TARGET_B38400 0000017
829cad44acSRichard Henderson #define TARGET_EXTA B19200
839cad44acSRichard Henderson #define TARGET_EXTB B38400
849cad44acSRichard Henderson #define TARGET_CSIZE   0000060
859cad44acSRichard Henderson #define   TARGET_CS5   0000000
869cad44acSRichard Henderson #define   TARGET_CS6   0000020
879cad44acSRichard Henderson #define   TARGET_CS7   0000040
889cad44acSRichard Henderson #define   TARGET_CS8   0000060
899cad44acSRichard Henderson #define TARGET_CSTOPB  0000100
909cad44acSRichard Henderson #define TARGET_CREAD   0000200
919cad44acSRichard Henderson #define TARGET_PARENB  0000400
929cad44acSRichard Henderson #define TARGET_PARODD  0001000
939cad44acSRichard Henderson #define TARGET_HUPCL   0002000
949cad44acSRichard Henderson #define TARGET_CLOCAL  0004000
959cad44acSRichard Henderson #define TARGET_CBAUDEX 0010000
969cad44acSRichard Henderson #define  TARGET_B57600  0010001
979cad44acSRichard Henderson #define  TARGET_B115200 0010002
989cad44acSRichard Henderson #define  TARGET_B230400 0010003
999cad44acSRichard Henderson #define  TARGET_B460800 0010004
1009cad44acSRichard Henderson #define TARGET_CIBAUD    002003600000  /* input baud rate (not used) */
1019cad44acSRichard Henderson #define TARGET_CMSPAR    010000000000  /* mark or space (stick) parity */
1029cad44acSRichard Henderson #define TARGET_CRTSCTS   020000000000  /* flow control */
1039cad44acSRichard Henderson 
1049cad44acSRichard Henderson /* c_lflag bits */
1059cad44acSRichard Henderson #define TARGET_ISIG    0000001
1069cad44acSRichard Henderson #define TARGET_ICANON  0000002
1079cad44acSRichard Henderson #define TARGET_XCASE   0000004
1089cad44acSRichard Henderson #define TARGET_ECHO    0000010
1099cad44acSRichard Henderson #define TARGET_ECHOE   0000020
1109cad44acSRichard Henderson #define TARGET_ECHOK   0000040
1119cad44acSRichard Henderson #define TARGET_ECHONL  0000100
1129cad44acSRichard Henderson #define TARGET_NOFLSH  0000200
1139cad44acSRichard Henderson #define TARGET_TOSTOP  0000400
1149cad44acSRichard Henderson #define TARGET_ECHOCTL 0001000
1159cad44acSRichard Henderson #define TARGET_ECHOPRT 0002000
1169cad44acSRichard Henderson #define TARGET_ECHOKE  0004000
1179cad44acSRichard Henderson #define TARGET_FLUSHO  0010000
1189cad44acSRichard Henderson #define TARGET_PENDIN  0040000
1199cad44acSRichard Henderson #define TARGET_IEXTEN  0100000
1209cad44acSRichard Henderson 
1219cad44acSRichard Henderson /* c_cc character offsets */
1229cad44acSRichard Henderson #define TARGET_VINTR    0
1239cad44acSRichard Henderson #define TARGET_VQUIT    1
1249cad44acSRichard Henderson #define TARGET_VERASE   2
1259cad44acSRichard Henderson #define TARGET_VKILL    3
1269cad44acSRichard Henderson #define TARGET_VEOF     4
1279cad44acSRichard Henderson #define TARGET_VTIME    5
1289cad44acSRichard Henderson #define TARGET_VMIN     6
1299cad44acSRichard Henderson #define TARGET_VSWTC    7
1309cad44acSRichard Henderson #define TARGET_VSTART   8
1319cad44acSRichard Henderson #define TARGET_VSTOP    9
1329cad44acSRichard Henderson #define TARGET_VSUSP    10
1339cad44acSRichard Henderson #define TARGET_VEOL     11
1349cad44acSRichard Henderson #define TARGET_VREPRINT 12
1359cad44acSRichard Henderson #define TARGET_VDISCARD 13
1369cad44acSRichard Henderson #define TARGET_VWERASE  14
1379cad44acSRichard Henderson #define TARGET_VLNEXT   15
1389cad44acSRichard Henderson #define TARGET_VEOL2    16
1399cad44acSRichard Henderson 
1409cad44acSRichard Henderson /* ioctls */
1419cad44acSRichard Henderson 
1429cad44acSRichard Henderson #define TARGET_TCGETS           TARGET_IOR('T', 16, struct target_termios)
1439cad44acSRichard Henderson #define TARGET_TCSETS           TARGET_IOW('T', 17, struct target_termios)
1449cad44acSRichard Henderson #define TARGET_TCSETSW          TARGET_IOW('T', 18, struct target_termios)
1459cad44acSRichard Henderson #define TARGET_TCSETSF          TARGET_IOW('T', 19, struct target_termios)
1469cad44acSRichard Henderson #define TARGET_TCGETA           TARGET_IOR('T', 1, struct target_termios)
1479cad44acSRichard Henderson #define TARGET_TCSETA           TARGET_IOW('T', 2, struct target_termios)
1489cad44acSRichard Henderson #define TARGET_TCSETAW          TARGET_IOW('T', 3, struct target_termios)
1499cad44acSRichard Henderson #define TARGET_TCSETAF          TARGET_IOW('T', 4, struct target_termios)
1509cad44acSRichard Henderson #define TARGET_TCSBRK           TARGET_IO('T', 5)
1519cad44acSRichard Henderson #define TARGET_TCXONC           TARGET_IO('T', 6)
1529cad44acSRichard Henderson #define TARGET_TCFLSH           TARGET_IO('T', 7)
1539cad44acSRichard Henderson 
1549cad44acSRichard Henderson #define TARGET_TIOCEXCL         0x540C
1559cad44acSRichard Henderson #define TARGET_TIOCNXCL         0x540D
1569cad44acSRichard Henderson #define TARGET_TIOCSCTTY        0x540E
1579cad44acSRichard Henderson #define TARGET_TIOCGPGRP        TARGET_IOR('T', 30, int)
1589cad44acSRichard Henderson #define TARGET_TIOCSPGRP        TARGET_IOW('T', 29, int)
1599cad44acSRichard Henderson #define TARGET_TIOCOUTQ         0x5411
1609cad44acSRichard Henderson #define TARGET_TIOCSTI          0x5412
1619cad44acSRichard Henderson #define TARGET_TIOCGWINSZ       0x5413
1629cad44acSRichard Henderson #define TARGET_TIOCSWINSZ       0x5414
1639cad44acSRichard Henderson #define TARGET_TIOCMGET         0x5415
1649cad44acSRichard Henderson #define TARGET_TIOCMBIS         0x5416
1659cad44acSRichard Henderson #define TARGET_TIOCMBIC         0x5417
1669cad44acSRichard Henderson #define TARGET_TIOCMSET         0x5418
1679cad44acSRichard Henderson #define TARGET_TIOCGSOFTCAR     0x5419
1689cad44acSRichard Henderson #define TARGET_TIOCSSOFTCAR     0x541A
1699cad44acSRichard Henderson #define TARGET_FIONREAD         0x541B
1709cad44acSRichard Henderson #define TARGET_TIOCINQ          TARGET_FIONREAD
1719cad44acSRichard Henderson #define TARGET_TIOCLINUX        0x541C
1729cad44acSRichard Henderson #define TARGET_TIOCCONS         0x541D
1739cad44acSRichard Henderson #define TARGET_TIOCGSERIAL      0x541E
1749cad44acSRichard Henderson #define TARGET_TIOCSSERIAL      0x541F
1759cad44acSRichard Henderson #define TARGET_TIOCPKT          0x5420
1769cad44acSRichard Henderson #define TARGET_FIONBIO          0x5421
1779cad44acSRichard Henderson #define TARGET_TIOCNOTTY        0x5422
1789cad44acSRichard Henderson #define TARGET_TIOCSETD         0x5423
1799cad44acSRichard Henderson #define TARGET_TIOCGETD         0x5424
1809cad44acSRichard Henderson #define TARGET_TCSBRKP          0x5425 /* Needed for POSIX tcsendbreak() */
1819cad44acSRichard Henderson #define TARGET_TIOCTTYGSTRUCT   0x5426 /* For debugging only */
1829cad44acSRichard Henderson #define TARGET_TIOCSBRK         0x5427 /* BSD compatibility */
1839cad44acSRichard Henderson #define TARGET_TIOCCBRK         0x5428 /* BSD compatibility */
1849cad44acSRichard Henderson #define TARGET_TIOCGSID         TARGET_IOR('T', 20, int)
1859cad44acSRichard Henderson #define TARGET_TIOCGPTN         TARGET_IOR('T', 0x30, unsigned int)
1869cad44acSRichard Henderson         /* Get Pty Number (of pty-mux device) */
1879cad44acSRichard Henderson #define TARGET_TIOCSPTLCK       TARGET_IOW('T', 0x31, int)
1889cad44acSRichard Henderson         /* Lock/unlock Pty */
189*2b74f621SAndreas Schwab #define TARGET_TIOCGPTPEER      TARGET_IO('T', 0x41)
190*2b74f621SAndreas Schwab         /* Safely open the slave */
1919cad44acSRichard Henderson 
1929cad44acSRichard Henderson #define TARGET_FIONCLEX         0x5450  /* these numbers need to be adjusted. */
1939cad44acSRichard Henderson #define TARGET_FIOCLEX          0x5451
1949cad44acSRichard Henderson #define TARGET_FIOASYNC         0x5452
1959cad44acSRichard Henderson #define TARGET_TIOCSERCONFIG    0x5453
1969cad44acSRichard Henderson #define TARGET_TIOCSERGWILD     0x5454
1979cad44acSRichard Henderson #define TARGET_TIOCSERSWILD     0x5455
1989cad44acSRichard Henderson #define TARGET_TIOCGLCKTRMIOS   0x5456
1999cad44acSRichard Henderson #define TARGET_TIOCSLCKTRMIOS   0x5457
2009cad44acSRichard Henderson #define TARGET_TIOCSERGSTRUCT   0x5458 /* For debugging only */
2019cad44acSRichard Henderson #define TARGET_TIOCSERGETLSR    0x5459 /* Get line status register */
2029cad44acSRichard Henderson #define TARGET_TIOCSERGETMULTI  0x545A /* Get multiport config  */
2039cad44acSRichard Henderson #define TARGET_TIOCSERSETMULTI  0x545B /* Set multiport config */
2049cad44acSRichard Henderson 
2059cad44acSRichard Henderson #define TARGET_TIOCMIWAIT      0x545C  /* wait for a change on serial */
2069cad44acSRichard Henderson #define TARGET_TIOCGICOUNT     0x545D
2079cad44acSRichard Henderson #define TARGET_FIOQSIZE        0x5460
2089cad44acSRichard Henderson #define TARGET_TIOCSTART       0x5461
2099cad44acSRichard Henderson #define TARGET_TIOCSTOP        0x5462
2109cad44acSRichard Henderson #define TARGET_TIOCSLTC        0x5462
2119cad44acSRichard Henderson 
2129cad44acSRichard Henderson /* Used for packet mode */
2139cad44acSRichard Henderson #define TARGET_TIOCPKT_DATA              0
2149cad44acSRichard Henderson #define TARGET_TIOCPKT_FLUSHREAD         1
2159cad44acSRichard Henderson #define TARGET_TIOCPKT_FLUSHWRITE        2
2169cad44acSRichard Henderson #define TARGET_TIOCPKT_STOP              4
2179cad44acSRichard Henderson #define TARGET_TIOCPKT_START             8
2189cad44acSRichard Henderson #define TARGET_TIOCPKT_NOSTOP           16
2199cad44acSRichard Henderson #define TARGET_TIOCPKT_DOSTOP           32
2209cad44acSRichard Henderson 
2219cad44acSRichard Henderson #define TARGET_TIOCSER_TEMT    0x01 /* Transmitter physically empty */
222