serial.h revision 106b3a8a7dc03c19a45e322de425ac56aafac358
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_SERIAL_H
20#define _UAPI_LINUX_SERIAL_H
21#include <linux/types.h>
22#include <linux/tty_flags.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24struct serial_struct {
25  int type;
26  int line;
27  unsigned int port;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29  int irq;
30  int flags;
31  int xmit_fifo_size;
32  int custom_divisor;
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  int baud_base;
35  unsigned short close_delay;
36  char io_type;
37  char reserved_char[1];
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  int hub6;
40  unsigned short closing_wait;
41  unsigned short closing_wait2;
42  unsigned char * iomem_base;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  unsigned short iomem_reg_shift;
45  unsigned int port_high;
46  unsigned long iomap_base;
47};
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49#define ASYNC_CLOSING_WAIT_INF 0
50#define ASYNC_CLOSING_WAIT_NONE 65535
51#define PORT_UNKNOWN 0
52#define PORT_8250 1
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54#define PORT_16450 2
55#define PORT_16550 3
56#define PORT_16550A 4
57#define PORT_CIRRUS 5
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59#define PORT_16650 6
60#define PORT_16650V2 7
61#define PORT_16750 8
62#define PORT_STARTECH 9
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64#define PORT_16C950 10
65#define PORT_16654 11
66#define PORT_16850 12
67#define PORT_RSA 13
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69#define PORT_MAX 13
70#define SERIAL_IO_PORT 0
71#define SERIAL_IO_HUB6 1
72#define SERIAL_IO_MEM 2
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74#define SERIAL_IO_MEM32 3
75#define SERIAL_IO_AU 4
76#define SERIAL_IO_TSI 5
77#define SERIAL_IO_MEM32BE 6
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79#define SERIAL_IO_MEM16 7
80#define UART_CLEAR_FIFO 0x01
81#define UART_USE_FIFO 0x02
82#define UART_STARTECH 0x04
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84#define UART_NATSEMI 0x08
85struct serial_multiport_struct {
86  int irq;
87  int port1;
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  unsigned char mask1, match1;
90  int port2;
91  unsigned char mask2, match2;
92  int port3;
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  unsigned char mask3, match3;
95  int port4;
96  unsigned char mask4, match4;
97  int port_monitor;
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99  int reserved[32];
100};
101struct serial_icounter_struct {
102  int cts, dsr, rng, dcd;
103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104  int rx, tx;
105  int frame, overrun, parity, brk;
106  int buf_overrun;
107  int reserved[9];
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109};
110struct serial_rs485 {
111  __u32 flags;
112#define SER_RS485_ENABLED (1 << 0)
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define SER_RS485_RTS_ON_SEND (1 << 1)
115#define SER_RS485_RTS_AFTER_SEND (1 << 2)
116#define SER_RS485_RX_DURING_TX (1 << 4)
117  __u32 delay_rts_before_send;
118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  __u32 delay_rts_after_send;
120  __u32 padding[5];
121};
122#endif
123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124