Go to the documentation of this file.
18 #define REG_RD( scope, inst, reg ) \
19 REG_READ( reg_##scope##_##reg, \
20 (inst) + REG_RD_ADDR_##scope##_##reg )
24 #define REG_WR( scope, inst, reg, val ) \
25 REG_WRITE( reg_##scope##_##reg, \
26 (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
30 #define REG_RD_VECT( scope, inst, reg, index ) \
31 REG_READ( reg_##scope##_##reg, \
32 (inst) + REG_RD_ADDR_##scope##_##reg + \
33 (index) * STRIDE_##scope##_##reg )
37 #define REG_WR_VECT( scope, inst, reg, index, val ) \
38 REG_WRITE( reg_##scope##_##reg, \
39 (inst) + REG_WR_ADDR_##scope##_##reg + \
40 (index) * STRIDE_##scope##_##reg, (val) )
44 #define REG_RD_INT( scope, inst, reg ) \
45 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg )
49 #define REG_WR_INT( scope, inst, reg, val ) \
50 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg, (val) )
53 #ifndef REG_RD_INT_VECT
54 #define REG_RD_INT_VECT( scope, inst, reg, index ) \
55 REG_READ( int, (inst) + REG_RD_ADDR_##scope##_##reg + \
56 (index) * STRIDE_##scope##_##reg )
59 #ifndef REG_WR_INT_VECT
60 #define REG_WR_INT_VECT( scope, inst, reg, index, val ) \
61 REG_WRITE( int, (inst) + REG_WR_ADDR_##scope##_##reg + \
62 (index) * STRIDE_##scope##_##reg, (val) )
66 #define REG_TYPE_CONV( type, orgtype, val ) \
67 ( { union { orgtype o; type n; } r; r.o = val; r.n; } )
71 #define reg_page_size 8192
75 #define REG_ADDR( scope, inst, reg ) \
76 ( (inst) + REG_RD_ADDR_##scope##_##reg )
80 #define REG_ADDR_VECT( scope, inst, reg, index ) \
81 ( (inst) + REG_RD_ADDR_##scope##_##reg + \
82 (index) * STRIDE_##scope##_##reg )
91 #define REG_RD_ADDR_eth_rw_ma0_lo 0
92 #define REG_WR_ADDR_eth_rw_ma0_lo 0
97 unsigned int dummy1 : 16;
99 #define REG_RD_ADDR_eth_rw_ma0_hi 4
100 #define REG_WR_ADDR_eth_rw_ma0_hi 4
106 #define REG_RD_ADDR_eth_rw_ma1_lo 8
107 #define REG_WR_ADDR_eth_rw_ma1_lo 8
112 unsigned int dummy1 : 16;
114 #define REG_RD_ADDR_eth_rw_ma1_hi 12
115 #define REG_WR_ADDR_eth_rw_ma1_hi 12
119 unsigned int tbl : 32;
121 #define REG_RD_ADDR_eth_rw_ga_lo 16
122 #define REG_WR_ADDR_eth_rw_ga_lo 16
126 unsigned int tbl : 32;
128 #define REG_RD_ADDR_eth_rw_ga_hi 20
129 #define REG_WR_ADDR_eth_rw_ga_hi 20
138 unsigned int gtxclk_out : 1;
139 unsigned int phyrst_n : 1;
140 unsigned int dummy1 : 24;
142 #define REG_RD_ADDR_eth_rw_gen_ctrl 24
143 #define REG_WR_ADDR_eth_rw_gen_ctrl 24
147 unsigned int ma0 : 1;
148 unsigned int ma1 : 1;
149 unsigned int individual : 1;
150 unsigned int broadcast : 1;
151 unsigned int undersize : 1;
152 unsigned int oversize : 1;
153 unsigned int bad_crc : 1;
156 unsigned int dummy1 : 8;
158 #define REG_RD_ADDR_eth_rw_rec_ctrl 28
159 #define REG_WR_ADDR_eth_rw_rec_ctrl 28
166 unsigned int ignore_col : 1;
168 unsigned int hsh_delay : 1;
169 unsigned int ignore_crs : 1;
170 unsigned int carrier_ext : 1;
171 unsigned int dummy1 : 24;
173 #define REG_RD_ADDR_eth_rw_tr_ctrl 32
174 #define REG_WR_ADDR_eth_rw_tr_ctrl 32
178 unsigned int clr : 1;
179 unsigned int dummy1 : 31;
181 #define REG_RD_ADDR_eth_rw_clr_err 36
182 #define REG_WR_ADDR_eth_rw_clr_err 36
186 unsigned int mdio : 1;
187 unsigned int mdoe : 1;
189 unsigned int dummy1 : 29;
191 #define REG_RD_ADDR_eth_rw_mgm_ctrl 40
192 #define REG_WR_ADDR_eth_rw_mgm_ctrl 40
196 unsigned int mdio : 1;
197 unsigned int exc_col : 1;
198 unsigned int urun : 1;
199 unsigned int clk_125 : 1;
200 unsigned int dummy1 : 28;
202 #define REG_RD_ADDR_eth_r_stat 44
206 unsigned int crc_err : 8;
207 unsigned int align_err : 8;
208 unsigned int oversize : 8;
209 unsigned int congestion : 8;
211 #define REG_RD_ADDR_eth_rs_rec_cnt 48
215 unsigned int crc_err : 8;
216 unsigned int align_err : 8;
217 unsigned int oversize : 8;
218 unsigned int congestion : 8;
220 #define REG_RD_ADDR_eth_r_rec_cnt 52
224 unsigned int single_col : 8;
225 unsigned int mult_col : 8;
226 unsigned int late_col : 8;
227 unsigned int deferred : 8;
229 #define REG_RD_ADDR_eth_rs_tr_cnt 56
233 unsigned int single_col : 8;
234 unsigned int mult_col : 8;
235 unsigned int late_col : 8;
236 unsigned int deferred : 8;
238 #define REG_RD_ADDR_eth_r_tr_cnt 60
242 unsigned int carrier_loss : 8;
243 unsigned int sqe_err : 8;
244 unsigned int dummy1 : 16;
246 #define REG_RD_ADDR_eth_rs_phy_cnt 64
250 unsigned int carrier_loss : 8;
251 unsigned int sqe_err : 8;
252 unsigned int dummy1 : 16;
254 #define REG_RD_ADDR_eth_r_phy_cnt 68
258 unsigned int snmp_inc : 1;
260 unsigned int backoff : 1;
261 unsigned int dummy1 : 29;
263 #define REG_RD_ADDR_eth_rw_test_ctrl 72
264 #define REG_WR_ADDR_eth_rw_test_ctrl 72
270 unsigned int oversize : 1;
271 unsigned int congestion : 1;
272 unsigned int single_col : 1;
273 unsigned int mult_col : 1;
274 unsigned int late_col : 1;
275 unsigned int deferred : 1;
276 unsigned int carrier_loss : 1;
277 unsigned int sqe_test_err : 1;
278 unsigned int orun : 1;
279 unsigned int urun : 1;
280 unsigned int exc_col : 1;
281 unsigned int mdio : 1;
282 unsigned int dummy1 : 18;
284 #define REG_RD_ADDR_eth_rw_intr_mask 76
285 #define REG_WR_ADDR_eth_rw_intr_mask 76
291 unsigned int oversize : 1;
292 unsigned int congestion : 1;
293 unsigned int single_col : 1;
294 unsigned int mult_col : 1;
295 unsigned int late_col : 1;
296 unsigned int deferred : 1;
297 unsigned int carrier_loss : 1;
298 unsigned int sqe_test_err : 1;
299 unsigned int orun : 1;
300 unsigned int urun : 1;
301 unsigned int exc_col : 1;
302 unsigned int mdio : 1;
303 unsigned int dummy1 : 18;
305 #define REG_RD_ADDR_eth_rw_ack_intr 80
306 #define REG_WR_ADDR_eth_rw_ack_intr 80
312 unsigned int oversize : 1;
313 unsigned int congestion : 1;
314 unsigned int single_col : 1;
315 unsigned int mult_col : 1;
316 unsigned int late_col : 1;
317 unsigned int deferred : 1;
318 unsigned int carrier_loss : 1;
319 unsigned int sqe_test_err : 1;
320 unsigned int orun : 1;
321 unsigned int urun : 1;
322 unsigned int exc_col : 1;
323 unsigned int mdio : 1;
324 unsigned int dummy1 : 18;
326 #define REG_RD_ADDR_eth_r_intr 84
332 unsigned int oversize : 1;
333 unsigned int congestion : 1;
334 unsigned int single_col : 1;
335 unsigned int mult_col : 1;
336 unsigned int late_col : 1;
337 unsigned int deferred : 1;
338 unsigned int carrier_loss : 1;
339 unsigned int sqe_test_err : 1;
340 unsigned int orun : 1;
341 unsigned int urun : 1;
342 unsigned int exc_col : 1;
343 unsigned int mdio : 1;
344 unsigned int dummy1 : 18;
346 #define REG_RD_ADDR_eth_r_masked_intr 88