1#ifndef __ASM_SH64_IOCTLS_H
2#define __ASM_SH64_IOCTLS_H
3
4/*
5 * This file is subject to the terms and conditions of the GNU General Public
6 * License.  See the file "COPYING" in the main directory of this archive
7 * for more details.
8 *
9 * include/asm-sh64/ioctls.h
10 *
11 * Copyright (C) 2000, 2001  Paolo Alberelli
12 * Copyright (C) 2004  Richard Curnow
13 *
14 */
15
16#include <asm/ioctl.h>
17
18#define FIOCLEX		0x6601		/* _IO('f', 1) */
19#define FIONCLEX	0x6602		/* _IO('f', 2) */
20#define FIOASYNC	0x4004667d	/* _IOW('f', 125, int) */
21#define FIONBIO		0x4004667e	/* _IOW('f', 126, int) */
22#define FIONREAD	0x8004667f	/* _IOW('f', 127, int) */
23#define TIOCINQ		FIONREAD
24#define FIOQSIZE	0x80086680	/* _IOR('f', 128, loff_t) */
25
26#define TCGETS		0x5401
27#define TCSETS		0x5402
28#define TCSETSW		0x5403
29#define TCSETSF		0x5404
30
31#define TCGETA		0x80127417	/* _IOR('t', 23, struct termio) */
32#define TCSETA		0x40127418	/* _IOW('t', 24, struct termio) */
33#define TCSETAW		0x40127419	/* _IOW('t', 25, struct termio) */
34#define TCSETAF		0x4012741c	/* _IOW('t', 28, struct termio) */
35
36#define TCSBRK		0x741d		/* _IO('t', 29) */
37#define TCXONC		0x741e		/* _IO('t', 30) */
38#define TCFLSH		0x741f		/* _IO('t', 31) */
39
40#define TIOCSWINSZ	0x40087467	/* _IOW('t', 103, struct winsize) */
41#define TIOCGWINSZ	0x80087468	/* _IOR('t', 104, struct winsize) */
42#define	TIOCSTART	0x746e		/* _IO('t', 110)  start output, like ^Q */
43#define	TIOCSTOP	0x746f		/* _IO('t', 111)  stop output, like ^S */
44#define TIOCOUTQ        0x80047473	/* _IOR('t', 115, int) output queue size */
45
46#define TIOCSPGRP	0x40047476	/* _IOW('t', 118, int) */
47#define TIOCGPGRP	0x80047477	/* _IOR('t', 119, int) */
48
49#define TIOCEXCL	0x540c		/* _IO('T', 12) */
50#define TIOCNXCL	0x540d		/* _IO('T', 13) */
51#define TIOCSCTTY	0x540e		/* _IO('T', 14) */
52
53#define TIOCSTI		0x40015412	/* _IOW('T', 18, char) 0x5412 */
54#define TIOCMGET	0x80045415	/* _IOR('T', 21, unsigned int) 0x5415 */
55#define TIOCMBIS	0x40045416	/* _IOW('T', 22, unsigned int) 0x5416 */
56#define TIOCMBIC	0x40045417	/* _IOW('T', 23, unsigned int) 0x5417 */
57#define TIOCMSET	0x40045418	/* _IOW('T', 24, unsigned int) 0x5418 */
58
59#define TIOCM_LE	0x001
60#define TIOCM_DTR	0x002
61#define TIOCM_RTS	0x004
62#define TIOCM_ST	0x008
63#define TIOCM_SR	0x010
64#define TIOCM_CTS	0x020
65#define TIOCM_CAR	0x040
66#define TIOCM_RNG	0x080
67#define TIOCM_DSR	0x100
68#define TIOCM_CD	TIOCM_CAR
69#define TIOCM_RI	TIOCM_RNG
70
71#define TIOCGSOFTCAR	0x80045419	/* _IOR('T', 25, unsigned int) 0x5419 */
72#define TIOCSSOFTCAR	0x4004541a	/* _IOW('T', 26, unsigned int) 0x541A */
73#define TIOCLINUX	0x4004541c	/* _IOW('T', 28, char) 0x541C */
74#define TIOCCONS	0x541d		/* _IO('T', 29) */
75#define TIOCGSERIAL	0x803c541e	/* _IOR('T', 30, struct serial_struct) 0x541E */
76#define TIOCSSERIAL	0x403c541f	/* _IOW('T', 31, struct serial_struct) 0x541F */
77#define TIOCPKT		0x40045420	/* _IOW('T', 32, int) 0x5420 */
78
79#define TIOCPKT_DATA		 0
80#define TIOCPKT_FLUSHREAD	 1
81#define TIOCPKT_FLUSHWRITE	 2
82#define TIOCPKT_STOP		 4
83#define TIOCPKT_START		 8
84#define TIOCPKT_NOSTOP		16
85#define TIOCPKT_DOSTOP		32
86
87
88#define TIOCNOTTY	0x5422		/* _IO('T', 34) */
89#define TIOCSETD	0x40045423	/* _IOW('T', 35, int) 0x5423 */
90#define TIOCGETD	0x80045424	/* _IOR('T', 36, int) 0x5424 */
91#define TCSBRKP		0x40045424	/* _IOW('T', 37, int) 0x5425 */	/* Needed for POSIX tcsendbreak() */
92#define TIOCTTYGSTRUCT	0x8c105426	/* _IOR('T', 38, struct tty_struct) 0x5426 */ /* For debugging only */
93#define TIOCSBRK	0x5427		/* _IO('T', 39) */ /* BSD compatibility */
94#define TIOCCBRK	0x5428		/* _IO('T', 40) */ /* BSD compatibility */
95#define TIOCGSID	0x80045429	/* _IOR('T', 41, pid_t) 0x5429 */ /* Return the session ID of FD */
96#define TIOCGPTN	0x80045430	/* _IOR('T',0x30, unsigned int) 0x5430 Get Pty Number (of pty-mux device) */
97#define TIOCSPTLCK	0x40045431	/* _IOW('T',0x31, int) Lock/unlock Pty */
98
99#define TIOCSERCONFIG	0x5453		/* _IO('T', 83) */
100#define TIOCSERGWILD	0x80045454	/* _IOR('T', 84,  int) 0x5454 */
101#define TIOCSERSWILD	0x40045455	/* _IOW('T', 85,  int) 0x5455 */
102#define TIOCGLCKTRMIOS	0x5456
103#define TIOCSLCKTRMIOS	0x5457
104#define TIOCSERGSTRUCT	0x80d85458	/* _IOR('T', 88, struct async_struct) 0x5458 */ /* For debugging only */
105#define TIOCSERGETLSR   0x80045459	/* _IOR('T', 89, unsigned int) 0x5459 */ /* Get line status register */
106
107/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
108#define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
109
110#define TIOCSERGETMULTI 0x80a8545a	/* _IOR('T', 90, struct serial_multiport_struct) 0x545A */ /* Get multiport config  */
111#define TIOCSERSETMULTI 0x40a8545b	/* _IOW('T', 91, struct serial_multiport_struct) 0x545B */ /* Set multiport config */
112
113#define TIOCMIWAIT	0x545c		/* _IO('T', 92) wait for a change on serial input line(s) */
114#define TIOCGICOUNT	0x545d		/* read serial port inline interrupt counts */
115
116#endif /* __ASM_SH64_IOCTLS_H */
117