diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2005-09-06 18:19:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:53 -0400 |
commit | aac51f09d96a0acfb73c1d1c0796358bb47ea07b (patch) | |
tree | 46fcabaac554971b8efb7f069a0a1a1cc29ed239 /drivers/video/w100fb.h | |
parent | 8cc3c7af42aa826d413e3134628d85f3920457d8 (diff) |
[PATCH] w100fb: Rewrite for platform independence
The code w100fb was based on was horribly Sharp SL-C7x0 specific and there
was little else that could be done as I had no access to anything else with
a w100 in it. There is no real documentation about this chipset available.
Ian Molton has access to other platforms with the w100 (Toshiba e-series)
and so between us, we've improved w100fb and made it platform independent.
Ian Molton also added support for the very similar w3220 and w3200
chipsets.
There are a lot of changes here and it nearly amounts to a rewrite of the
driver but it has been extensively tested and is being used in preference
to the original driver in the Zaurus community. I'd therefore like to
update the mainline code to reflect this.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/w100fb.h')
-rw-r--r-- | drivers/video/w100fb.h | 777 |
1 files changed, 466 insertions, 311 deletions
diff --git a/drivers/video/w100fb.h b/drivers/video/w100fb.h index 41624f961237..7a58a1e3e427 100644 --- a/drivers/video/w100fb.h +++ b/drivers/video/w100fb.h | |||
@@ -5,9 +5,12 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2002, ATI Corp. | 6 | * Copyright (C) 2002, ATI Corp. |
7 | * Copyright (C) 2004-2005 Richard Purdie | 7 | * Copyright (C) 2004-2005 Richard Purdie |
8 | * Copyright (c) 2005 Ian Molton <spyro@f2s.com> | ||
8 | * | 9 | * |
9 | * Modified to work with 2.6 by Richard Purdie <rpurdie@rpsys.net> | 10 | * Modified to work with 2.6 by Richard Purdie <rpurdie@rpsys.net> |
10 | * | 11 | * |
12 | * w32xx support by Ian Molton | ||
13 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | 14 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License version 2 as | 15 | * it under the terms of the GNU General Public License version 2 as |
13 | * published by the Free Software Foundation. | 16 | * published by the Free Software Foundation. |
@@ -19,7 +22,7 @@ | |||
19 | 22 | ||
20 | /* Block CIF Start: */ | 23 | /* Block CIF Start: */ |
21 | #define mmCHIP_ID 0x0000 | 24 | #define mmCHIP_ID 0x0000 |
22 | #define mmREVISION_ID 0x0004 | 25 | #define mmREVISION_ID 0x0004 |
23 | #define mmWRAP_BUF_A 0x0008 | 26 | #define mmWRAP_BUF_A 0x0008 |
24 | #define mmWRAP_BUF_B 0x000C | 27 | #define mmWRAP_BUF_B 0x000C |
25 | #define mmWRAP_TOP_DIR 0x0010 | 28 | #define mmWRAP_TOP_DIR 0x0010 |
@@ -88,7 +91,7 @@ | |||
88 | #define mmDISP_DEBUG 0x04D4 | 91 | #define mmDISP_DEBUG 0x04D4 |
89 | #define mmDISP_DB_BUF_CNTL 0x04D8 | 92 | #define mmDISP_DB_BUF_CNTL 0x04D8 |
90 | #define mmDISP_CRC_SIG 0x04DC | 93 | #define mmDISP_CRC_SIG 0x04DC |
91 | #define mmCRTC_DEFAULT_COUNT 0x04E0 | 94 | #define mmCRTC_DEFAULT_COUNT 0x04E0 |
92 | #define mmLCD_BACKGROUND_COLOR 0x04E4 | 95 | #define mmLCD_BACKGROUND_COLOR 0x04E4 |
93 | #define mmCRTC_PS2 0x04E8 | 96 | #define mmCRTC_PS2 0x04E8 |
94 | #define mmCRTC_PS2_VPOS 0x04EC | 97 | #define mmCRTC_PS2_VPOS 0x04EC |
@@ -119,17 +122,17 @@ | |||
119 | /* Block DISPLAY End: */ | 122 | /* Block DISPLAY End: */ |
120 | 123 | ||
121 | /* Block GFX Start: */ | 124 | /* Block GFX Start: */ |
122 | #define mmBRUSH_OFFSET 0x108C | 125 | #define mmBRUSH_OFFSET 0x108C |
123 | #define mmBRUSH_Y_X 0x1074 | 126 | #define mmBRUSH_Y_X 0x1074 |
124 | #define mmDEFAULT_PITCH_OFFSET 0x10A0 | 127 | #define mmDEFAULT_PITCH_OFFSET 0x10A0 |
125 | #define mmDEFAULT_SC_BOTTOM_RIGHT 0x10A8 | 128 | #define mmDEFAULT_SC_BOTTOM_RIGHT 0x10A8 |
126 | #define mmDEFAULT2_SC_BOTTOM_RIGHT 0x10AC | 129 | #define mmDEFAULT2_SC_BOTTOM_RIGHT 0x10AC |
127 | #define mmGLOBAL_ALPHA 0x1210 | 130 | #define mmGLOBAL_ALPHA 0x1210 |
128 | #define mmFILTER_COEF 0x1214 | 131 | #define mmFILTER_COEF 0x1214 |
129 | #define mmMVC_CNTL_START 0x11E0 | 132 | #define mmMVC_CNTL_START 0x11E0 |
130 | #define mmE2_ARITHMETIC_CNTL 0x1220 | 133 | #define mmE2_ARITHMETIC_CNTL 0x1220 |
131 | #define mmENG_CNTL 0x13E8 | 134 | #define mmENG_CNTL 0x13E8 |
132 | #define mmENG_PERF_CNT 0x13F0 | 135 | #define mmENG_PERF_CNT 0x13F0 |
133 | /* Block GFX End: */ | 136 | /* Block GFX End: */ |
134 | 137 | ||
135 | /* Block IDCT Start: */ | 138 | /* Block IDCT Start: */ |
@@ -141,22 +144,38 @@ | |||
141 | /* Block IDCT End: */ | 144 | /* Block IDCT End: */ |
142 | 145 | ||
143 | /* Block MC Start: */ | 146 | /* Block MC Start: */ |
144 | #define mmMEM_CNTL 0x0180 | 147 | #define mmMEM_CNTL 0x0180 |
145 | #define mmMEM_ARB 0x0184 | 148 | #define mmMEM_ARB 0x0184 |
146 | #define mmMC_FB_LOCATION 0x0188 | 149 | #define mmMC_FB_LOCATION 0x0188 |
147 | #define mmMEM_EXT_CNTL 0x018C | 150 | #define mmMEM_EXT_CNTL 0x018C |
148 | #define mmMC_EXT_MEM_LOCATION 0x0190 | 151 | #define mmMC_EXT_MEM_LOCATION 0x0190 |
149 | #define mmMEM_EXT_TIMING_CNTL 0x0194 | 152 | #define mmMEM_EXT_TIMING_CNTL 0x0194 |
150 | #define mmMEM_SDRAM_MODE_REG 0x0198 | 153 | #define mmMEM_SDRAM_MODE_REG 0x0198 |
151 | #define mmMEM_IO_CNTL 0x019C | 154 | #define mmMEM_IO_CNTL 0x019C |
152 | #define mmMC_DEBUG 0x01A0 | 155 | #define mmMC_DEBUG 0x01A0 |
153 | #define mmMC_BIST_CTRL 0x01A4 | 156 | #define mmMC_BIST_CTRL 0x01A4 |
154 | #define mmMC_BIST_COLLAR_READ 0x01A8 | 157 | #define mmMC_BIST_COLLAR_READ 0x01A8 |
155 | #define mmTC_MISMATCH 0x01AC | 158 | #define mmTC_MISMATCH 0x01AC |
156 | #define mmMC_PERF_MON_CNTL 0x01B0 | 159 | #define mmMC_PERF_MON_CNTL 0x01B0 |
157 | #define mmMC_PERF_COUNTERS 0x01B4 | 160 | #define mmMC_PERF_COUNTERS 0x01B4 |
158 | /* Block MC End: */ | 161 | /* Block MC End: */ |
159 | 162 | ||
163 | /* Block BM Start: */ | ||
164 | #define mmBM_EXT_MEM_BANDWIDTH 0x0A00 | ||
165 | #define mmBM_OFFSET 0x0A04 | ||
166 | #define mmBM_MEM_EXT_TIMING_CNTL 0x0A08 | ||
167 | #define mmBM_MEM_EXT_CNTL 0x0A0C | ||
168 | #define mmBM_MEM_MODE_REG 0x0A10 | ||
169 | #define mmBM_MEM_IO_CNTL 0x0A18 | ||
170 | #define mmBM_CONFIG 0x0A1C | ||
171 | #define mmBM_STATUS 0x0A20 | ||
172 | #define mmBM_DEBUG 0x0A24 | ||
173 | #define mmBM_PERF_MON_CNTL 0x0A28 | ||
174 | #define mmBM_PERF_COUNTERS 0x0A2C | ||
175 | #define mmBM_PERF2_MON_CNTL 0x0A30 | ||
176 | #define mmBM_PERF2_COUNTERS 0x0A34 | ||
177 | /* Block BM End: */ | ||
178 | |||
160 | /* Block RBBM Start: */ | 179 | /* Block RBBM Start: */ |
161 | #define mmWAIT_UNTIL 0x1400 | 180 | #define mmWAIT_UNTIL 0x1400 |
162 | #define mmISYNC_CNTL 0x1404 | 181 | #define mmISYNC_CNTL 0x1404 |
@@ -176,439 +195,575 @@ | |||
176 | /* Block CG End: */ | 195 | /* Block CG End: */ |
177 | 196 | ||
178 | /* default value definitions */ | 197 | /* default value definitions */ |
179 | #define defWRAP_TOP_DIR 0x00000000 | 198 | #define defWRAP_TOP_DIR 0x00000000 |
180 | #define defWRAP_START_DIR 0x00000000 | 199 | #define defWRAP_START_DIR 0x00000000 |
181 | #define defCFGREG_BASE 0x00000000 | 200 | #define defCFGREG_BASE 0x00000000 |
182 | #define defCIF_IO 0x000C0902 | 201 | #define defCIF_IO 0x000C0902 |
183 | #define defINTF_CNTL 0x00000011 | 202 | #define defINTF_CNTL 0x00000011 |
184 | #define defCPU_DEFAULTS 0x00000006 | 203 | #define defCPU_DEFAULTS 0x00000006 |
185 | #define defHW_INT 0x00000000 | 204 | #define defHW_INT 0x00000000 |
186 | #define defMC_EXT_MEM_LOCATION 0x07ff0000 | 205 | #define defMC_EXT_MEM_LOCATION 0x07ff0000 |
187 | #define defTC_MISMATCH 0x00000000 | 206 | #define defTC_MISMATCH 0x00000000 |
188 | 207 | ||
189 | #define W100_CFG_BASE 0x0 | 208 | #define W100_CFG_BASE 0x0 |
190 | #define W100_CFG_LEN 0x10 | 209 | #define W100_CFG_LEN 0x10 |
191 | #define W100_REG_BASE 0x10000 | 210 | #define W100_REG_BASE 0x10000 |
192 | #define W100_REG_LEN 0x2000 | 211 | #define W100_REG_LEN 0x2000 |
193 | #define MEM_INT_BASE_VALUE 0x100000 | 212 | #define MEM_INT_BASE_VALUE 0x100000 |
194 | #define MEM_INT_TOP_VALUE_W100 0x15ffff | ||
195 | #define MEM_EXT_BASE_VALUE 0x800000 | 213 | #define MEM_EXT_BASE_VALUE 0x800000 |
196 | #define MEM_EXT_TOP_VALUE 0x9fffff | 214 | #define MEM_INT_SIZE 0x05ffff |
215 | #define MEM_WINDOW_BASE 0x100000 | ||
216 | #define MEM_WINDOW_SIZE 0xf00000 | ||
217 | |||
197 | #define WRAP_BUF_BASE_VALUE 0x80000 | 218 | #define WRAP_BUF_BASE_VALUE 0x80000 |
198 | #define WRAP_BUF_TOP_VALUE 0xbffff | 219 | #define WRAP_BUF_TOP_VALUE 0xbffff |
199 | 220 | ||
221 | #define CHIP_ID_W100 0x57411002 | ||
222 | #define CHIP_ID_W3200 0x56441002 | ||
223 | #define CHIP_ID_W3220 0x57441002 | ||
200 | 224 | ||
201 | /* data structure definitions */ | 225 | /* Register structure definitions */ |
202 | 226 | ||
203 | struct wrap_top_dir_t { | 227 | struct wrap_top_dir_t { |
204 | unsigned long top_addr : 23; | 228 | unsigned long top_addr : 23; |
205 | unsigned long : 9; | 229 | unsigned long : 9; |
206 | } __attribute__((packed)); | 230 | } __attribute__((packed)); |
207 | 231 | ||
208 | union wrap_top_dir_u { | 232 | union wrap_top_dir_u { |
209 | unsigned long val : 32; | 233 | unsigned long val : 32; |
210 | struct wrap_top_dir_t f; | 234 | struct wrap_top_dir_t f; |
211 | } __attribute__((packed)); | 235 | } __attribute__((packed)); |
212 | 236 | ||
213 | struct wrap_start_dir_t { | 237 | struct wrap_start_dir_t { |
214 | unsigned long start_addr : 23; | 238 | unsigned long start_addr : 23; |
215 | unsigned long : 9; | 239 | unsigned long : 9; |
216 | } __attribute__((packed)); | 240 | } __attribute__((packed)); |
217 | 241 | ||
218 | union wrap_start_dir_u { | 242 | union wrap_start_dir_u { |
219 | unsigned long val : 32; | 243 | unsigned long val : 32; |
220 | struct wrap_start_dir_t f; | 244 | struct wrap_start_dir_t f; |
221 | } __attribute__((packed)); | 245 | } __attribute__((packed)); |
222 | 246 | ||
223 | struct cif_cntl_t { | 247 | struct cif_cntl_t { |
224 | unsigned long swap_reg : 2; | 248 | unsigned long swap_reg : 2; |
225 | unsigned long swap_fbuf_1 : 2; | 249 | unsigned long swap_fbuf_1 : 2; |
226 | unsigned long swap_fbuf_2 : 2; | 250 | unsigned long swap_fbuf_2 : 2; |
227 | unsigned long swap_fbuf_3 : 2; | 251 | unsigned long swap_fbuf_3 : 2; |
228 | unsigned long pmi_int_disable : 1; | 252 | unsigned long pmi_int_disable : 1; |
229 | unsigned long pmi_schmen_disable : 1; | 253 | unsigned long pmi_schmen_disable : 1; |
230 | unsigned long intb_oe : 1; | 254 | unsigned long intb_oe : 1; |
231 | unsigned long en_wait_to_compensate_dq_prop_dly : 1; | 255 | unsigned long en_wait_to_compensate_dq_prop_dly : 1; |
232 | unsigned long compensate_wait_rd_size : 2; | 256 | unsigned long compensate_wait_rd_size : 2; |
233 | unsigned long wait_asserted_timeout_val : 2; | 257 | unsigned long wait_asserted_timeout_val : 2; |
234 | unsigned long wait_masked_val : 2; | 258 | unsigned long wait_masked_val : 2; |
235 | unsigned long en_wait_timeout : 1; | 259 | unsigned long en_wait_timeout : 1; |
236 | unsigned long en_one_clk_setup_before_wait : 1; | 260 | unsigned long en_one_clk_setup_before_wait : 1; |
237 | unsigned long interrupt_active_high : 1; | 261 | unsigned long interrupt_active_high : 1; |
238 | unsigned long en_overwrite_straps : 1; | 262 | unsigned long en_overwrite_straps : 1; |
239 | unsigned long strap_wait_active_hi : 1; | 263 | unsigned long strap_wait_active_hi : 1; |
240 | unsigned long lat_busy_count : 2; | 264 | unsigned long lat_busy_count : 2; |
241 | unsigned long lat_rd_pm4_sclk_busy : 1; | 265 | unsigned long lat_rd_pm4_sclk_busy : 1; |
242 | unsigned long dis_system_bits : 1; | 266 | unsigned long dis_system_bits : 1; |
243 | unsigned long dis_mr : 1; | 267 | unsigned long dis_mr : 1; |
244 | unsigned long cif_spare_1 : 4; | 268 | unsigned long cif_spare_1 : 4; |
245 | } __attribute__((packed)); | 269 | } __attribute__((packed)); |
246 | 270 | ||
247 | union cif_cntl_u { | 271 | union cif_cntl_u { |
248 | unsigned long val : 32; | 272 | unsigned long val : 32; |
249 | struct cif_cntl_t f; | 273 | struct cif_cntl_t f; |
250 | } __attribute__((packed)); | 274 | } __attribute__((packed)); |
251 | 275 | ||
252 | struct cfgreg_base_t { | 276 | struct cfgreg_base_t { |
253 | unsigned long cfgreg_base : 24; | 277 | unsigned long cfgreg_base : 24; |
254 | unsigned long : 8; | 278 | unsigned long : 8; |
255 | } __attribute__((packed)); | 279 | } __attribute__((packed)); |
256 | 280 | ||
257 | union cfgreg_base_u { | 281 | union cfgreg_base_u { |
258 | unsigned long val : 32; | 282 | unsigned long val : 32; |
259 | struct cfgreg_base_t f; | 283 | struct cfgreg_base_t f; |
260 | } __attribute__((packed)); | 284 | } __attribute__((packed)); |
261 | 285 | ||
262 | struct cif_io_t { | 286 | struct cif_io_t { |
263 | unsigned long dq_srp : 1; | 287 | unsigned long dq_srp : 1; |
264 | unsigned long dq_srn : 1; | 288 | unsigned long dq_srn : 1; |
265 | unsigned long dq_sp : 4; | 289 | unsigned long dq_sp : 4; |
266 | unsigned long dq_sn : 4; | 290 | unsigned long dq_sn : 4; |
267 | unsigned long waitb_srp : 1; | 291 | unsigned long waitb_srp : 1; |
268 | unsigned long waitb_srn : 1; | 292 | unsigned long waitb_srn : 1; |
269 | unsigned long waitb_sp : 4; | 293 | unsigned long waitb_sp : 4; |
270 | unsigned long waitb_sn : 4; | 294 | unsigned long waitb_sn : 4; |
271 | unsigned long intb_srp : 1; | 295 | unsigned long intb_srp : 1; |
272 | unsigned long intb_srn : 1; | 296 | unsigned long intb_srn : 1; |
273 | unsigned long intb_sp : 4; | 297 | unsigned long intb_sp : 4; |
274 | unsigned long intb_sn : 4; | 298 | unsigned long intb_sn : 4; |
275 | unsigned long : 2; | 299 | unsigned long : 2; |
276 | } __attribute__((packed)); | 300 | } __attribute__((packed)); |
277 | 301 | ||
278 | union cif_io_u { | 302 | union cif_io_u { |
279 | unsigned long val : 32; | 303 | unsigned long val : 32; |
280 | struct cif_io_t f; | 304 | struct cif_io_t f; |
281 | } __attribute__((packed)); | 305 | } __attribute__((packed)); |
282 | 306 | ||
283 | struct cif_read_dbg_t { | 307 | struct cif_read_dbg_t { |
284 | unsigned long unpacker_pre_fetch_trig_gen : 2; | 308 | unsigned long unpacker_pre_fetch_trig_gen : 2; |
285 | unsigned long dly_second_rd_fetch_trig : 1; | 309 | unsigned long dly_second_rd_fetch_trig : 1; |
286 | unsigned long rst_rd_burst_id : 1; | 310 | unsigned long rst_rd_burst_id : 1; |
287 | unsigned long dis_rd_burst_id : 1; | 311 | unsigned long dis_rd_burst_id : 1; |
288 | unsigned long en_block_rd_when_packer_is_not_emp : 1; | 312 | unsigned long en_block_rd_when_packer_is_not_emp : 1; |
289 | unsigned long dis_pre_fetch_cntl_sm : 1; | 313 | unsigned long dis_pre_fetch_cntl_sm : 1; |
290 | unsigned long rbbm_chrncy_dis : 1; | 314 | unsigned long rbbm_chrncy_dis : 1; |
291 | unsigned long rbbm_rd_after_wr_lat : 2; | 315 | unsigned long rbbm_rd_after_wr_lat : 2; |
292 | unsigned long dis_be_during_rd : 1; | 316 | unsigned long dis_be_during_rd : 1; |
293 | unsigned long one_clk_invalidate_pulse : 1; | 317 | unsigned long one_clk_invalidate_pulse : 1; |
294 | unsigned long dis_chnl_priority : 1; | 318 | unsigned long dis_chnl_priority : 1; |
295 | unsigned long rst_read_path_a_pls : 1; | 319 | unsigned long rst_read_path_a_pls : 1; |
296 | unsigned long rst_read_path_b_pls : 1; | 320 | unsigned long rst_read_path_b_pls : 1; |
297 | unsigned long dis_reg_rd_fetch_trig : 1; | 321 | unsigned long dis_reg_rd_fetch_trig : 1; |
298 | unsigned long dis_rd_fetch_trig_from_ind_addr : 1; | 322 | unsigned long dis_rd_fetch_trig_from_ind_addr : 1; |
299 | unsigned long dis_rd_same_byte_to_trig_fetch : 1; | 323 | unsigned long dis_rd_same_byte_to_trig_fetch : 1; |
300 | unsigned long dis_dir_wrap : 1; | 324 | unsigned long dis_dir_wrap : 1; |
301 | unsigned long dis_ring_buf_to_force_dec : 1; | 325 | unsigned long dis_ring_buf_to_force_dec : 1; |
302 | unsigned long dis_addr_comp_in_16bit : 1; | 326 | unsigned long dis_addr_comp_in_16bit : 1; |
303 | unsigned long clr_w : 1; | 327 | unsigned long clr_w : 1; |
304 | unsigned long err_rd_tag_is_3 : 1; | 328 | unsigned long err_rd_tag_is_3 : 1; |
305 | unsigned long err_load_when_ful_a : 1; | 329 | unsigned long err_load_when_ful_a : 1; |
306 | unsigned long err_load_when_ful_b : 1; | 330 | unsigned long err_load_when_ful_b : 1; |
307 | unsigned long : 7; | 331 | unsigned long : 7; |
308 | } __attribute__((packed)); | 332 | } __attribute__((packed)); |
309 | 333 | ||
310 | union cif_read_dbg_u { | 334 | union cif_read_dbg_u { |
311 | unsigned long val : 32; | 335 | unsigned long val : 32; |
312 | struct cif_read_dbg_t f; | 336 | struct cif_read_dbg_t f; |
313 | } __attribute__((packed)); | 337 | } __attribute__((packed)); |
314 | 338 | ||
315 | struct cif_write_dbg_t { | 339 | struct cif_write_dbg_t { |
316 | unsigned long packer_timeout_count : 2; | 340 | unsigned long packer_timeout_count : 2; |
317 | unsigned long en_upper_load_cond : 1; | 341 | unsigned long en_upper_load_cond : 1; |
318 | unsigned long en_chnl_change_cond : 1; | 342 | unsigned long en_chnl_change_cond : 1; |
319 | unsigned long dis_addr_comp_cond : 1; | 343 | unsigned long dis_addr_comp_cond : 1; |
320 | unsigned long dis_load_same_byte_addr_cond : 1; | 344 | unsigned long dis_load_same_byte_addr_cond : 1; |
321 | unsigned long dis_timeout_cond : 1; | 345 | unsigned long dis_timeout_cond : 1; |
322 | unsigned long dis_timeout_during_rbbm : 1; | 346 | unsigned long dis_timeout_during_rbbm : 1; |
323 | unsigned long dis_packer_ful_during_rbbm_timeout : 1; | 347 | unsigned long dis_packer_ful_during_rbbm_timeout : 1; |
324 | unsigned long en_dword_split_to_rbbm : 1; | 348 | unsigned long en_dword_split_to_rbbm : 1; |
325 | unsigned long en_dummy_val : 1; | 349 | unsigned long en_dummy_val : 1; |
326 | unsigned long dummy_val_sel : 1; | 350 | unsigned long dummy_val_sel : 1; |
327 | unsigned long mask_pm4_wrptr_dec : 1; | 351 | unsigned long mask_pm4_wrptr_dec : 1; |
328 | unsigned long dis_mc_clean_cond : 1; | 352 | unsigned long dis_mc_clean_cond : 1; |
329 | unsigned long err_two_reqi_during_ful : 1; | 353 | unsigned long err_two_reqi_during_ful : 1; |
330 | unsigned long err_reqi_during_idle_clk : 1; | 354 | unsigned long err_reqi_during_idle_clk : 1; |
331 | unsigned long err_global : 1; | 355 | unsigned long err_global : 1; |
332 | unsigned long en_wr_buf_dbg_load : 1; | 356 | unsigned long en_wr_buf_dbg_load : 1; |
333 | unsigned long en_wr_buf_dbg_path : 1; | 357 | unsigned long en_wr_buf_dbg_path : 1; |
334 | unsigned long sel_wr_buf_byte : 3; | 358 | unsigned long sel_wr_buf_byte : 3; |
335 | unsigned long dis_rd_flush_wr : 1; | 359 | unsigned long dis_rd_flush_wr : 1; |
336 | unsigned long dis_packer_ful_cond : 1; | 360 | unsigned long dis_packer_ful_cond : 1; |
337 | unsigned long dis_invalidate_by_ops_chnl : 1; | 361 | unsigned long dis_invalidate_by_ops_chnl : 1; |
338 | unsigned long en_halt_when_reqi_err : 1; | 362 | unsigned long en_halt_when_reqi_err : 1; |
339 | unsigned long cif_spare_2 : 5; | 363 | unsigned long cif_spare_2 : 5; |
340 | unsigned long : 1; | 364 | unsigned long : 1; |
341 | } __attribute__((packed)); | 365 | } __attribute__((packed)); |
342 | 366 | ||
343 | union cif_write_dbg_u { | 367 | union cif_write_dbg_u { |
344 | unsigned long val : 32; | 368 | unsigned long val : 32; |
345 | struct cif_write_dbg_t f; | 369 | struct cif_write_dbg_t f; |
346 | } __attribute__((packed)); | 370 | } __attribute__((packed)); |
347 | 371 | ||
348 | 372 | ||
349 | struct intf_cntl_t { | 373 | struct intf_cntl_t { |
350 | unsigned char ad_inc_a : 1; | 374 | unsigned char ad_inc_a : 1; |
351 | unsigned char ring_buf_a : 1; | 375 | unsigned char ring_buf_a : 1; |
352 | unsigned char rd_fetch_trigger_a : 1; | 376 | unsigned char rd_fetch_trigger_a : 1; |
353 | unsigned char rd_data_rdy_a : 1; | 377 | unsigned char rd_data_rdy_a : 1; |
354 | unsigned char ad_inc_b : 1; | 378 | unsigned char ad_inc_b : 1; |
355 | unsigned char ring_buf_b : 1; | 379 | unsigned char ring_buf_b : 1; |
356 | unsigned char rd_fetch_trigger_b : 1; | 380 | unsigned char rd_fetch_trigger_b : 1; |
357 | unsigned char rd_data_rdy_b : 1; | 381 | unsigned char rd_data_rdy_b : 1; |
358 | } __attribute__((packed)); | 382 | } __attribute__((packed)); |
359 | 383 | ||
360 | union intf_cntl_u { | 384 | union intf_cntl_u { |
361 | unsigned char val : 8; | 385 | unsigned char val : 8; |
362 | struct intf_cntl_t f; | 386 | struct intf_cntl_t f; |
363 | } __attribute__((packed)); | 387 | } __attribute__((packed)); |
364 | 388 | ||
365 | struct cpu_defaults_t { | 389 | struct cpu_defaults_t { |
366 | unsigned char unpack_rd_data : 1; | 390 | unsigned char unpack_rd_data : 1; |
367 | unsigned char access_ind_addr_a: 1; | 391 | unsigned char access_ind_addr_a : 1; |
368 | unsigned char access_ind_addr_b: 1; | 392 | unsigned char access_ind_addr_b : 1; |
369 | unsigned char access_scratch_reg : 1; | 393 | unsigned char access_scratch_reg : 1; |
370 | unsigned char pack_wr_data : 1; | 394 | unsigned char pack_wr_data : 1; |
371 | unsigned char transition_size : 1; | 395 | unsigned char transition_size : 1; |
372 | unsigned char en_read_buf_mode : 1; | 396 | unsigned char en_read_buf_mode : 1; |
373 | unsigned char rd_fetch_scratch : 1; | 397 | unsigned char rd_fetch_scratch : 1; |
374 | } __attribute__((packed)); | 398 | } __attribute__((packed)); |
375 | 399 | ||
376 | union cpu_defaults_u { | 400 | union cpu_defaults_u { |
377 | unsigned char val : 8; | 401 | unsigned char val : 8; |
378 | struct cpu_defaults_t f; | 402 | struct cpu_defaults_t f; |
403 | } __attribute__((packed)); | ||
404 | |||
405 | struct crtc_total_t { | ||
406 | unsigned long crtc_h_total : 10; | ||
407 | unsigned long : 6; | ||
408 | unsigned long crtc_v_total : 10; | ||
409 | unsigned long : 6; | ||
410 | } __attribute__((packed)); | ||
411 | |||
412 | union crtc_total_u { | ||
413 | unsigned long val : 32; | ||
414 | struct crtc_total_t f; | ||
415 | } __attribute__((packed)); | ||
416 | |||
417 | struct crtc_ss_t { | ||
418 | unsigned long ss_start : 10; | ||
419 | unsigned long : 6; | ||
420 | unsigned long ss_end : 10; | ||
421 | unsigned long : 2; | ||
422 | unsigned long ss_align : 1; | ||
423 | unsigned long ss_pol : 1; | ||
424 | unsigned long ss_run_mode : 1; | ||
425 | unsigned long ss_en : 1; | ||
426 | } __attribute__((packed)); | ||
427 | |||
428 | union crtc_ss_u { | ||
429 | unsigned long val : 32; | ||
430 | struct crtc_ss_t f; | ||
431 | } __attribute__((packed)); | ||
432 | |||
433 | struct active_h_disp_t { | ||
434 | unsigned long active_h_start : 10; | ||
435 | unsigned long : 6; | ||
436 | unsigned long active_h_end : 10; | ||
437 | unsigned long : 6; | ||
438 | } __attribute__((packed)); | ||
439 | |||
440 | union active_h_disp_u { | ||
441 | unsigned long val : 32; | ||
442 | struct active_h_disp_t f; | ||
443 | } __attribute__((packed)); | ||
444 | |||
445 | struct active_v_disp_t { | ||
446 | unsigned long active_v_start : 10; | ||
447 | unsigned long : 6; | ||
448 | unsigned long active_v_end : 10; | ||
449 | unsigned long : 6; | ||
450 | } __attribute__((packed)); | ||
451 | |||
452 | union active_v_disp_u { | ||
453 | unsigned long val : 32; | ||
454 | struct active_v_disp_t f; | ||
455 | } __attribute__((packed)); | ||
456 | |||
457 | struct graphic_h_disp_t { | ||
458 | unsigned long graphic_h_start : 10; | ||
459 | unsigned long : 6; | ||
460 | unsigned long graphic_h_end : 10; | ||
461 | unsigned long : 6; | ||
462 | } __attribute__((packed)); | ||
463 | |||
464 | union graphic_h_disp_u { | ||
465 | unsigned long val : 32; | ||
466 | struct graphic_h_disp_t f; | ||
467 | } __attribute__((packed)); | ||
468 | |||
469 | struct graphic_v_disp_t { | ||
470 | unsigned long graphic_v_start : 10; | ||
471 | unsigned long : 6; | ||
472 | unsigned long graphic_v_end : 10; | ||
473 | unsigned long : 6; | ||
474 | } __attribute__((packed)); | ||
475 | |||
476 | union graphic_v_disp_u{ | ||
477 | unsigned long val : 32; | ||
478 | struct graphic_v_disp_t f; | ||
479 | } __attribute__((packed)); | ||
480 | |||
481 | struct graphic_ctrl_t_w100 { | ||
482 | unsigned long color_depth : 3; | ||
483 | unsigned long portrait_mode : 2; | ||
484 | unsigned long low_power_on : 1; | ||
485 | unsigned long req_freq : 4; | ||
486 | unsigned long en_crtc : 1; | ||
487 | unsigned long en_graphic_req : 1; | ||
488 | unsigned long en_graphic_crtc : 1; | ||
489 | unsigned long total_req_graphic : 9; | ||
490 | unsigned long lcd_pclk_on : 1; | ||
491 | unsigned long lcd_sclk_on : 1; | ||
492 | unsigned long pclk_running : 1; | ||
493 | unsigned long sclk_running : 1; | ||
494 | unsigned long : 6; | ||
495 | } __attribute__((packed)); | ||
496 | |||
497 | struct graphic_ctrl_t_w32xx { | ||
498 | unsigned long color_depth : 3; | ||
499 | unsigned long portrait_mode : 2; | ||
500 | unsigned long low_power_on : 1; | ||
501 | unsigned long req_freq : 4; | ||
502 | unsigned long en_crtc : 1; | ||
503 | unsigned long en_graphic_req : 1; | ||
504 | unsigned long en_graphic_crtc : 1; | ||
505 | unsigned long total_req_graphic : 10; | ||
506 | unsigned long lcd_pclk_on : 1; | ||
507 | unsigned long lcd_sclk_on : 1; | ||
508 | unsigned long pclk_running : 1; | ||
509 | unsigned long sclk_running : 1; | ||
510 | unsigned long : 5; | ||
511 | } __attribute__((packed)); | ||
512 | |||
513 | union graphic_ctrl_u { | ||
514 | unsigned long val : 32; | ||
515 | struct graphic_ctrl_t_w100 f_w100; | ||
516 | struct graphic_ctrl_t_w32xx f_w32xx; | ||
379 | } __attribute__((packed)); | 517 | } __attribute__((packed)); |
380 | 518 | ||
381 | struct video_ctrl_t { | 519 | struct video_ctrl_t { |
382 | unsigned long video_mode : 1; | 520 | unsigned long video_mode : 1; |
383 | unsigned long keyer_en : 1; | 521 | unsigned long keyer_en : 1; |
384 | unsigned long en_video_req : 1; | 522 | unsigned long en_video_req : 1; |
385 | unsigned long en_graphic_req_video : 1; | 523 | unsigned long en_graphic_req_video : 1; |
386 | unsigned long en_video_crtc : 1; | 524 | unsigned long en_video_crtc : 1; |
387 | unsigned long video_hor_exp : 2; | 525 | unsigned long video_hor_exp : 2; |
388 | unsigned long video_ver_exp : 2; | 526 | unsigned long video_ver_exp : 2; |
389 | unsigned long uv_combine : 1; | 527 | unsigned long uv_combine : 1; |
390 | unsigned long total_req_video : 9; | 528 | unsigned long total_req_video : 9; |
391 | unsigned long video_ch_sel : 1; | 529 | unsigned long video_ch_sel : 1; |
392 | unsigned long video_portrait : 2; | 530 | unsigned long video_portrait : 2; |
393 | unsigned long yuv2rgb_en : 1; | 531 | unsigned long yuv2rgb_en : 1; |
394 | unsigned long yuv2rgb_option : 1; | 532 | unsigned long yuv2rgb_option : 1; |
395 | unsigned long video_inv_hor : 1; | 533 | unsigned long video_inv_hor : 1; |
396 | unsigned long video_inv_ver : 1; | 534 | unsigned long video_inv_ver : 1; |
397 | unsigned long gamma_sel : 2; | 535 | unsigned long gamma_sel : 2; |
398 | unsigned long dis_limit : 1; | 536 | unsigned long dis_limit : 1; |
399 | unsigned long en_uv_hblend : 1; | 537 | unsigned long en_uv_hblend : 1; |
400 | unsigned long rgb_gamma_sel : 2; | 538 | unsigned long rgb_gamma_sel : 2; |
401 | } __attribute__((packed)); | 539 | } __attribute__((packed)); |
402 | 540 | ||
403 | union video_ctrl_u { | 541 | union video_ctrl_u { |
404 | unsigned long val : 32; | 542 | unsigned long val : 32; |
405 | struct video_ctrl_t f; | 543 | struct video_ctrl_t f; |
406 | } __attribute__((packed)); | 544 | } __attribute__((packed)); |
407 | 545 | ||
408 | struct disp_db_buf_cntl_rd_t { | 546 | struct disp_db_buf_cntl_rd_t { |
409 | unsigned long en_db_buf : 1; | 547 | unsigned long en_db_buf : 1; |
410 | unsigned long update_db_buf_done : 1; | 548 | unsigned long update_db_buf_done : 1; |
411 | unsigned long db_buf_cntl : 6; | 549 | unsigned long db_buf_cntl : 6; |
412 | unsigned long : 24; | 550 | unsigned long : 24; |
413 | } __attribute__((packed)); | 551 | } __attribute__((packed)); |
414 | 552 | ||
415 | union disp_db_buf_cntl_rd_u { | 553 | union disp_db_buf_cntl_rd_u { |
416 | unsigned long val : 32; | 554 | unsigned long val : 32; |
417 | struct disp_db_buf_cntl_rd_t f; | 555 | struct disp_db_buf_cntl_rd_t f; |
418 | } __attribute__((packed)); | 556 | } __attribute__((packed)); |
419 | 557 | ||
420 | struct disp_db_buf_cntl_wr_t { | 558 | struct disp_db_buf_cntl_wr_t { |
421 | unsigned long en_db_buf : 1; | 559 | unsigned long en_db_buf : 1; |
422 | unsigned long update_db_buf : 1; | 560 | unsigned long update_db_buf : 1; |
423 | unsigned long db_buf_cntl : 6; | 561 | unsigned long db_buf_cntl : 6; |
424 | unsigned long : 24; | 562 | unsigned long : 24; |
425 | } __attribute__((packed)); | 563 | } __attribute__((packed)); |
426 | 564 | ||
427 | union disp_db_buf_cntl_wr_u { | 565 | union disp_db_buf_cntl_wr_u { |
428 | unsigned long val : 32; | 566 | unsigned long val : 32; |
429 | struct disp_db_buf_cntl_wr_t f; | 567 | struct disp_db_buf_cntl_wr_t f; |
430 | } __attribute__((packed)); | 568 | } __attribute__((packed)); |
431 | 569 | ||
432 | struct gamma_value1_t { | 570 | struct gamma_value1_t { |
433 | unsigned long gamma1 : 8; | 571 | unsigned long gamma1 : 8; |
434 | unsigned long gamma2 : 8; | 572 | unsigned long gamma2 : 8; |
435 | unsigned long gamma3 : 8; | 573 | unsigned long gamma3 : 8; |
436 | unsigned long gamma4 : 8; | 574 | unsigned long gamma4 : 8; |
437 | } __attribute__((packed)); | 575 | } __attribute__((packed)); |
438 | 576 | ||
439 | union gamma_value1_u { | 577 | union gamma_value1_u { |
440 | unsigned long val : 32; | 578 | unsigned long val : 32; |
441 | struct gamma_value1_t f; | 579 | struct gamma_value1_t f; |
442 | } __attribute__((packed)); | 580 | } __attribute__((packed)); |
443 | 581 | ||
444 | struct gamma_value2_t { | 582 | struct gamma_value2_t { |
445 | unsigned long gamma5 : 8; | 583 | unsigned long gamma5 : 8; |
446 | unsigned long gamma6 : 8; | 584 | unsigned long gamma6 : 8; |
447 | unsigned long gamma7 : 8; | 585 | unsigned long gamma7 : 8; |
448 | unsigned long gamma8 : 8; | 586 | unsigned long gamma8 : 8; |
449 | } __attribute__((packed)); | 587 | } __attribute__((packed)); |
450 | 588 | ||
451 | union gamma_value2_u { | 589 | union gamma_value2_u { |
452 | unsigned long val : 32; | 590 | unsigned long val : 32; |
453 | struct gamma_value2_t f; | 591 | struct gamma_value2_t f; |
454 | } __attribute__((packed)); | 592 | } __attribute__((packed)); |
455 | 593 | ||
456 | struct gamma_slope_t { | 594 | struct gamma_slope_t { |
457 | unsigned long slope1 : 3; | 595 | unsigned long slope1 : 3; |
458 | unsigned long slope2 : 3; | 596 | unsigned long slope2 : 3; |
459 | unsigned long slope3 : 3; | 597 | unsigned long slope3 : 3; |
460 | unsigned long slope4 : 3; | 598 | unsigned long slope4 : 3; |
461 | unsigned long slope5 : 3; | 599 | unsigned long slope5 : 3; |
462 | unsigned long slope6 : 3; | 600 | unsigned long slope6 : 3; |
463 | unsigned long slope7 : 3; | 601 | unsigned long slope7 : 3; |
464 | unsigned long slope8 : 3; | 602 | unsigned long slope8 : 3; |
465 | unsigned long : 8; | 603 | unsigned long : 8; |
466 | } __attribute__((packed)); | 604 | } __attribute__((packed)); |
467 | 605 | ||
468 | union gamma_slope_u { | 606 | union gamma_slope_u { |
469 | unsigned long val : 32; | 607 | unsigned long val : 32; |
470 | struct gamma_slope_t f; | 608 | struct gamma_slope_t f; |
471 | } __attribute__((packed)); | 609 | } __attribute__((packed)); |
472 | 610 | ||
473 | struct mc_ext_mem_location_t { | 611 | struct mc_ext_mem_location_t { |
474 | unsigned long mc_ext_mem_start : 16; | 612 | unsigned long mc_ext_mem_start : 16; |
475 | unsigned long mc_ext_mem_top : 16; | 613 | unsigned long mc_ext_mem_top : 16; |
476 | } __attribute__((packed)); | 614 | } __attribute__((packed)); |
477 | 615 | ||
478 | union mc_ext_mem_location_u { | 616 | union mc_ext_mem_location_u { |
479 | unsigned long val : 32; | 617 | unsigned long val : 32; |
480 | struct mc_ext_mem_location_t f; | 618 | struct mc_ext_mem_location_t f; |
619 | } __attribute__((packed)); | ||
620 | |||
621 | struct mc_fb_location_t { | ||
622 | unsigned long mc_fb_start : 16; | ||
623 | unsigned long mc_fb_top : 16; | ||
624 | } __attribute__((packed)); | ||
625 | |||
626 | union mc_fb_location_u { | ||
627 | unsigned long val : 32; | ||
628 | struct mc_fb_location_t f; | ||
481 | } __attribute__((packed)); | 629 | } __attribute__((packed)); |
482 | 630 | ||
483 | struct clk_pin_cntl_t { | 631 | struct clk_pin_cntl_t { |
484 | unsigned long osc_en : 1; | 632 | unsigned long osc_en : 1; |
485 | unsigned long osc_gain : 5; | 633 | unsigned long osc_gain : 5; |
486 | unsigned long dont_use_xtalin : 1; | 634 | unsigned long dont_use_xtalin : 1; |
487 | unsigned long xtalin_pm_en : 1; | 635 | unsigned long xtalin_pm_en : 1; |
488 | unsigned long xtalin_dbl_en : 1; | 636 | unsigned long xtalin_dbl_en : 1; |
489 | unsigned long : 7; | 637 | unsigned long : 7; |
490 | unsigned long cg_debug : 16; | 638 | unsigned long cg_debug : 16; |
491 | } __attribute__((packed)); | 639 | } __attribute__((packed)); |
492 | 640 | ||
493 | union clk_pin_cntl_u { | 641 | union clk_pin_cntl_u { |
494 | unsigned long val : 32; | 642 | unsigned long val : 32; |
495 | struct clk_pin_cntl_t f; | 643 | struct clk_pin_cntl_t f; |
496 | } __attribute__((packed)); | 644 | } __attribute__((packed)); |
497 | 645 | ||
498 | struct pll_ref_fb_div_t { | 646 | struct pll_ref_fb_div_t { |
499 | unsigned long pll_ref_div : 4; | 647 | unsigned long pll_ref_div : 4; |
500 | unsigned long : 4; | 648 | unsigned long : 4; |
501 | unsigned long pll_fb_div_int : 6; | 649 | unsigned long pll_fb_div_int : 6; |
502 | unsigned long : 2; | 650 | unsigned long : 2; |
503 | unsigned long pll_fb_div_frac : 3; | 651 | unsigned long pll_fb_div_frac : 3; |
504 | unsigned long : 1; | 652 | unsigned long : 1; |
505 | unsigned long pll_reset_time : 4; | 653 | unsigned long pll_reset_time : 4; |
506 | unsigned long pll_lock_time : 8; | 654 | unsigned long pll_lock_time : 8; |
507 | } __attribute__((packed)); | 655 | } __attribute__((packed)); |
508 | 656 | ||
509 | union pll_ref_fb_div_u { | 657 | union pll_ref_fb_div_u { |
510 | unsigned long val : 32; | 658 | unsigned long val : 32; |
511 | struct pll_ref_fb_div_t f; | 659 | struct pll_ref_fb_div_t f; |
512 | } __attribute__((packed)); | 660 | } __attribute__((packed)); |
513 | 661 | ||
514 | struct pll_cntl_t { | 662 | struct pll_cntl_t { |
515 | unsigned long pll_pwdn : 1; | 663 | unsigned long pll_pwdn : 1; |
516 | unsigned long pll_reset : 1; | 664 | unsigned long pll_reset : 1; |
517 | unsigned long pll_pm_en : 1; | 665 | unsigned long pll_pm_en : 1; |
518 | unsigned long pll_mode : 1; | 666 | unsigned long pll_mode : 1; |
519 | unsigned long pll_refclk_sel : 1; | 667 | unsigned long pll_refclk_sel : 1; |
520 | unsigned long pll_fbclk_sel : 1; | 668 | unsigned long pll_fbclk_sel : 1; |
521 | unsigned long pll_tcpoff : 1; | 669 | unsigned long pll_tcpoff : 1; |
522 | unsigned long pll_pcp : 3; | 670 | unsigned long pll_pcp : 3; |
523 | unsigned long pll_pvg : 3; | 671 | unsigned long pll_pvg : 3; |
524 | unsigned long pll_vcofr : 1; | 672 | unsigned long pll_vcofr : 1; |
525 | unsigned long pll_ioffset : 2; | 673 | unsigned long pll_ioffset : 2; |
526 | unsigned long pll_pecc_mode : 2; | 674 | unsigned long pll_pecc_mode : 2; |
527 | unsigned long pll_pecc_scon : 2; | 675 | unsigned long pll_pecc_scon : 2; |
528 | unsigned long pll_dactal : 4; | 676 | unsigned long pll_dactal : 4; |
529 | unsigned long pll_cp_clip : 2; | 677 | unsigned long pll_cp_clip : 2; |
530 | unsigned long pll_conf : 3; | 678 | unsigned long pll_conf : 3; |
531 | unsigned long pll_mbctrl : 2; | 679 | unsigned long pll_mbctrl : 2; |
532 | unsigned long pll_ring_off : 1; | 680 | unsigned long pll_ring_off : 1; |
533 | } __attribute__((packed)); | 681 | } __attribute__((packed)); |
534 | 682 | ||
535 | union pll_cntl_u { | 683 | union pll_cntl_u { |
536 | unsigned long val : 32; | 684 | unsigned long val : 32; |
537 | struct pll_cntl_t f; | 685 | struct pll_cntl_t f; |
538 | } __attribute__((packed)); | 686 | } __attribute__((packed)); |
539 | 687 | ||
540 | struct sclk_cntl_t { | 688 | struct sclk_cntl_t { |
541 | unsigned long sclk_src_sel : 2; | 689 | unsigned long sclk_src_sel : 2; |
542 | unsigned long : 2; | 690 | unsigned long : 2; |
543 | unsigned long sclk_post_div_fast : 4; | 691 | unsigned long sclk_post_div_fast : 4; |
544 | unsigned long sclk_clkon_hys : 3; | 692 | unsigned long sclk_clkon_hys : 3; |
545 | unsigned long sclk_post_div_slow : 4; | 693 | unsigned long sclk_post_div_slow : 4; |
546 | unsigned long disp_cg_ok2switch_en : 1; | 694 | unsigned long disp_cg_ok2switch_en : 1; |
547 | unsigned long sclk_force_reg : 1; | 695 | unsigned long sclk_force_reg : 1; |
548 | unsigned long sclk_force_disp : 1; | 696 | unsigned long sclk_force_disp : 1; |
549 | unsigned long sclk_force_mc : 1; | 697 | unsigned long sclk_force_mc : 1; |
550 | unsigned long sclk_force_extmc : 1; | 698 | unsigned long sclk_force_extmc : 1; |
551 | unsigned long sclk_force_cp : 1; | 699 | unsigned long sclk_force_cp : 1; |
552 | unsigned long sclk_force_e2 : 1; | 700 | unsigned long sclk_force_e2 : 1; |
553 | unsigned long sclk_force_e3 : 1; | 701 | unsigned long sclk_force_e3 : 1; |
554 | unsigned long sclk_force_idct : 1; | 702 | unsigned long sclk_force_idct : 1; |
555 | unsigned long sclk_force_bist : 1; | 703 | unsigned long sclk_force_bist : 1; |
556 | unsigned long busy_extend_cp : 1; | 704 | unsigned long busy_extend_cp : 1; |
557 | unsigned long busy_extend_e2 : 1; | 705 | unsigned long busy_extend_e2 : 1; |
558 | unsigned long busy_extend_e3 : 1; | 706 | unsigned long busy_extend_e3 : 1; |
559 | unsigned long busy_extend_idct : 1; | 707 | unsigned long busy_extend_idct : 1; |
560 | unsigned long : 3; | 708 | unsigned long : 3; |
561 | } __attribute__((packed)); | 709 | } __attribute__((packed)); |
562 | 710 | ||
563 | union sclk_cntl_u { | 711 | union sclk_cntl_u { |
564 | unsigned long val : 32; | 712 | unsigned long val : 32; |
565 | struct sclk_cntl_t f; | 713 | struct sclk_cntl_t f; |
566 | } __attribute__((packed)); | 714 | } __attribute__((packed)); |
567 | 715 | ||
568 | struct pclk_cntl_t { | 716 | struct pclk_cntl_t { |
569 | unsigned long pclk_src_sel : 2; | 717 | unsigned long pclk_src_sel : 2; |
570 | unsigned long : 2; | 718 | unsigned long : 2; |
571 | unsigned long pclk_post_div : 4; | 719 | unsigned long pclk_post_div : 4; |
572 | unsigned long : 8; | 720 | unsigned long : 8; |
573 | unsigned long pclk_force_disp : 1; | 721 | unsigned long pclk_force_disp : 1; |
574 | unsigned long : 15; | 722 | unsigned long : 15; |
575 | } __attribute__((packed)); | 723 | } __attribute__((packed)); |
576 | 724 | ||
577 | union pclk_cntl_u { | 725 | union pclk_cntl_u { |
578 | unsigned long val : 32; | 726 | unsigned long val : 32; |
579 | struct pclk_cntl_t f; | 727 | struct pclk_cntl_t f; |
580 | } __attribute__((packed)); | 728 | } __attribute__((packed)); |
581 | 729 | ||
730 | |||
731 | #define TESTCLK_SRC_PLL 0x01 | ||
732 | #define TESTCLK_SRC_SCLK 0x02 | ||
733 | #define TESTCLK_SRC_PCLK 0x03 | ||
734 | /* 4 and 5 seem to by XTAL/M */ | ||
735 | #define TESTCLK_SRC_XTAL 0x06 | ||
736 | |||
582 | struct clk_test_cntl_t { | 737 | struct clk_test_cntl_t { |
583 | unsigned long testclk_sel : 4; | 738 | unsigned long testclk_sel : 4; |
584 | unsigned long : 3; | 739 | unsigned long : 3; |
585 | unsigned long start_check_freq : 1; | 740 | unsigned long start_check_freq : 1; |
586 | unsigned long tstcount_rst : 1; | 741 | unsigned long tstcount_rst : 1; |
587 | unsigned long : 15; | 742 | unsigned long : 15; |
588 | unsigned long test_count : 8; | 743 | unsigned long test_count : 8; |
589 | } __attribute__((packed)); | 744 | } __attribute__((packed)); |
590 | 745 | ||
591 | union clk_test_cntl_u { | 746 | union clk_test_cntl_u { |
592 | unsigned long val : 32; | 747 | unsigned long val : 32; |
593 | struct clk_test_cntl_t f; | 748 | struct clk_test_cntl_t f; |
594 | } __attribute__((packed)); | 749 | } __attribute__((packed)); |
595 | 750 | ||
596 | struct pwrmgt_cntl_t { | 751 | struct pwrmgt_cntl_t { |
597 | unsigned long pwm_enable : 1; | 752 | unsigned long pwm_enable : 1; |
598 | unsigned long : 1; | 753 | unsigned long : 1; |
599 | unsigned long pwm_mode_req : 2; | 754 | unsigned long pwm_mode_req : 2; |
600 | unsigned long pwm_wakeup_cond : 2; | 755 | unsigned long pwm_wakeup_cond : 2; |
601 | unsigned long pwm_fast_noml_hw_en : 1; | 756 | unsigned long pwm_fast_noml_hw_en : 1; |
602 | unsigned long pwm_noml_fast_hw_en : 1; | 757 | unsigned long pwm_noml_fast_hw_en : 1; |
603 | unsigned long pwm_fast_noml_cond : 4; | 758 | unsigned long pwm_fast_noml_cond : 4; |
604 | unsigned long pwm_noml_fast_cond : 4; | 759 | unsigned long pwm_noml_fast_cond : 4; |
605 | unsigned long pwm_idle_timer : 8; | 760 | unsigned long pwm_idle_timer : 8; |
606 | unsigned long pwm_busy_timer : 8; | 761 | unsigned long pwm_busy_timer : 8; |
607 | } __attribute__((packed)); | 762 | } __attribute__((packed)); |
608 | 763 | ||
609 | union pwrmgt_cntl_u { | 764 | union pwrmgt_cntl_u { |
610 | unsigned long val : 32; | 765 | unsigned long val : 32; |
611 | struct pwrmgt_cntl_t f; | 766 | struct pwrmgt_cntl_t f; |
612 | } __attribute__((packed)); | 767 | } __attribute__((packed)); |
613 | 768 | ||
614 | #endif | 769 | #endif |