1/*
2 * BK Id: SCCS/s.ioctls.h 1.7 05/17/01 18:14:24 cort
3 */
4#ifndef _ASM_PPC_IOCTLS_H
5#define _ASM_PPC_IOCTLS_H
6
7#include <asm/ioctl.h>
8
9#define FIOCLEX		_IO('f', 1)
10#define FIONCLEX	_IO('f', 2)
11#define FIOASYNC	_IOW('f', 125, int)
12#define FIONBIO		_IOW('f', 126, int)
13#define FIONREAD	_IOR('f', 127, int)
14#define TIOCINQ		FIONREAD
15#define FIOQSIZE	_IOR('f', 128, loff_t)
16
17#define TIOCGETP	_IOR('t', 8, struct sgttyb)
18#define TIOCSETP	_IOW('t', 9, struct sgttyb)
19#define TIOCSETN	_IOW('t', 10, struct sgttyb)	/* TIOCSETP wo flush */
20
21#define TIOCSETC	_IOW('t', 17, struct tchars)
22#define TIOCGETC	_IOR('t', 18, struct tchars)
23#define TCGETS		_IOR('t', 19, struct termios)
24#define TCSETS		_IOW('t', 20, struct termios)
25#define TCSETSW		_IOW('t', 21, struct termios)
26#define TCSETSF		_IOW('t', 22, struct termios)
27
28#define TCGETA		_IOR('t', 23, struct termio)
29#define TCSETA		_IOW('t', 24, struct termio)
30#define TCSETAW		_IOW('t', 25, struct termio)
31#define TCSETAF		_IOW('t', 28, struct termio)
32
33#define TCSBRK		_IO('t', 29)
34#define TCXONC		_IO('t', 30)
35#define TCFLSH		_IO('t', 31)
36
37#define TIOCSWINSZ	_IOW('t', 103, struct winsize)
38#define TIOCGWINSZ	_IOR('t', 104, struct winsize)
39#define	TIOCSTART	_IO('t', 110)		/* start output, like ^Q */
40#define	TIOCSTOP	_IO('t', 111)		/* stop output, like ^S */
41#define TIOCOUTQ        _IOR('t', 115, int)     /* output queue size */
42
43#define TIOCGLTC	_IOR('t', 116, struct ltchars)
44#define TIOCSLTC	_IOW('t', 117, struct ltchars)
45#define TIOCSPGRP	_IOW('t', 118, int)
46#define TIOCGPGRP	_IOR('t', 119, int)
47
48#define TIOCEXCL	0x540C
49#define TIOCNXCL	0x540D
50#define TIOCSCTTY	0x540E
51
52#define TIOCSTI		0x5412
53#define TIOCMGET	0x5415
54#define TIOCMBIS	0x5416
55#define TIOCMBIC	0x5417
56#define TIOCMSET	0x5418
57# define TIOCM_LE	0x001
58# define TIOCM_DTR	0x002
59# define TIOCM_RTS	0x004
60# define TIOCM_ST	0x008
61# define TIOCM_SR	0x010
62# define TIOCM_CTS	0x020
63# define TIOCM_CAR	0x040
64# define TIOCM_RNG	0x080
65# define TIOCM_DSR	0x100
66# define TIOCM_CD	TIOCM_CAR
67# define TIOCM_RI	TIOCM_RNG
68
69#define TIOCGSOFTCAR	0x5419
70#define TIOCSSOFTCAR	0x541A
71#define TIOCLINUX	0x541C
72#define TIOCCONS	0x541D
73#define TIOCGSERIAL	0x541E
74#define TIOCSSERIAL	0x541F
75#define TIOCPKT		0x5420
76# define TIOCPKT_DATA		 0
77# define TIOCPKT_FLUSHREAD	 1
78# define TIOCPKT_FLUSHWRITE	 2
79# define TIOCPKT_STOP		 4
80# define TIOCPKT_START		 8
81# define TIOCPKT_NOSTOP		16
82# define TIOCPKT_DOSTOP		32
83
84
85#define TIOCNOTTY	0x5422
86#define TIOCSETD	0x5423
87#define TIOCGETD	0x5424
88#define TCSBRKP		0x5425	/* Needed for POSIX tcsendbreak() */
89#define TIOCTTYGSTRUCT	0x5426  /* For debugging only */
90#define TIOCSBRK	0x5427  /* BSD compatibility */
91#define TIOCCBRK	0x5428  /* BSD compatibility */
92#define TIOCGSID	0x5429  /* Return the session ID of FD */
93#define TIOCGPTN	_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
94#define TIOCSPTLCK	_IOW('T',0x31, int)  /* Lock/unlock Pty */
95
96#define TIOCSERCONFIG	0x5453
97#define TIOCSERGWILD	0x5454
98#define TIOCSERSWILD	0x5455
99#define TIOCGLCKTRMIOS	0x5456
100#define TIOCSLCKTRMIOS	0x5457
101#define TIOCSERGSTRUCT	0x5458 /* For debugging only */
102#define TIOCSERGETLSR   0x5459 /* Get line status register */
103  /* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
104# define TIOCSER_TEMT    0x01	/* Transmitter physically empty */
105#define TIOCSERGETMULTI 0x545A /* Get multiport config  */
106#define TIOCSERSETMULTI 0x545B /* Set multiport config */
107
108#define TIOCMIWAIT	0x545C	/* wait for a change on serial input line(s) */
109#define TIOCGICOUNT	0x545D	/* read serial port inline interrupt counts */
110
111#endif /* _ASM_PPC_IOCTLS_H */
112