blob: 60aa05d6a4ff050bbcb08baad5d090147ebae171 [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_SCC_H
20#define _UAPI_SCC_H
21#define PA0HZP 0x00
22#define EAGLE 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define PC100 0x02
24#define PRIMUS 0x04
25#define DRSI 0x08
26#define BAYCOM 0x10
Ben Cheng655a7c02013-10-16 16:09:24 -070027enum SCC_ioctl_cmds {
Tao Baod7db5942015-01-28 10:07:51 -080028 SIOCSCCRESERVED = SIOCDEVPRIVATE,
29 SIOCSCCCFG,
30 SIOCSCCINI,
Tao Baod7db5942015-01-28 10:07:51 -080031 SIOCSCCCHANINI,
32 SIOCSCCSMEM,
33 SIOCSCCGKISS,
34 SIOCSCCSKISS,
Tao Baod7db5942015-01-28 10:07:51 -080035 SIOCSCCGSTAT,
36 SIOCSCCCAL
Ben Cheng655a7c02013-10-16 16:09:24 -070037};
38enum L1_params {
Tao Baod7db5942015-01-28 10:07:51 -080039 PARAM_DATA,
40 PARAM_TXDELAY,
41 PARAM_PERSIST,
42 PARAM_SLOTTIME,
Tao Baod7db5942015-01-28 10:07:51 -080043 PARAM_TXTAIL,
44 PARAM_FULLDUP,
45 PARAM_SOFTDCD,
46 PARAM_MUTE,
Tao Baod7db5942015-01-28 10:07:51 -080047 PARAM_DTR,
48 PARAM_RTS,
49 PARAM_SPEED,
50 PARAM_ENDDELAY,
Tao Baod7db5942015-01-28 10:07:51 -080051 PARAM_GROUP,
52 PARAM_IDLE,
53 PARAM_MIN,
54 PARAM_MAXKEY,
Tao Baod7db5942015-01-28 10:07:51 -080055 PARAM_WAIT,
56 PARAM_MAXDEFER,
57 PARAM_TX,
58 PARAM_HWEVENT = 31,
Tao Baod7db5942015-01-28 10:07:51 -080059 PARAM_RETURN = 255
Ben Cheng655a7c02013-10-16 16:09:24 -070060};
61enum FULLDUP_modes {
Tao Baod7db5942015-01-28 10:07:51 -080062 KISS_DUPLEX_HALF,
Tao Baod7db5942015-01-28 10:07:51 -080063 KISS_DUPLEX_FULL,
64 KISS_DUPLEX_LINK,
65 KISS_DUPLEX_OPTIMA
Ben Cheng655a7c02013-10-16 16:09:24 -070066};
Ben Cheng655a7c02013-10-16 16:09:24 -070067#define TIMER_OFF 65535U
68#define NO_SUCH_PARAM 65534U
69enum HWEVENT_opts {
Tao Baod7db5942015-01-28 10:07:51 -080070 HWEV_DCD_ON,
Tao Baod7db5942015-01-28 10:07:51 -080071 HWEV_DCD_OFF,
72 HWEV_ALL_SENT
Ben Cheng655a7c02013-10-16 16:09:24 -070073};
74#define RXGROUP 0100
Ben Cheng655a7c02013-10-16 16:09:24 -070075#define TXGROUP 0200
76enum CLOCK_sources {
Tao Baod7db5942015-01-28 10:07:51 -080077 CLK_DPLL,
78 CLK_EXTERNAL,
Tao Baod7db5942015-01-28 10:07:51 -080079 CLK_DIVIDER,
80 CLK_BRG
Ben Cheng655a7c02013-10-16 16:09:24 -070081};
82enum TX_state {
Tao Baod7db5942015-01-28 10:07:51 -080083 TXS_IDLE,
84 TXS_BUSY,
85 TXS_ACTIVE,
86 TXS_NEWFRAME,
Tao Baod7db5942015-01-28 10:07:51 -080087 TXS_IDLE2,
88 TXS_WAIT,
89 TXS_TIMEOUT
Ben Cheng655a7c02013-10-16 16:09:24 -070090};
Ben Cheng655a7c02013-10-16 16:09:24 -070091typedef unsigned long io_port;
92struct scc_stat {
Tao Baod7db5942015-01-28 10:07:51 -080093 long rxints;
94 long txints;
Tao Baod7db5942015-01-28 10:07:51 -080095 long exints;
96 long spints;
97 long txframes;
98 long rxframes;
Tao Baod7db5942015-01-28 10:07:51 -080099 long rxerrs;
100 long txerrs;
101 unsigned int nospace;
102 unsigned int rx_over;
Tao Baod7db5942015-01-28 10:07:51 -0800103 unsigned int tx_under;
104 unsigned int tx_state;
105 int tx_queued;
106 unsigned int maxqueue;
Tao Baod7db5942015-01-28 10:07:51 -0800107 unsigned int bufsize;
Ben Cheng655a7c02013-10-16 16:09:24 -0700108};
109struct scc_modem {
Tao Baod7db5942015-01-28 10:07:51 -0800110 long speed;
Tao Baod7db5942015-01-28 10:07:51 -0800111 char clocksrc;
112 char nrz;
Ben Cheng655a7c02013-10-16 16:09:24 -0700113};
114struct scc_kiss_cmd {
Tao Baod7db5942015-01-28 10:07:51 -0800115 int command;
116 unsigned param;
Ben Cheng655a7c02013-10-16 16:09:24 -0700117};
118struct scc_hw_config {
Tao Baod7db5942015-01-28 10:07:51 -0800119 io_port data_a;
120 io_port ctrl_a;
121 io_port data_b;
122 io_port ctrl_b;
Tao Baod7db5942015-01-28 10:07:51 -0800123 io_port vector_latch;
124 io_port special;
125 int irq;
126 long clock;
Tao Baod7db5942015-01-28 10:07:51 -0800127 char option;
128 char brand;
129 char escc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700130};
Ben Cheng655a7c02013-10-16 16:09:24 -0700131struct scc_mem_config {
Tao Baod7db5942015-01-28 10:07:51 -0800132 unsigned int dummy;
133 unsigned int bufsize;
Ben Cheng655a7c02013-10-16 16:09:24 -0700134};
Ben Cheng655a7c02013-10-16 16:09:24 -0700135struct scc_calibrate {
Tao Baod7db5942015-01-28 10:07:51 -0800136 unsigned int time;
137 unsigned char pattern;
Ben Cheng655a7c02013-10-16 16:09:24 -0700138};
Ben Cheng655a7c02013-10-16 16:09:24 -0700139#endif