1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #ifndef _UAPISDLA_H
25 #define _UAPISDLA_H
26
27
28 #define SDLA_TYPES
29 #define SDLA_S502A 5020
30 #define SDLA_S502E 5021
31 #define SDLA_S503 5030
32 #define SDLA_S507 5070
33 #define SDLA_S508 5080
34 #define SDLA_S509 5090
35 #define SDLA_UNKNOWN -1
36
37
38 #define SDLA_S508_PORT_V35 0x00
39 #define SDLA_S508_PORT_RS232 0x02
40
41
42 #define SDLA_CPU_3M 0x00
43 #define SDLA_CPU_5M 0x01
44 #define SDLA_CPU_7M 0x02
45 #define SDLA_CPU_8M 0x03
46 #define SDLA_CPU_10M 0x04
47 #define SDLA_CPU_16M 0x05
48 #define SDLA_CPU_12M 0x06
49
50
51 #define SDLA_IDENTIFY (FRAD_LAST_IOCTL + 1)
52 #define SDLA_CPUSPEED (FRAD_LAST_IOCTL + 2)
53 #define SDLA_PROTOCOL (FRAD_LAST_IOCTL + 3)
54
55 #define SDLA_CLEARMEM (FRAD_LAST_IOCTL + 4)
56 #define SDLA_WRITEMEM (FRAD_LAST_IOCTL + 5)
57 #define SDLA_READMEM (FRAD_LAST_IOCTL + 6)
58
59 struct sdla_mem {
60 int addr;
61 int len;
62 void __user *data;
63 };
64
65 #define SDLA_START (FRAD_LAST_IOCTL + 7)
66 #define SDLA_STOP (FRAD_LAST_IOCTL + 8)
67
68
69 #define SDLA_NMIADDR 0x0000
70 #define SDLA_CONF_ADDR 0x0010
71 #define SDLA_S502A_NMIADDR 0x0066
72 #define SDLA_CODE_BASEADDR 0x0100
73 #define SDLA_WINDOW_SIZE 0x2000
74 #define SDLA_ADDR_MASK 0x1FFF
75
76
77 #define SDLA_MAX_DATA 4080
78 #define SDLA_MAX_MTU 4072
79 #define SDLA_MAX_DLCI 24
80
81
82 struct sdla_conf {
83 short station;
84 short config;
85 short kbaud;
86 short clocking;
87 short max_frm;
88 short T391;
89 short T392;
90 short N391;
91 short N392;
92 short N393;
93 short CIR_fwd;
94 short Bc_fwd;
95 short Be_fwd;
96 short CIR_bwd;
97 short Bc_bwd;
98 short Be_bwd;
99 };
100
101
102 struct sdla_dlci_conf {
103 short config;
104 short CIR_fwd;
105 short Bc_fwd;
106 short Be_fwd;
107 short CIR_bwd;
108 short Bc_bwd;
109 short Be_bwd;
110 short Tc_fwd;
111 short Tc_bwd;
112 short Tf_max;
113 short Tb_max;
114 };
115
116
117 #endif