• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 struct 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
72 struct 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 };
85 struct 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 };
92 struct 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 #define SER_RS485_ADDRB (1 << 6)
100 #define SER_RS485_ADDR_RECV (1 << 7)
101 #define SER_RS485_ADDR_DEST (1 << 8)
102   __u32 delay_rts_before_send;
103   __u32 delay_rts_after_send;
104   union {
105     __u32 padding[5];
106     struct {
107       __u8 addr_recv;
108       __u8 addr_dest;
109       __u8 padding0[2];
110       __u32 padding1[4];
111     };
112   };
113 };
114 struct serial_iso7816 {
115   __u32 flags;
116 #define SER_ISO7816_ENABLED (1 << 0)
117 #define SER_ISO7816_T_PARAM (0x0f << 4)
118 #define SER_ISO7816_T(t) (((t) & 0x0f) << 4)
119   __u32 tg;
120   __u32 sc_fi;
121   __u32 sc_di;
122   __u32 clk;
123   __u32 reserved[5];
124 };
125 #endif
126