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>
23struct serial_struct {
24  int type;
25  int line;
26  unsigned int port;
27  int irq;
28  int flags;
29  int xmit_fifo_size;
30  int custom_divisor;
31  int baud_base;
32  unsigned short close_delay;
33  char io_type;
34  char reserved_char[1];
35  int hub6;
36  unsigned short closing_wait;
37  unsigned short closing_wait2;
38  unsigned char * iomem_base;
39  unsigned short iomem_reg_shift;
40  unsigned int port_high;
41  unsigned long iomap_base;
42};
43#define ASYNC_CLOSING_WAIT_INF 0
44#define ASYNC_CLOSING_WAIT_NONE 65535
45#define PORT_UNKNOWN 0
46#define PORT_8250 1
47#define PORT_16450 2
48#define PORT_16550 3
49#define PORT_16550A 4
50#define PORT_CIRRUS 5
51#define PORT_16650 6
52#define PORT_16650V2 7
53#define PORT_16750 8
54#define PORT_STARTECH 9
55#define PORT_16C950 10
56#define PORT_16654 11
57#define PORT_16850 12
58#define PORT_RSA 13
59#define PORT_MAX 13
60#define SERIAL_IO_PORT 0
61#define SERIAL_IO_HUB6 1
62#define SERIAL_IO_MEM 2
63#define SERIAL_IO_MEM32 3
64#define SERIAL_IO_AU 4
65#define SERIAL_IO_TSI 5
66#define SERIAL_IO_MEM32BE 6
67#define SERIAL_IO_MEM16 7
68#define UART_CLEAR_FIFO 0x01
69#define UART_USE_FIFO 0x02
70#define UART_STARTECH 0x04
71#define UART_NATSEMI 0x08
72struct serial_multiport_struct {
73  int irq;
74  int port1;
75  unsigned char mask1, match1;
76  int port2;
77  unsigned char mask2, match2;
78  int port3;
79  unsigned char mask3, match3;
80  int port4;
81  unsigned char mask4, match4;
82  int port_monitor;
83  int reserved[32];
84};
85struct serial_icounter_struct {
86  int cts, dsr, rng, dcd;
87  int rx, tx;
88  int frame, overrun, parity, brk;
89  int buf_overrun;
90  int reserved[9];
91};
92struct serial_rs485 {
93  __u32 flags;
94#define SER_RS485_ENABLED (1 << 0)
95#define SER_RS485_RTS_ON_SEND (1 << 1)
96#define SER_RS485_RTS_AFTER_SEND (1 << 2)
97#define SER_RS485_RX_DURING_TX (1 << 4)
98#define SER_RS485_TERMINATE_BUS (1 << 5)
99  __u32 delay_rts_before_send;
100  __u32 delay_rts_after_send;
101  __u32 padding[5];
102};
103#endif
104