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_SCC_H
20 #define _UAPI_SCC_H
21 #include <linux/sockios.h>
22 #define PA0HZP 0x00
23 #define EAGLE 0x01
24 #define PC100 0x02
25 #define PRIMUS 0x04
26 #define DRSI 0x08
27 #define BAYCOM 0x10
28 enum SCC_ioctl_cmds {
29   SIOCSCCRESERVED = SIOCDEVPRIVATE,
30   SIOCSCCCFG,
31   SIOCSCCINI,
32   SIOCSCCCHANINI,
33   SIOCSCCSMEM,
34   SIOCSCCGKISS,
35   SIOCSCCSKISS,
36   SIOCSCCGSTAT,
37   SIOCSCCCAL
38 };
39 enum L1_params {
40   PARAM_DATA,
41   PARAM_TXDELAY,
42   PARAM_PERSIST,
43   PARAM_SLOTTIME,
44   PARAM_TXTAIL,
45   PARAM_FULLDUP,
46   PARAM_SOFTDCD,
47   PARAM_MUTE,
48   PARAM_DTR,
49   PARAM_RTS,
50   PARAM_SPEED,
51   PARAM_ENDDELAY,
52   PARAM_GROUP,
53   PARAM_IDLE,
54   PARAM_MIN,
55   PARAM_MAXKEY,
56   PARAM_WAIT,
57   PARAM_MAXDEFER,
58   PARAM_TX,
59   PARAM_HWEVENT = 31,
60   PARAM_RETURN = 255
61 };
62 enum FULLDUP_modes {
63   KISS_DUPLEX_HALF,
64   KISS_DUPLEX_FULL,
65   KISS_DUPLEX_LINK,
66   KISS_DUPLEX_OPTIMA
67 };
68 #define TIMER_OFF 65535U
69 #define NO_SUCH_PARAM 65534U
70 enum HWEVENT_opts {
71   HWEV_DCD_ON,
72   HWEV_DCD_OFF,
73   HWEV_ALL_SENT
74 };
75 #define RXGROUP 0100
76 #define TXGROUP 0200
77 enum CLOCK_sources {
78   CLK_DPLL,
79   CLK_EXTERNAL,
80   CLK_DIVIDER,
81   CLK_BRG
82 };
83 enum TX_state {
84   TXS_IDLE,
85   TXS_BUSY,
86   TXS_ACTIVE,
87   TXS_NEWFRAME,
88   TXS_IDLE2,
89   TXS_WAIT,
90   TXS_TIMEOUT
91 };
92 typedef unsigned long io_port;
93 struct scc_stat {
94   long rxints;
95   long txints;
96   long exints;
97   long spints;
98   long txframes;
99   long rxframes;
100   long rxerrs;
101   long txerrs;
102   unsigned int nospace;
103   unsigned int rx_over;
104   unsigned int tx_under;
105   unsigned int tx_state;
106   int tx_queued;
107   unsigned int maxqueue;
108   unsigned int bufsize;
109 };
110 struct scc_modem {
111   long speed;
112   char clocksrc;
113   char nrz;
114 };
115 struct scc_kiss_cmd {
116   int command;
117   unsigned param;
118 };
119 struct scc_hw_config {
120   io_port data_a;
121   io_port ctrl_a;
122   io_port data_b;
123   io_port ctrl_b;
124   io_port vector_latch;
125   io_port special;
126   int irq;
127   long clock;
128   char option;
129   char brand;
130   char escc;
131 };
132 struct scc_mem_config {
133   unsigned int dummy;
134   unsigned int bufsize;
135 };
136 struct scc_calibrate {
137   unsigned int time;
138   unsigned char pattern;
139 };
140 #endif
141