blob: 494dc9a30c47265f9edc2fb57aa8bae340432b45 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 {
Tao Baod7db5942015-01-28 10:07:51 -080025 int type;
26 int line;
27 unsigned int port;
Ben Cheng655a7c02013-10-16 16:09:24 -070028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080029 int irq;
30 int flags;
31 int xmit_fifo_size;
32 int custom_divisor;
Ben Cheng655a7c02013-10-16 16:09:24 -070033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080034 int baud_base;
35 unsigned short close_delay;
36 char io_type;
37 char reserved_char[1];
Ben Cheng655a7c02013-10-16 16:09:24 -070038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080039 int hub6;
40 unsigned short closing_wait;
41 unsigned short closing_wait2;
42 unsigned char * iomem_base;
Ben Cheng655a7c02013-10-16 16:09:24 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080044 unsigned short iomem_reg_shift;
45 unsigned int port_high;
46 unsigned long iomap_base;
Ben Cheng655a7c02013-10-16 16:09:24 -070047};
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 */
Christopher Ferris05d08e92016-02-04 13:16:38 -080074#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 */
Ben Cheng655a7c02013-10-16 16:09:24 -070079#define UART_CLEAR_FIFO 0x01
80#define UART_USE_FIFO 0x02
81#define UART_STARTECH 0x04
82#define UART_NATSEMI 0x08
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84struct serial_multiport_struct {
Tao Baod7db5942015-01-28 10:07:51 -080085 int irq;
86 int port1;
87 unsigned char mask1, match1;
Ben Cheng655a7c02013-10-16 16:09:24 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080089 int port2;
90 unsigned char mask2, match2;
91 int port3;
92 unsigned char mask3, match3;
Ben Cheng655a7c02013-10-16 16:09:24 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -080094 int port4;
95 unsigned char mask4, match4;
96 int port_monitor;
97 int reserved[32];
Ben Cheng655a7c02013-10-16 16:09:24 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99};
100struct serial_icounter_struct {
Tao Baod7db5942015-01-28 10:07:51 -0800101 int cts, dsr, rng, dcd;
102 int rx, tx;
Ben Cheng655a7c02013-10-16 16:09:24 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800104 int frame, overrun, parity, brk;
105 int buf_overrun;
106 int reserved[9];
Ben Cheng655a7c02013-10-16 16:09:24 -0700107};
108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109struct serial_rs485 {
Tao Baod7db5942015-01-28 10:07:51 -0800110 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#define SER_RS485_ENABLED (1 << 0)
112#define SER_RS485_RTS_ON_SEND (1 << 1)
113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114#define SER_RS485_RTS_AFTER_SEND (1 << 2)
115#define SER_RS485_RX_DURING_TX (1 << 4)
Tao Baod7db5942015-01-28 10:07:51 -0800116 __u32 delay_rts_before_send;
117 __u32 delay_rts_after_send;
Ben Cheng655a7c02013-10-16 16:09:24 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Tao Baod7db5942015-01-28 10:07:51 -0800119 __u32 padding[5];
Ben Cheng655a7c02013-10-16 16:09:24 -0700120};
121#endif