blob: a2a5503f112ac1f39e9da7010514467dcd819423 [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
Christopher Ferrisef80d682020-02-04 16:16:51 -080021#include <linux/sockios.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070022#define PA0HZP 0x00
23#define EAGLE 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define PC100 0x02
25#define PRIMUS 0x04
26#define DRSI 0x08
27#define BAYCOM 0x10
Ben Cheng655a7c02013-10-16 16:09:24 -070028enum SCC_ioctl_cmds {
Tao Baod7db5942015-01-28 10:07:51 -080029 SIOCSCCRESERVED = SIOCDEVPRIVATE,
30 SIOCSCCCFG,
31 SIOCSCCINI,
Tao Baod7db5942015-01-28 10:07:51 -080032 SIOCSCCCHANINI,
33 SIOCSCCSMEM,
34 SIOCSCCGKISS,
35 SIOCSCCSKISS,
Tao Baod7db5942015-01-28 10:07:51 -080036 SIOCSCCGSTAT,
37 SIOCSCCCAL
Ben Cheng655a7c02013-10-16 16:09:24 -070038};
39enum L1_params {
Tao Baod7db5942015-01-28 10:07:51 -080040 PARAM_DATA,
41 PARAM_TXDELAY,
42 PARAM_PERSIST,
43 PARAM_SLOTTIME,
Tao Baod7db5942015-01-28 10:07:51 -080044 PARAM_TXTAIL,
45 PARAM_FULLDUP,
46 PARAM_SOFTDCD,
47 PARAM_MUTE,
Tao Baod7db5942015-01-28 10:07:51 -080048 PARAM_DTR,
49 PARAM_RTS,
50 PARAM_SPEED,
51 PARAM_ENDDELAY,
Tao Baod7db5942015-01-28 10:07:51 -080052 PARAM_GROUP,
53 PARAM_IDLE,
54 PARAM_MIN,
55 PARAM_MAXKEY,
Tao Baod7db5942015-01-28 10:07:51 -080056 PARAM_WAIT,
57 PARAM_MAXDEFER,
58 PARAM_TX,
59 PARAM_HWEVENT = 31,
Tao Baod7db5942015-01-28 10:07:51 -080060 PARAM_RETURN = 255
Ben Cheng655a7c02013-10-16 16:09:24 -070061};
62enum FULLDUP_modes {
Tao Baod7db5942015-01-28 10:07:51 -080063 KISS_DUPLEX_HALF,
Tao Baod7db5942015-01-28 10:07:51 -080064 KISS_DUPLEX_FULL,
65 KISS_DUPLEX_LINK,
66 KISS_DUPLEX_OPTIMA
Ben Cheng655a7c02013-10-16 16:09:24 -070067};
Ben Cheng655a7c02013-10-16 16:09:24 -070068#define TIMER_OFF 65535U
69#define NO_SUCH_PARAM 65534U
70enum HWEVENT_opts {
Tao Baod7db5942015-01-28 10:07:51 -080071 HWEV_DCD_ON,
Tao Baod7db5942015-01-28 10:07:51 -080072 HWEV_DCD_OFF,
73 HWEV_ALL_SENT
Ben Cheng655a7c02013-10-16 16:09:24 -070074};
75#define RXGROUP 0100
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define TXGROUP 0200
77enum CLOCK_sources {
Tao Baod7db5942015-01-28 10:07:51 -080078 CLK_DPLL,
79 CLK_EXTERNAL,
Tao Baod7db5942015-01-28 10:07:51 -080080 CLK_DIVIDER,
81 CLK_BRG
Ben Cheng655a7c02013-10-16 16:09:24 -070082};
83enum TX_state {
Tao Baod7db5942015-01-28 10:07:51 -080084 TXS_IDLE,
85 TXS_BUSY,
86 TXS_ACTIVE,
87 TXS_NEWFRAME,
Tao Baod7db5942015-01-28 10:07:51 -080088 TXS_IDLE2,
89 TXS_WAIT,
90 TXS_TIMEOUT
Ben Cheng655a7c02013-10-16 16:09:24 -070091};
Ben Cheng655a7c02013-10-16 16:09:24 -070092typedef unsigned long io_port;
93struct scc_stat {
Tao Baod7db5942015-01-28 10:07:51 -080094 long rxints;
95 long txints;
Tao Baod7db5942015-01-28 10:07:51 -080096 long exints;
97 long spints;
98 long txframes;
99 long rxframes;
Tao Baod7db5942015-01-28 10:07:51 -0800100 long rxerrs;
101 long txerrs;
102 unsigned int nospace;
103 unsigned int rx_over;
Tao Baod7db5942015-01-28 10:07:51 -0800104 unsigned int tx_under;
105 unsigned int tx_state;
106 int tx_queued;
107 unsigned int maxqueue;
Tao Baod7db5942015-01-28 10:07:51 -0800108 unsigned int bufsize;
Ben Cheng655a7c02013-10-16 16:09:24 -0700109};
110struct scc_modem {
Tao Baod7db5942015-01-28 10:07:51 -0800111 long speed;
Tao Baod7db5942015-01-28 10:07:51 -0800112 char clocksrc;
113 char nrz;
Ben Cheng655a7c02013-10-16 16:09:24 -0700114};
115struct scc_kiss_cmd {
Tao Baod7db5942015-01-28 10:07:51 -0800116 int command;
117 unsigned param;
Ben Cheng655a7c02013-10-16 16:09:24 -0700118};
119struct scc_hw_config {
Tao Baod7db5942015-01-28 10:07:51 -0800120 io_port data_a;
121 io_port ctrl_a;
122 io_port data_b;
123 io_port ctrl_b;
Tao Baod7db5942015-01-28 10:07:51 -0800124 io_port vector_latch;
125 io_port special;
126 int irq;
127 long clock;
Tao Baod7db5942015-01-28 10:07:51 -0800128 char option;
129 char brand;
130 char escc;
Ben Cheng655a7c02013-10-16 16:09:24 -0700131};
Ben Cheng655a7c02013-10-16 16:09:24 -0700132struct scc_mem_config {
Tao Baod7db5942015-01-28 10:07:51 -0800133 unsigned int dummy;
134 unsigned int bufsize;
Ben Cheng655a7c02013-10-16 16:09:24 -0700135};
Ben Cheng655a7c02013-10-16 16:09:24 -0700136struct scc_calibrate {
Tao Baod7db5942015-01-28 10:07:51 -0800137 unsigned int time;
138 unsigned char pattern;
Ben Cheng655a7c02013-10-16 16:09:24 -0700139};
Ben Cheng655a7c02013-10-16 16:09:24 -0700140#endif