0001
0002
0003
0004 #ifndef _UAPI_SCC_H
0005 #define _UAPI_SCC_H
0006
0007 #include <linux/sockios.h>
0008
0009
0010
0011 #define PA0HZP 0x00
0012 #define EAGLE 0x01
0013 #define PC100 0x02
0014 #define PRIMUS 0x04
0015 #define DRSI 0x08
0016 #define BAYCOM 0x10
0017
0018
0019
0020 enum SCC_ioctl_cmds {
0021 SIOCSCCRESERVED = SIOCDEVPRIVATE,
0022 SIOCSCCCFG,
0023 SIOCSCCINI,
0024 SIOCSCCCHANINI,
0025 SIOCSCCSMEM,
0026 SIOCSCCGKISS,
0027 SIOCSCCSKISS,
0028 SIOCSCCGSTAT,
0029 SIOCSCCCAL
0030 };
0031
0032
0033
0034 enum L1_params {
0035 PARAM_DATA,
0036 PARAM_TXDELAY,
0037 PARAM_PERSIST,
0038 PARAM_SLOTTIME,
0039 PARAM_TXTAIL,
0040 PARAM_FULLDUP,
0041 PARAM_SOFTDCD,
0042 PARAM_MUTE,
0043 PARAM_DTR,
0044 PARAM_RTS,
0045 PARAM_SPEED,
0046 PARAM_ENDDELAY,
0047 PARAM_GROUP,
0048 PARAM_IDLE,
0049 PARAM_MIN,
0050 PARAM_MAXKEY,
0051 PARAM_WAIT,
0052 PARAM_MAXDEFER,
0053 PARAM_TX,
0054 PARAM_HWEVENT = 31,
0055 PARAM_RETURN = 255
0056 };
0057
0058
0059
0060 enum FULLDUP_modes {
0061 KISS_DUPLEX_HALF,
0062 KISS_DUPLEX_FULL,
0063 KISS_DUPLEX_LINK,
0064 KISS_DUPLEX_OPTIMA
0065 };
0066
0067
0068
0069 #define TIMER_OFF 65535U
0070 #define NO_SUCH_PARAM 65534U
0071
0072
0073
0074 enum HWEVENT_opts {
0075 HWEV_DCD_ON,
0076 HWEV_DCD_OFF,
0077 HWEV_ALL_SENT
0078 };
0079
0080
0081
0082 #define RXGROUP 0100
0083 #define TXGROUP 0200
0084
0085
0086
0087 enum CLOCK_sources {
0088 CLK_DPLL,
0089 CLK_EXTERNAL,
0090 CLK_DIVIDER,
0091
0092 CLK_BRG
0093
0094 };
0095
0096
0097
0098 enum TX_state {
0099 TXS_IDLE,
0100 TXS_BUSY,
0101 TXS_ACTIVE,
0102 TXS_NEWFRAME,
0103 TXS_IDLE2,
0104 TXS_WAIT,
0105 TXS_TIMEOUT
0106 };
0107
0108 typedef unsigned long io_port;
0109
0110
0111
0112 struct scc_stat {
0113 long rxints;
0114 long txints;
0115 long exints;
0116 long spints;
0117
0118 long txframes;
0119 long rxframes;
0120 long rxerrs;
0121 long txerrs;
0122
0123 unsigned int nospace;
0124 unsigned int rx_over;
0125 unsigned int tx_under;
0126
0127 unsigned int tx_state;
0128 int tx_queued;
0129
0130 unsigned int maxqueue;
0131 unsigned int bufsize;
0132 };
0133
0134 struct scc_modem {
0135 long speed;
0136 char clocksrc;
0137 char nrz;
0138 };
0139
0140 struct scc_kiss_cmd {
0141 int command;
0142 unsigned param;
0143 };
0144
0145 struct scc_hw_config {
0146 io_port data_a;
0147 io_port ctrl_a;
0148 io_port data_b;
0149 io_port ctrl_b;
0150 io_port vector_latch;
0151 io_port special;
0152
0153 int irq;
0154 long clock;
0155 char option;
0156
0157 char brand;
0158 char escc;
0159 };
0160
0161
0162
0163
0164 struct scc_mem_config {
0165 unsigned int dummy;
0166 unsigned int bufsize;
0167 };
0168
0169 struct scc_calibrate {
0170 unsigned int time;
0171 unsigned char pattern;
0172 };
0173
0174 #endif