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 pio_hold : 6;
90 unsigned int pio_strb : 6;
91 unsigned int pio_setup : 6;
92 unsigned int dma_hold : 6;
93 unsigned int dma_strb : 6;
97 #define REG_RD_ADDR_ata_rw_ctrl0 12
98 #define REG_WR_ADDR_ata_rw_ctrl0 12
102 unsigned int udma_tcyc : 4;
103 unsigned int udma_tdvs : 4;
104 unsigned int dummy1 : 24;
106 #define REG_RD_ADDR_ata_rw_ctrl1 16
107 #define REG_WR_ADDR_ata_rw_ctrl1 16
112 unsigned int dummy1 : 3;
113 unsigned int dma_size : 1;
115 unsigned int hsh : 2;
116 unsigned int trf_mode : 1;
119 unsigned int cs0 : 1;
120 unsigned int cs1 : 1;
123 #define REG_RD_ADDR_ata_rw_ctrl2 0
124 #define REG_WR_ADDR_ata_rw_ctrl2 0
129 unsigned int dav : 1;
131 unsigned int dummy1 : 14;
133 #define REG_RD_ADDR_ata_rs_stat_data 4
138 unsigned int dav : 1;
140 unsigned int dummy1 : 14;
142 #define REG_RD_ADDR_ata_r_stat_data 8
147 unsigned int dummy1 : 15;
149 #define REG_RD_ADDR_ata_rw_trf_cnt 20
150 #define REG_WR_ADDR_ata_rw_trf_cnt 20
155 unsigned int dummy1 : 16;
157 #define REG_RD_ADDR_ata_r_stat_misc 24
161 unsigned int bus0 : 1;
162 unsigned int bus1 : 1;
163 unsigned int bus2 : 1;
164 unsigned int bus3 : 1;
165 unsigned int dummy1 : 28;
167 #define REG_RD_ADDR_ata_rw_intr_mask 28
168 #define REG_WR_ADDR_ata_rw_intr_mask 28
172 unsigned int bus0 : 1;
173 unsigned int bus1 : 1;
174 unsigned int bus2 : 1;
175 unsigned int bus3 : 1;
176 unsigned int dummy1 : 28;
178 #define REG_RD_ADDR_ata_rw_ack_intr 32
179 #define REG_WR_ADDR_ata_rw_ack_intr 32
183 unsigned int bus0 : 1;
184 unsigned int bus1 : 1;
185 unsigned int bus2 : 1;
186 unsigned int bus3 : 1;
187 unsigned int dummy1 : 28;
189 #define REG_RD_ADDR_ata_r_intr 36
193 unsigned int bus0 : 1;
194 unsigned int bus1 : 1;
195 unsigned int bus2 : 1;
196 unsigned int bus3 : 1;
197 unsigned int dummy1 : 28;
199 #define REG_RD_ADDR_ata_r_masked_intr 40