00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _LINUX_SERIAL_H
00011 #define _LINUX_SERIAL_H
00012
00013 struct serial_struct {
00014 int type;
00015 int line;
00016 int port;
00017 int irq;
00018 int flags;
00019 int xmit_fifo_size;
00020 int custom_divisor;
00021 int baud_base;
00022 unsigned short close_delay;
00023 char reserved_char[2];
00024 int hub6;
00025 unsigned short closing_wait;
00026 unsigned short closing_wait2;
00027 int reserved[4];
00028 };
00029
00030
00031
00032
00033
00034 #define ASYNC_CLOSING_WAIT_INF 0
00035 #define ASYNC_CLOSING_WAIT_NONE 65535
00036
00037
00038
00039
00040 #define PORT_UNKNOWN 0
00041 #define PORT_8250 1
00042 #define PORT_16450 2
00043 #define PORT_16550 3
00044 #define PORT_16550A 4
00045 #define PORT_CIRRUS 5
00046 #define PORT_16650 6
00047 #define PORT_16650V2 7
00048 #define PORT_16750 8
00049 #define PORT_STARTECH 9
00050 #define PORT_MAX 9
00051
00052 struct serial_uart_config {
00053 char *name;
00054 int dfl_xmit_fifo_size;
00055 int flags;
00056 };
00057
00058 #define UART_CLEAR_FIFO 0x01
00059 #define UART_USE_FIFO 0x02
00060 #define UART_STARTECH 0x04
00061
00062
00063
00064
00065 #define ASYNC_HUP_NOTIFY 0x0001
00066
00067 #define ASYNC_FOURPORT 0x0002
00068 #define ASYNC_SAK 0x0004
00069 #define ASYNC_SPLIT_TERMIOS 0x0008
00070
00071 #define ASYNC_SPD_MASK 0x1030
00072 #define ASYNC_SPD_HI 0x0010
00073
00074 #define ASYNC_SPD_VHI 0x0020
00075 #define ASYNC_SPD_CUST 0x0030
00076
00077 #define ASYNC_SKIP_TEST 0x0040
00078 #define ASYNC_AUTO_IRQ 0x0080
00079 #define ASYNC_SESSION_LOCKOUT 0x0100
00080 #define ASYNC_PGRP_LOCKOUT 0x0200
00081 #define ASYNC_CALLOUT_NOHUP 0x0400
00082
00083 #define ASYNC_HARDPPS_CD 0x0800
00084
00085 #define ASYNC_SPD_SHI 0x1000
00086 #define ASYNC_SPD_WARP 0x1010
00087
00088 #define ASYNC_LOW_LATENCY 0x2000
00089
00090 #define ASYNC_FLAGS 0x3FFF
00091 #define ASYNC_USR_MASK 0x3430
00092
00093
00094
00095 #define ASYNC_INITIALIZED 0x80000000
00096 #define ASYNC_CALLOUT_ACTIVE 0x40000000
00097 #define ASYNC_NORMAL_ACTIVE 0x20000000
00098 #define ASYNC_BOOT_AUTOCONF 0x10000000
00099 #define ASYNC_CLOSING 0x08000000
00100 #define ASYNC_CTS_FLOW 0x04000000
00101 #define ASYNC_CHECK_CD 0x02000000
00102 #define ASYNC_SHARE_IRQ 0x01000000
00103
00104 #define ASYNC_INTERNAL_FLAGS 0xFF000000
00105
00106
00107
00108
00109 struct serial_multiport_struct {
00110 int irq;
00111 int port1;
00112 unsigned char mask1, match1;
00113 int port2;
00114 unsigned char mask2, match2;
00115 int port3;
00116 unsigned char mask3, match3;
00117 int port4;
00118 unsigned char mask4, match4;
00119 int port_monitor;
00120 int reserved[32];
00121 };
00122
00123
00124
00125
00126
00127 struct serial_icounter_struct {
00128 int cts, dsr, rng, dcd;
00129 int rx, tx;
00130 int frame, overrun, parity, brk;
00131 int buf_overrun;
00132 int reserved[9];
00133 };
00134
00135
00136 #ifdef __KERNEL__
00137
00138 extern int register_serial(struct serial_struct *req);
00139 extern void unregister_serial(int line);
00140
00141 #endif
00142 #endif