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 )
89 unsigned int base_freq : 3;
92 unsigned int par_en : 1;
93 unsigned int data_bits : 1;
96 unsigned int rts_delay : 3;
97 unsigned int rts_setup : 1;
98 unsigned int auto_rts : 1;
100 unsigned int auto_cts : 1;
101 unsigned int dummy1 : 15;
103 #define REG_RD_ADDR_ser_rw_tr_ctrl 0
104 #define REG_WR_ADDR_ser_rw_tr_ctrl 0
109 unsigned int dummy1 : 31;
111 #define REG_RD_ADDR_ser_rw_tr_dma_en 4
112 #define REG_WR_ADDR_ser_rw_tr_dma_en 4
116 unsigned int base_freq : 3;
118 unsigned int par : 2;
119 unsigned int par_en : 1;
120 unsigned int data_bits : 1;
122 unsigned int dma_err : 1;
123 unsigned int sampling : 1;
125 unsigned int auto_eop : 1;
126 unsigned int half_duplex : 1;
127 unsigned int rts_n : 1;
129 unsigned int dummy1 : 14;
131 #define REG_RD_ADDR_ser_rw_rec_ctrl 8
132 #define REG_WR_ADDR_ser_rw_rec_ctrl 8
137 unsigned int dummy1 : 16;
139 #define REG_RD_ADDR_ser_rw_tr_baud_div 12
140 #define REG_WR_ADDR_ser_rw_tr_baud_div 12
145 unsigned int dummy1 : 16;
147 #define REG_RD_ADDR_ser_rw_rec_baud_div 16
148 #define REG_WR_ADDR_ser_rw_rec_baud_div 16
152 unsigned int chr : 8;
154 unsigned int dummy1 : 23;
156 #define REG_RD_ADDR_ser_rw_xoff 20
157 #define REG_WR_ADDR_ser_rw_xoff 20
161 unsigned int clr : 1;
162 unsigned int dummy1 : 31;
164 #define REG_RD_ADDR_ser_rw_xoff_clr 24
165 #define REG_WR_ADDR_ser_rw_xoff_clr 24
170 unsigned int dummy1 : 24;
172 #define REG_RD_ADDR_ser_rw_dout 28
173 #define REG_WR_ADDR_ser_rw_dout 28
178 unsigned int dummy1 : 8;
179 unsigned int dav : 1;
180 unsigned int framing_err : 1;
181 unsigned int par_err : 1;
182 unsigned int orun : 1;
183 unsigned int rec_err : 1;
184 unsigned int rxd : 1;
185 unsigned int tr_idle : 1;
186 unsigned int tr_empty : 1;
187 unsigned int tr_rdy : 1;
188 unsigned int cts_n : 1;
189 unsigned int xoff_detect : 1;
190 unsigned int rts_n : 1;
191 unsigned int txd : 1;
192 unsigned int dummy2 : 3;
194 #define REG_RD_ADDR_ser_rs_stat_din 32
199 unsigned int dummy1 : 8;
200 unsigned int dav : 1;
201 unsigned int framing_err : 1;
202 unsigned int par_err : 1;
203 unsigned int orun : 1;
204 unsigned int rec_err : 1;
205 unsigned int rxd : 1;
206 unsigned int tr_idle : 1;
207 unsigned int tr_empty : 1;
208 unsigned int tr_rdy : 1;
209 unsigned int cts_n : 1;
210 unsigned int xoff_detect : 1;
211 unsigned int rts_n : 1;
212 unsigned int txd : 1;
213 unsigned int dummy2 : 3;
215 #define REG_RD_ADDR_ser_r_stat_din 36
219 unsigned int set : 1;
220 unsigned int dummy1 : 31;
222 #define REG_RD_ADDR_ser_rw_rec_eop 40
223 #define REG_WR_ADDR_ser_rw_rec_eop 40
227 unsigned int tr_rdy : 1;
228 unsigned int tr_empty : 1;
229 unsigned int tr_idle : 1;
230 unsigned int dav : 1;
231 unsigned int dummy1 : 28;
233 #define REG_RD_ADDR_ser_rw_intr_mask 44
234 #define REG_WR_ADDR_ser_rw_intr_mask 44
238 unsigned int tr_rdy : 1;
239 unsigned int tr_empty : 1;
240 unsigned int tr_idle : 1;
241 unsigned int dav : 1;
242 unsigned int dummy1 : 28;
244 #define REG_RD_ADDR_ser_rw_ack_intr 48
245 #define REG_WR_ADDR_ser_rw_ack_intr 48
249 unsigned int tr_rdy : 1;
250 unsigned int tr_empty : 1;
251 unsigned int tr_idle : 1;
252 unsigned int dav : 1;
253 unsigned int dummy1 : 28;
255 #define REG_RD_ADDR_ser_r_intr 52
259 unsigned int tr_rdy : 1;
260 unsigned int tr_empty : 1;
261 unsigned int tr_idle : 1;
262 unsigned int dav : 1;
263 unsigned int dummy1 : 28;
265 #define REG_RD_ADDR_ser_r_masked_intr 56