Go to the documentation of this file.
6 #ifndef DRIVERS_ATM_uPD98401_H
7 #define DRIVERS_ATM_uPD98401_H
10 #define MAX_CRAM_SIZE (1 << 18)
11 #define RAM_INCREMENT 1024
13 #define uPD98401_PORTS 0x24
20 #define uPD98401_OPEN_CHAN 0x20000000
21 #define uPD98401_CHAN_ADDR 0x0003fff8
22 #define uPD98401_CHAN_ADDR_SHIFT 3
23 #define uPD98401_CLOSE_CHAN 0x24000000
24 #define uPD98401_CHAN_RT 0x02000000
25 #define uPD98401_DEACT_CHAN 0x28000000
26 #define uPD98401_TX_READY 0x30000000
27 #define uPD98401_ADD_BAT 0x34000000
28 #define uPD98401_POOL 0x000f0000
29 #define uPD98401_POOL_SHIFT 16
30 #define uPD98401_POOL_NUMBAT 0x0000ffff
31 #define uPD98401_NOP 0x3f000000
32 #define uPD98401_IND_ACC 0x00000000
33 #define uPD98401_IA_RW 0x10000000
34 #define uPD98401_IA_B3 0x08000000
35 #define uPD98401_IA_B2 0x04000000
36 #define uPD98401_IA_B1 0x02000000
37 #define uPD98401_IA_B0 0x01000000
38 #define uPD98401_IA_BALL 0x0f000000
39 #define uPD98401_IA_TGT 0x000c0000
40 #define uPD98401_IA_TGT_SHIFT 18
41 #define uPD98401_IA_TGT_CM 0
42 #define uPD98401_IA_TGT_SAR 1
43 #define uPD98401_IA_TGT_PHY 3
44 #define uPD98401_IA_ADDR 0x0003ffff
50 #define uPD98401_BUSY 0x80000000
51 #define uPD98401_LOCKED 0x40000000
58 #define uPD98401_AAL5_UINFO 0xffff0000
59 #define uPD98401_AAL5_UINFO_SHIFT 16
60 #define uPD98401_AAL5_SIZE 0x0000ffff
61 #define uPD98401_AAL5_CHAN 0x7fff0000
62 #define uPD98401_AAL5_CHAN_SHIFT 16
63 #define uPD98401_AAL5_ERR 0x00008000
64 #define uPD98401_AAL5_CI 0x00004000
65 #define uPD98401_AAL5_CLP 0x00002000
66 #define uPD98401_AAL5_ES 0x00000f00
67 #define uPD98401_AAL5_ES_SHIFT 8
68 #define uPD98401_AAL5_ES_NONE 0
69 #define uPD98401_AAL5_ES_FREE 1
70 #define uPD98401_AAL5_ES_FIFO 2
71 #define uPD98401_AAL5_ES_TOOBIG 3
72 #define uPD98401_AAL5_ES_CRC 4
73 #define uPD98401_AAL5_ES_ABORT 5
74 #define uPD98401_AAL5_ES_LENGTH 6
75 #define uPD98401_AAL5_ES_T1 7
76 #define uPD98401_AAL5_ES_DEACT 8
77 #define uPD98401_AAL5_POOL 0x0000001f
80 #define uPD98401_RAW_UINFO uPD98401_AAL5_UINFO
81 #define uPD98401_RAW_UINFO_SHIFT uPD98401_AAL5_UINFO_SHIFT
82 #define uPD98401_RAW_HEC 0x000000ff
83 #define uPD98401_RAW_CHAN uPD98401_AAL5_CHAN
84 #define uPD98401_RAW_CHAN_SHIFT uPD98401_AAL5_CHAN_SHIFT
87 #define uPD98401_TXI_CONN 0x7fff0000
88 #define uPD98401_TXI_CONN_SHIFT 16
89 #define uPD98401_TXI_ACTIVE 0x00008000
90 #define uPD98401_TXI_PQP 0x00007fff
96 #define uPD98401_GMR 0x00
97 #define uPD98401_GSR 0x01
98 #define uPD98401_IMR 0x02
99 #define uPD98401_RQU 0x03
100 #define uPD98401_RQA 0x04
101 #define uPD98401_ADDR 0x05
102 #define uPD98401_VER 0x06
103 #define uPD98401_SWR 0x07
104 #define uPD98401_CMR 0x08
105 #define uPD98401_CMR_L 0x09
106 #define uPD98401_CER 0x0a
107 #define uPD98401_CER_L 0x0b
109 #define uPD98401_MSH(n) (0x10+(n))
110 #define uPD98401_MSL(n) (0x14+(n))
111 #define uPD98401_MBA(n) (0x18+(n))
112 #define uPD98401_MTA(n) (0x1c+(n))
113 #define uPD98401_MWA(n) (0x20+(n))
116 #define uPD98401_GMR_ONE 0x80000000
117 #define uPD98401_GMR_SLM 0x40000000
118 #define uPD98401_GMR_CPE 0x00008000
119 #define uPD98401_GMR_LP 0x00004000
120 #define uPD98401_GMR_WA 0x00002000
121 #define uPD98401_GMR_RA 0x00001000
122 #define uPD98401_GMR_SZ 0x00000f00
123 #define uPD98401_BURST16 0x00000800
124 #define uPD98401_BURST8 0x00000400
125 #define uPD98401_BURST4 0x00000200
126 #define uPD98401_BURST2 0x00000100
127 #define uPD98401_GMR_AD 0x00000080
128 #define uPD98401_GMR_BO 0x00000040
129 #define uPD98401_GMR_PM 0x00000020
130 #define uPD98401_GMR_PC 0x00000010
131 #define uPD98401_GMR_BPE 0x00000008
132 #define uPD98401_GMR_DR 0x00000004
133 #define uPD98401_GMR_SE 0x00000002
134 #define uPD98401_GMR_RE 0x00000001
137 #define uPD98401_INT_PI 0x80000000
138 #define uPD98401_INT_RQA 0x40000000
139 #define uPD98401_INT_RQU 0x20000000
140 #define uPD98401_INT_RD 0x10000000
141 #define uPD98401_INT_SPE 0x08000000
142 #define uPD98401_INT_CPE 0x04000000
143 #define uPD98401_INT_SBE 0x02000000
144 #define uPD98401_INT_IND 0x01000000
145 #define uPD98401_INT_RCR 0x0000ff00
146 #define uPD98401_INT_RCR_SHIFT 8
147 #define uPD98401_INT_MF 0x000000f0
148 #define uPD98401_INT_MF_SHIFT 4
149 #define uPD98401_INT_MM 0x0000000f
152 #define uPD98401_MAJOR 0x0000ff00
153 #define uPD98401_MAJOR_SHIFT 8
154 #define uPD98401_MINOR 0x000000ff
160 #define uPD98401_IM(n) (0x40000+(n))
161 #define uPD98401_X(n) (0x40010+(n))
162 #define uPD98401_Y(n) (0x40020+(n))
163 #define uPD98401_PC(n) (0x40030+(n))
164 #define uPD98401_PS(n) (0x40040+(n))
167 #define uPD98401_IM_I 0xff000000
168 #define uPD98401_IM_I_SHIFT 24
169 #define uPD98401_IM_M 0x00ffffff
172 #define uPD98401_PC_P 0xff000000
173 #define uPD98401_PC_P_SHIFT 24
174 #define uPD98401_PC_C 0x00ff0000
175 #define uPD98401_PC_C_SHIFT 16
176 #define uPD98401_PC_p 0x0000ff00
177 #define uPD98401_PC_p_SHIFT 8
178 #define uPD98401_PC_c 0x000000ff
181 #define uPD98401_PS_PRIO 0xf0
182 #define uPD98401_PS_PRIO_SHIFT 4
183 #define uPD98401_PS_S 0x08
184 #define uPD98401_PS_R 0x04
185 #define uPD98401_PS_A 0x02
186 #define uPD98401_PS_E 0x01
188 #define uPD98401_TOS 0x40100
189 #define uPD98401_SMA 0x40200
190 #define uPD98401_PMA 0x40201
191 #define uPD98401_T1R 0x40300
192 #define uPD98401_VRR 0x40301
193 #define uPD98401_TSR 0x40302
196 #define uPD98401_VRR_SDM 0x80000000
197 #define uPD98401_VRR_SHIFT 0x000f0000
198 #define uPD98401_VRR_SHIFT_SHIFT 16
199 #define uPD98401_VRR_MASK 0x0000ffff
205 #define uPD98401_TXPD_SIZE 16
207 #define uPD98401_TXPD_V 0x80000000
208 #define uPD98401_TXPD_DP 0x40000000
209 #define uPD98401_TXPD_SM 0x20000000
210 #define uPD98401_TXPD_CLPM 0x18000000
211 #define uPD98401_CLPM_0 0
212 #define uPD98401_CLPM_1 3
213 #define uPD98401_CLPM_LAST 1
214 #define uPD98401_TXPD_CLPM_SHIFT 27
215 #define uPD98401_TXPD_PTI 0x07000000
216 #define uPD98401_TXPD_PTI_SHIFT 24
217 #define uPD98401_TXPD_GFC 0x00f00000
218 #define uPD98401_TXPD_GFC_SHIFT 20
219 #define uPD98401_TXPD_C10 0x00040000
220 #define uPD98401_TXPD_AAL5 0x00020000
221 #define uPD98401_TXPD_MB 0x00010000
222 #define uPD98401_TXPD_UU 0x0000ff00
223 #define uPD98401_TXPD_UU_SHIFT 8
224 #define uPD98401_TXPD_CPI 0x000000ff
230 #define uPD98401_TXBD_SIZE 8
232 #define uPD98401_TXBD_LAST 0x80000000
239 #define uPD98401_TXVC_L 0x80000000
240 #define uPD98401_TXVC_SHP 0x0f000000
241 #define uPD98401_TXVC_SHP_SHIFT 24
242 #define uPD98401_TXVC_VPI 0x00ff0000
243 #define uPD98401_TXVC_VPI_SHIFT 16
244 #define uPD98401_TXVC_VCI 0x0000ffff
245 #define uPD98401_TXVC_QRP 6
251 #define uPD98401_RXFP_ALERT 0x70000000
252 #define uPD98401_RXFP_ALERT_SHIFT 28
253 #define uPD98401_RXFP_BFSZ 0x0f000000
254 #define uPD98401_RXFP_BFSZ_SHIFT 24
255 #define uPD98401_RXFP_BTSZ 0x00ff0000
256 #define uPD98401_RXFP_BTSZ_SHIFT 16
257 #define uPD98401_RXFP_REMAIN 0x0000ffff
263 #define uPD98401_RXVC_BTSZ 0xff000000
264 #define uPD98401_RXVC_BTSZ_SHIFT 24
265 #define uPD98401_RXVC_MB 0x00200000
266 #define uPD98401_RXVC_POOL 0x001f0000
267 #define uPD98401_RXVC_POOL_SHIFT 16
268 #define uPD98401_RXVC_UINFO 0x0000ffff
269 #define uPD98401_RXVC_T1 0xffff0000
270 #define uPD98401_RXVC_T1_SHIFT 16
271 #define uPD98401_RXVC_PR 0x00008000
272 #define uPD98401_RXVC_DR 0x00004000
273 #define uPD98401_RXVC_OD 0x00001000
274 #define uPD98401_RXVC_AR 0x00000800
275 #define uPD98401_RXVC_MAXSEG 0x000007ff
276 #define uPD98401_RXVC_REM 0xfffe0000
277 #define uPD98401_RXVC_REM_SHIFT 17
278 #define uPD98401_RXVC_CLP 0x00010000
279 #define uPD98401_RXVC_BFA 0x00008000
280 #define uPD98401_RXVC_BTA 0x00004000
281 #define uPD98401_RXVC_CI 0x00002000
282 #define uPD98401_RXVC_DD 0x00001000
283 #define uPD98401_RXVC_DP 0x00000800
284 #define uPD98401_RXVC_CURSEG 0x000007ff
290 #define uPD98401_RXLT_ENBL 0x8000