Go to the documentation of this file. 1 #ifndef __iop_timer_grp_defs_h
2 #define __iop_timer_grp_defs_h
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 )
90 unsigned int trig : 2;
91 unsigned int clk_gen_div : 8;
93 unsigned int dummy1 : 13;
95 #define REG_RD_ADDR_iop_timer_grp_rw_cfg 0
96 #define REG_WR_ADDR_iop_timer_grp_rw_cfg 0
100 unsigned int quota_lo : 15;
101 unsigned int quota_hi : 15;
102 unsigned int quota_hi_sel : 1;
103 unsigned int dummy1 : 1;
105 #define REG_RD_ADDR_iop_timer_grp_rw_half_period 4
106 #define REG_WR_ADDR_iop_timer_grp_rw_half_period 4
110 #define REG_RD_ADDR_iop_timer_grp_rw_half_period_len 8
111 #define REG_WR_ADDR_iop_timer_grp_rw_half_period_len 8
113 #define STRIDE_iop_timer_grp_rw_tmr_cfg 4
117 unsigned int strb : 2;
118 unsigned int run_mode : 2;
119 unsigned int out_mode : 1;
120 unsigned int active_on_tmr : 2;
121 unsigned int inv : 1;
122 unsigned int en_by_tmr : 2;
123 unsigned int dis_by_tmr : 2;
124 unsigned int en_only_by_reg : 1;
125 unsigned int dis_only_by_reg : 1;
126 unsigned int rst_at_en_strb : 1;
127 unsigned int dummy1 : 14;
129 #define REG_RD_ADDR_iop_timer_grp_rw_tmr_cfg 12
130 #define REG_WR_ADDR_iop_timer_grp_rw_tmr_cfg 12
132 #define STRIDE_iop_timer_grp_rw_tmr_len 4
136 unsigned int dummy1 : 16;
138 #define REG_RD_ADDR_iop_timer_grp_rw_tmr_len 44
139 #define REG_WR_ADDR_iop_timer_grp_rw_tmr_len 44
143 unsigned int rst : 4;
145 unsigned int dis : 4;
146 unsigned int strb : 4;
147 unsigned int dummy1 : 16;
149 #define REG_RD_ADDR_iop_timer_grp_rw_cmd 60
150 #define REG_WR_ADDR_iop_timer_grp_rw_cmd 60
154 #define REG_RD_ADDR_iop_timer_grp_r_clk_gen_cnt 64
156 #define STRIDE_iop_timer_grp_rs_tmr_cnt 8
160 unsigned int dummy1 : 16;
162 #define REG_RD_ADDR_iop_timer_grp_rs_tmr_cnt 68
164 #define STRIDE_iop_timer_grp_r_tmr_cnt 8
168 unsigned int dummy1 : 16;
170 #define REG_RD_ADDR_iop_timer_grp_r_tmr_cnt 72
174 unsigned int tmr0 : 1;
175 unsigned int tmr1 : 1;
176 unsigned int tmr2 : 1;
177 unsigned int tmr3 : 1;
178 unsigned int dummy1 : 28;
180 #define REG_RD_ADDR_iop_timer_grp_rw_intr_mask 100
181 #define REG_WR_ADDR_iop_timer_grp_rw_intr_mask 100
185 unsigned int tmr0 : 1;
186 unsigned int tmr1 : 1;
187 unsigned int tmr2 : 1;
188 unsigned int tmr3 : 1;
189 unsigned int dummy1 : 28;
191 #define REG_RD_ADDR_iop_timer_grp_rw_ack_intr 104
192 #define REG_WR_ADDR_iop_timer_grp_rw_ack_intr 104
196 unsigned int tmr0 : 1;
197 unsigned int tmr1 : 1;
198 unsigned int tmr2 : 1;
199 unsigned int tmr3 : 1;
200 unsigned int dummy1 : 28;
202 #define REG_RD_ADDR_iop_timer_grp_r_intr 108
206 unsigned int tmr0 : 1;
207 unsigned int tmr1 : 1;
208 unsigned int tmr2 : 1;
209 unsigned int tmr3 : 1;
210 unsigned int dummy1 : 28;
212 #define REG_RD_ADDR_iop_timer_grp_r_masked_intr 112