w100fb.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. /*
  2. * linux/drivers/video/w100fb.h
  3. *
  4. * Frame Buffer Device for ATI w100 (Wallaby)
  5. *
  6. * Copyright (C) 2002, ATI Corp.
  7. * Copyright (C) 2004-2005 Richard Purdie
  8. *
  9. * Modified to work with 2.6 by Richard Purdie <rpurdie@rpsys.net>
  10. *
  11. * 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
  13. * published by the Free Software Foundation.
  14. *
  15. */
  16. #if !defined (_W100FB_H)
  17. #define _W100FB_H
  18. /* Block CIF Start: */
  19. #define mmCHIP_ID 0x0000
  20. #define mmREVISION_ID 0x0004
  21. #define mmWRAP_BUF_A 0x0008
  22. #define mmWRAP_BUF_B 0x000C
  23. #define mmWRAP_TOP_DIR 0x0010
  24. #define mmWRAP_START_DIR 0x0014
  25. #define mmCIF_CNTL 0x0018
  26. #define mmCFGREG_BASE 0x001C
  27. #define mmCIF_IO 0x0020
  28. #define mmCIF_READ_DBG 0x0024
  29. #define mmCIF_WRITE_DBG 0x0028
  30. #define cfgIND_ADDR_A_0 0x0000
  31. #define cfgIND_ADDR_A_1 0x0001
  32. #define cfgIND_ADDR_A_2 0x0002
  33. #define cfgIND_DATA_A 0x0003
  34. #define cfgREG_BASE 0x0004
  35. #define cfgINTF_CNTL 0x0005
  36. #define cfgSTATUS 0x0006
  37. #define cfgCPU_DEFAULTS 0x0007
  38. #define cfgIND_ADDR_B_0 0x0008
  39. #define cfgIND_ADDR_B_1 0x0009
  40. #define cfgIND_ADDR_B_2 0x000A
  41. #define cfgIND_DATA_B 0x000B
  42. #define cfgPM4_RPTR 0x000C
  43. #define cfgSCRATCH 0x000D
  44. #define cfgPM4_WRPTR_0 0x000E
  45. #define cfgPM4_WRPTR_1 0x000F
  46. /* Block CIF End: */
  47. /* Block CP Start: */
  48. #define mmSCRATCH_UMSK 0x0280
  49. #define mmSCRATCH_ADDR 0x0284
  50. #define mmGEN_INT_CNTL 0x0200
  51. #define mmGEN_INT_STATUS 0x0204
  52. /* Block CP End: */
  53. /* Block DISPLAY Start: */
  54. #define mmLCD_FORMAT 0x0410
  55. #define mmGRAPHIC_CTRL 0x0414
  56. #define mmGRAPHIC_OFFSET 0x0418
  57. #define mmGRAPHIC_PITCH 0x041C
  58. #define mmCRTC_TOTAL 0x0420
  59. #define mmACTIVE_H_DISP 0x0424
  60. #define mmACTIVE_V_DISP 0x0428
  61. #define mmGRAPHIC_H_DISP 0x042C
  62. #define mmGRAPHIC_V_DISP 0x0430
  63. #define mmVIDEO_CTRL 0x0434
  64. #define mmGRAPHIC_KEY 0x0438
  65. #define mmBRIGHTNESS_CNTL 0x045C
  66. #define mmDISP_INT_CNTL 0x0488
  67. #define mmCRTC_SS 0x048C
  68. #define mmCRTC_LS 0x0490
  69. #define mmCRTC_REV 0x0494
  70. #define mmCRTC_DCLK 0x049C
  71. #define mmCRTC_GS 0x04A0
  72. #define mmCRTC_VPOS_GS 0x04A4
  73. #define mmCRTC_GCLK 0x04A8
  74. #define mmCRTC_GOE 0x04AC
  75. #define mmCRTC_FRAME 0x04B0
  76. #define mmCRTC_FRAME_VPOS 0x04B4
  77. #define mmGPIO_DATA 0x04B8
  78. #define mmGPIO_CNTL1 0x04BC
  79. #define mmGPIO_CNTL2 0x04C0
  80. #define mmLCDD_CNTL1 0x04C4
  81. #define mmLCDD_CNTL2 0x04C8
  82. #define mmGENLCD_CNTL1 0x04CC
  83. #define mmGENLCD_CNTL2 0x04D0
  84. #define mmDISP_DEBUG 0x04D4
  85. #define mmDISP_DB_BUF_CNTL 0x04D8
  86. #define mmDISP_CRC_SIG 0x04DC
  87. #define mmCRTC_DEFAULT_COUNT 0x04E0
  88. #define mmLCD_BACKGROUND_COLOR 0x04E4
  89. #define mmCRTC_PS2 0x04E8
  90. #define mmCRTC_PS2_VPOS 0x04EC
  91. #define mmCRTC_PS1_ACTIVE 0x04F0
  92. #define mmCRTC_PS1_NACTIVE 0x04F4
  93. #define mmCRTC_GCLK_EXT 0x04F8
  94. #define mmCRTC_ALW 0x04FC
  95. #define mmCRTC_ALW_VPOS 0x0500
  96. #define mmCRTC_PSK 0x0504
  97. #define mmCRTC_PSK_HPOS 0x0508
  98. #define mmCRTC_CV4_START 0x050C
  99. #define mmCRTC_CV4_END 0x0510
  100. #define mmCRTC_CV4_HPOS 0x0514
  101. #define mmCRTC_ECK 0x051C
  102. #define mmREFRESH_CNTL 0x0520
  103. #define mmGENLCD_CNTL3 0x0524
  104. #define mmGPIO_DATA2 0x0528
  105. #define mmGPIO_CNTL3 0x052C
  106. #define mmGPIO_CNTL4 0x0530
  107. #define mmCHIP_STRAP 0x0534
  108. #define mmDISP_DEBUG2 0x0538
  109. #define mmDEBUG_BUS_CNTL 0x053C
  110. #define mmGAMMA_VALUE1 0x0540
  111. #define mmGAMMA_VALUE2 0x0544
  112. #define mmGAMMA_SLOPE 0x0548
  113. #define mmGEN_STATUS 0x054C
  114. #define mmHW_INT 0x0550
  115. /* Block DISPLAY End: */
  116. /* Block GFX Start: */
  117. #define mmBRUSH_OFFSET 0x108C
  118. #define mmBRUSH_Y_X 0x1074
  119. #define mmDEFAULT_PITCH_OFFSET 0x10A0
  120. #define mmDEFAULT_SC_BOTTOM_RIGHT 0x10A8
  121. #define mmDEFAULT2_SC_BOTTOM_RIGHT 0x10AC
  122. #define mmGLOBAL_ALPHA 0x1210
  123. #define mmFILTER_COEF 0x1214
  124. #define mmMVC_CNTL_START 0x11E0
  125. #define mmE2_ARITHMETIC_CNTL 0x1220
  126. #define mmENG_CNTL 0x13E8
  127. #define mmENG_PERF_CNT 0x13F0
  128. /* Block GFX End: */
  129. /* Block IDCT Start: */
  130. #define mmIDCT_RUNS 0x0C00
  131. #define mmIDCT_LEVELS 0x0C04
  132. #define mmIDCT_CONTROL 0x0C3C
  133. #define mmIDCT_AUTH_CONTROL 0x0C08
  134. #define mmIDCT_AUTH 0x0C0C
  135. /* Block IDCT End: */
  136. /* Block MC Start: */
  137. #define mmMEM_CNTL 0x0180
  138. #define mmMEM_ARB 0x0184
  139. #define mmMC_FB_LOCATION 0x0188
  140. #define mmMEM_EXT_CNTL 0x018C
  141. #define mmMC_EXT_MEM_LOCATION 0x0190
  142. #define mmMEM_EXT_TIMING_CNTL 0x0194
  143. #define mmMEM_SDRAM_MODE_REG 0x0198
  144. #define mmMEM_IO_CNTL 0x019C
  145. #define mmMC_DEBUG 0x01A0
  146. #define mmMC_BIST_CTRL 0x01A4
  147. #define mmMC_BIST_COLLAR_READ 0x01A8
  148. #define mmTC_MISMATCH 0x01AC
  149. #define mmMC_PERF_MON_CNTL 0x01B0
  150. #define mmMC_PERF_COUNTERS 0x01B4
  151. /* Block MC End: */
  152. /* Block RBBM Start: */
  153. #define mmWAIT_UNTIL 0x1400
  154. #define mmISYNC_CNTL 0x1404
  155. #define mmRBBM_CNTL 0x0144
  156. #define mmNQWAIT_UNTIL 0x0150
  157. /* Block RBBM End: */
  158. /* Block CG Start: */
  159. #define mmCLK_PIN_CNTL 0x0080
  160. #define mmPLL_REF_FB_DIV 0x0084
  161. #define mmPLL_CNTL 0x0088
  162. #define mmSCLK_CNTL 0x008C
  163. #define mmPCLK_CNTL 0x0090
  164. #define mmCLK_TEST_CNTL 0x0094
  165. #define mmPWRMGT_CNTL 0x0098
  166. #define mmPWRMGT_STATUS 0x009C
  167. /* Block CG End: */
  168. /* default value definitions */
  169. #define defWRAP_TOP_DIR 0x00000000
  170. #define defWRAP_START_DIR 0x00000000
  171. #define defCFGREG_BASE 0x00000000
  172. #define defCIF_IO 0x000C0902
  173. #define defINTF_CNTL 0x00000011
  174. #define defCPU_DEFAULTS 0x00000006
  175. #define defHW_INT 0x00000000
  176. #define defMC_EXT_MEM_LOCATION 0x07ff0000
  177. #define defTC_MISMATCH 0x00000000
  178. #define W100_CFG_BASE 0x0
  179. #define W100_CFG_LEN 0x10
  180. #define W100_REG_BASE 0x10000
  181. #define W100_REG_LEN 0x2000
  182. #define MEM_INT_BASE_VALUE 0x100000
  183. #define MEM_INT_TOP_VALUE_W100 0x15ffff
  184. #define MEM_EXT_BASE_VALUE 0x800000
  185. #define MEM_EXT_TOP_VALUE 0x9fffff
  186. #define WRAP_BUF_BASE_VALUE 0x80000
  187. #define WRAP_BUF_TOP_VALUE 0xbffff
  188. /* data structure definitions */
  189. struct wrap_top_dir_t {
  190. unsigned long top_addr : 23;
  191. unsigned long : 9;
  192. } __attribute__((packed));
  193. union wrap_top_dir_u {
  194. unsigned long val : 32;
  195. struct wrap_top_dir_t f;
  196. } __attribute__((packed));
  197. struct wrap_start_dir_t {
  198. unsigned long start_addr : 23;
  199. unsigned long : 9;
  200. } __attribute__((packed));
  201. union wrap_start_dir_u {
  202. unsigned long val : 32;
  203. struct wrap_start_dir_t f;
  204. } __attribute__((packed));
  205. struct cif_cntl_t {
  206. unsigned long swap_reg : 2;
  207. unsigned long swap_fbuf_1 : 2;
  208. unsigned long swap_fbuf_2 : 2;
  209. unsigned long swap_fbuf_3 : 2;
  210. unsigned long pmi_int_disable : 1;
  211. unsigned long pmi_schmen_disable : 1;
  212. unsigned long intb_oe : 1;
  213. unsigned long en_wait_to_compensate_dq_prop_dly : 1;
  214. unsigned long compensate_wait_rd_size : 2;
  215. unsigned long wait_asserted_timeout_val : 2;
  216. unsigned long wait_masked_val : 2;
  217. unsigned long en_wait_timeout : 1;
  218. unsigned long en_one_clk_setup_before_wait : 1;
  219. unsigned long interrupt_active_high : 1;
  220. unsigned long en_overwrite_straps : 1;
  221. unsigned long strap_wait_active_hi : 1;
  222. unsigned long lat_busy_count : 2;
  223. unsigned long lat_rd_pm4_sclk_busy : 1;
  224. unsigned long dis_system_bits : 1;
  225. unsigned long dis_mr : 1;
  226. unsigned long cif_spare_1 : 4;
  227. } __attribute__((packed));
  228. union cif_cntl_u {
  229. unsigned long val : 32;
  230. struct cif_cntl_t f;
  231. } __attribute__((packed));
  232. struct cfgreg_base_t {
  233. unsigned long cfgreg_base : 24;
  234. unsigned long : 8;
  235. } __attribute__((packed));
  236. union cfgreg_base_u {
  237. unsigned long val : 32;
  238. struct cfgreg_base_t f;
  239. } __attribute__((packed));
  240. struct cif_io_t {
  241. unsigned long dq_srp : 1;
  242. unsigned long dq_srn : 1;
  243. unsigned long dq_sp : 4;
  244. unsigned long dq_sn : 4;
  245. unsigned long waitb_srp : 1;
  246. unsigned long waitb_srn : 1;
  247. unsigned long waitb_sp : 4;
  248. unsigned long waitb_sn : 4;
  249. unsigned long intb_srp : 1;
  250. unsigned long intb_srn : 1;
  251. unsigned long intb_sp : 4;
  252. unsigned long intb_sn : 4;
  253. unsigned long : 2;
  254. } __attribute__((packed));
  255. union cif_io_u {
  256. unsigned long val : 32;
  257. struct cif_io_t f;
  258. } __attribute__((packed));
  259. struct cif_read_dbg_t {
  260. unsigned long unpacker_pre_fetch_trig_gen : 2;
  261. unsigned long dly_second_rd_fetch_trig : 1;
  262. unsigned long rst_rd_burst_id : 1;
  263. unsigned long dis_rd_burst_id : 1;
  264. unsigned long en_block_rd_when_packer_is_not_emp : 1;
  265. unsigned long dis_pre_fetch_cntl_sm : 1;
  266. unsigned long rbbm_chrncy_dis : 1;
  267. unsigned long rbbm_rd_after_wr_lat : 2;
  268. unsigned long dis_be_during_rd : 1;
  269. unsigned long one_clk_invalidate_pulse : 1;
  270. unsigned long dis_chnl_priority : 1;
  271. unsigned long rst_read_path_a_pls : 1;
  272. unsigned long rst_read_path_b_pls : 1;
  273. unsigned long dis_reg_rd_fetch_trig : 1;
  274. unsigned long dis_rd_fetch_trig_from_ind_addr : 1;
  275. unsigned long dis_rd_same_byte_to_trig_fetch : 1;
  276. unsigned long dis_dir_wrap : 1;
  277. unsigned long dis_ring_buf_to_force_dec : 1;
  278. unsigned long dis_addr_comp_in_16bit : 1;
  279. unsigned long clr_w : 1;
  280. unsigned long err_rd_tag_is_3 : 1;
  281. unsigned long err_load_when_ful_a : 1;
  282. unsigned long err_load_when_ful_b : 1;
  283. unsigned long : 7;
  284. } __attribute__((packed));
  285. union cif_read_dbg_u {
  286. unsigned long val : 32;
  287. struct cif_read_dbg_t f;
  288. } __attribute__((packed));
  289. struct cif_write_dbg_t {
  290. unsigned long packer_timeout_count : 2;
  291. unsigned long en_upper_load_cond : 1;
  292. unsigned long en_chnl_change_cond : 1;
  293. unsigned long dis_addr_comp_cond : 1;
  294. unsigned long dis_load_same_byte_addr_cond : 1;
  295. unsigned long dis_timeout_cond : 1;
  296. unsigned long dis_timeout_during_rbbm : 1;
  297. unsigned long dis_packer_ful_during_rbbm_timeout : 1;
  298. unsigned long en_dword_split_to_rbbm : 1;
  299. unsigned long en_dummy_val : 1;
  300. unsigned long dummy_val_sel : 1;
  301. unsigned long mask_pm4_wrptr_dec : 1;
  302. unsigned long dis_mc_clean_cond : 1;
  303. unsigned long err_two_reqi_during_ful : 1;
  304. unsigned long err_reqi_during_idle_clk : 1;
  305. unsigned long err_global : 1;
  306. unsigned long en_wr_buf_dbg_load : 1;
  307. unsigned long en_wr_buf_dbg_path : 1;
  308. unsigned long sel_wr_buf_byte : 3;
  309. unsigned long dis_rd_flush_wr : 1;
  310. unsigned long dis_packer_ful_cond : 1;
  311. unsigned long dis_invalidate_by_ops_chnl : 1;
  312. unsigned long en_halt_when_reqi_err : 1;
  313. unsigned long cif_spare_2 : 5;
  314. unsigned long : 1;
  315. } __attribute__((packed));
  316. union cif_write_dbg_u {
  317. unsigned long val : 32;
  318. struct cif_write_dbg_t f;
  319. } __attribute__((packed));
  320. struct intf_cntl_t {
  321. unsigned char ad_inc_a : 1;
  322. unsigned char ring_buf_a : 1;
  323. unsigned char rd_fetch_trigger_a : 1;
  324. unsigned char rd_data_rdy_a : 1;
  325. unsigned char ad_inc_b : 1;
  326. unsigned char ring_buf_b : 1;
  327. unsigned char rd_fetch_trigger_b : 1;
  328. unsigned char rd_data_rdy_b : 1;
  329. } __attribute__((packed));
  330. union intf_cntl_u {
  331. unsigned char val : 8;
  332. struct intf_cntl_t f;
  333. } __attribute__((packed));
  334. struct cpu_defaults_t {
  335. unsigned char unpack_rd_data : 1;
  336. unsigned char access_ind_addr_a: 1;
  337. unsigned char access_ind_addr_b: 1;
  338. unsigned char access_scratch_reg : 1;
  339. unsigned char pack_wr_data : 1;
  340. unsigned char transition_size : 1;
  341. unsigned char en_read_buf_mode : 1;
  342. unsigned char rd_fetch_scratch : 1;
  343. } __attribute__((packed));
  344. union cpu_defaults_u {
  345. unsigned char val : 8;
  346. struct cpu_defaults_t f;
  347. } __attribute__((packed));
  348. struct video_ctrl_t {
  349. unsigned long video_mode : 1;
  350. unsigned long keyer_en : 1;
  351. unsigned long en_video_req : 1;
  352. unsigned long en_graphic_req_video : 1;
  353. unsigned long en_video_crtc : 1;
  354. unsigned long video_hor_exp : 2;
  355. unsigned long video_ver_exp : 2;
  356. unsigned long uv_combine : 1;
  357. unsigned long total_req_video : 9;
  358. unsigned long video_ch_sel : 1;
  359. unsigned long video_portrait : 2;
  360. unsigned long yuv2rgb_en : 1;
  361. unsigned long yuv2rgb_option : 1;
  362. unsigned long video_inv_hor : 1;
  363. unsigned long video_inv_ver : 1;
  364. unsigned long gamma_sel : 2;
  365. unsigned long dis_limit : 1;
  366. unsigned long en_uv_hblend : 1;
  367. unsigned long rgb_gamma_sel : 2;
  368. } __attribute__((packed));
  369. union video_ctrl_u {
  370. unsigned long val : 32;
  371. struct video_ctrl_t f;
  372. } __attribute__((packed));
  373. struct disp_db_buf_cntl_rd_t {
  374. unsigned long en_db_buf : 1;
  375. unsigned long update_db_buf_done : 1;
  376. unsigned long db_buf_cntl : 6;
  377. unsigned long : 24;
  378. } __attribute__((packed));
  379. union disp_db_buf_cntl_rd_u {
  380. unsigned long val : 32;
  381. struct disp_db_buf_cntl_rd_t f;
  382. } __attribute__((packed));
  383. struct disp_db_buf_cntl_wr_t {
  384. unsigned long en_db_buf : 1;
  385. unsigned long update_db_buf : 1;
  386. unsigned long db_buf_cntl : 6;
  387. unsigned long : 24;
  388. } __attribute__((packed));
  389. union disp_db_buf_cntl_wr_u {
  390. unsigned long val : 32;
  391. struct disp_db_buf_cntl_wr_t f;
  392. } __attribute__((packed));
  393. struct gamma_value1_t {
  394. unsigned long gamma1 : 8;
  395. unsigned long gamma2 : 8;
  396. unsigned long gamma3 : 8;
  397. unsigned long gamma4 : 8;
  398. } __attribute__((packed));
  399. union gamma_value1_u {
  400. unsigned long val : 32;
  401. struct gamma_value1_t f;
  402. } __attribute__((packed));
  403. struct gamma_value2_t {
  404. unsigned long gamma5 : 8;
  405. unsigned long gamma6 : 8;
  406. unsigned long gamma7 : 8;
  407. unsigned long gamma8 : 8;
  408. } __attribute__((packed));
  409. union gamma_value2_u {
  410. unsigned long val : 32;
  411. struct gamma_value2_t f;
  412. } __attribute__((packed));
  413. struct gamma_slope_t {
  414. unsigned long slope1 : 3;
  415. unsigned long slope2 : 3;
  416. unsigned long slope3 : 3;
  417. unsigned long slope4 : 3;
  418. unsigned long slope5 : 3;
  419. unsigned long slope6 : 3;
  420. unsigned long slope7 : 3;
  421. unsigned long slope8 : 3;
  422. unsigned long : 8;
  423. } __attribute__((packed));
  424. union gamma_slope_u {
  425. unsigned long val : 32;
  426. struct gamma_slope_t f;
  427. } __attribute__((packed));
  428. struct mc_ext_mem_location_t {
  429. unsigned long mc_ext_mem_start : 16;
  430. unsigned long mc_ext_mem_top : 16;
  431. } __attribute__((packed));
  432. union mc_ext_mem_location_u {
  433. unsigned long val : 32;
  434. struct mc_ext_mem_location_t f;
  435. } __attribute__((packed));
  436. struct clk_pin_cntl_t {
  437. unsigned long osc_en : 1;
  438. unsigned long osc_gain : 5;
  439. unsigned long dont_use_xtalin : 1;
  440. unsigned long xtalin_pm_en : 1;
  441. unsigned long xtalin_dbl_en : 1;
  442. unsigned long : 7;
  443. unsigned long cg_debug : 16;
  444. } __attribute__((packed));
  445. union clk_pin_cntl_u {
  446. unsigned long val : 32;
  447. struct clk_pin_cntl_t f;
  448. } __attribute__((packed));
  449. struct pll_ref_fb_div_t {
  450. unsigned long pll_ref_div : 4;
  451. unsigned long : 4;
  452. unsigned long pll_fb_div_int : 6;
  453. unsigned long : 2;
  454. unsigned long pll_fb_div_frac : 3;
  455. unsigned long : 1;
  456. unsigned long pll_reset_time : 4;
  457. unsigned long pll_lock_time : 8;
  458. } __attribute__((packed));
  459. union pll_ref_fb_div_u {
  460. unsigned long val : 32;
  461. struct pll_ref_fb_div_t f;
  462. } __attribute__((packed));
  463. struct pll_cntl_t {
  464. unsigned long pll_pwdn : 1;
  465. unsigned long pll_reset : 1;
  466. unsigned long pll_pm_en : 1;
  467. unsigned long pll_mode : 1;
  468. unsigned long pll_refclk_sel : 1;
  469. unsigned long pll_fbclk_sel : 1;
  470. unsigned long pll_tcpoff : 1;
  471. unsigned long pll_pcp : 3;
  472. unsigned long pll_pvg : 3;
  473. unsigned long pll_vcofr : 1;
  474. unsigned long pll_ioffset : 2;
  475. unsigned long pll_pecc_mode : 2;
  476. unsigned long pll_pecc_scon : 2;
  477. unsigned long pll_dactal : 4;
  478. unsigned long pll_cp_clip : 2;
  479. unsigned long pll_conf : 3;
  480. unsigned long pll_mbctrl : 2;
  481. unsigned long pll_ring_off : 1;
  482. } __attribute__((packed));
  483. union pll_cntl_u {
  484. unsigned long val : 32;
  485. struct pll_cntl_t f;
  486. } __attribute__((packed));
  487. struct sclk_cntl_t {
  488. unsigned long sclk_src_sel : 2;
  489. unsigned long : 2;
  490. unsigned long sclk_post_div_fast : 4;
  491. unsigned long sclk_clkon_hys : 3;
  492. unsigned long sclk_post_div_slow : 4;
  493. unsigned long disp_cg_ok2switch_en : 1;
  494. unsigned long sclk_force_reg : 1;
  495. unsigned long sclk_force_disp : 1;
  496. unsigned long sclk_force_mc : 1;
  497. unsigned long sclk_force_extmc : 1;
  498. unsigned long sclk_force_cp : 1;
  499. unsigned long sclk_force_e2 : 1;
  500. unsigned long sclk_force_e3 : 1;
  501. unsigned long sclk_force_idct : 1;
  502. unsigned long sclk_force_bist : 1;
  503. unsigned long busy_extend_cp : 1;
  504. unsigned long busy_extend_e2 : 1;
  505. unsigned long busy_extend_e3 : 1;
  506. unsigned long busy_extend_idct : 1;
  507. unsigned long : 3;
  508. } __attribute__((packed));
  509. union sclk_cntl_u {
  510. unsigned long val : 32;
  511. struct sclk_cntl_t f;
  512. } __attribute__((packed));
  513. struct pclk_cntl_t {
  514. unsigned long pclk_src_sel : 2;
  515. unsigned long : 2;
  516. unsigned long pclk_post_div : 4;
  517. unsigned long : 8;
  518. unsigned long pclk_force_disp : 1;
  519. unsigned long : 15;
  520. } __attribute__((packed));
  521. union pclk_cntl_u {
  522. unsigned long val : 32;
  523. struct pclk_cntl_t f;
  524. } __attribute__((packed));
  525. struct clk_test_cntl_t {
  526. unsigned long testclk_sel : 4;
  527. unsigned long : 3;
  528. unsigned long start_check_freq : 1;
  529. unsigned long tstcount_rst : 1;
  530. unsigned long : 15;
  531. unsigned long test_count : 8;
  532. } __attribute__((packed));
  533. union clk_test_cntl_u {
  534. unsigned long val : 32;
  535. struct clk_test_cntl_t f;
  536. } __attribute__((packed));
  537. struct pwrmgt_cntl_t {
  538. unsigned long pwm_enable : 1;
  539. unsigned long : 1;
  540. unsigned long pwm_mode_req : 2;
  541. unsigned long pwm_wakeup_cond : 2;
  542. unsigned long pwm_fast_noml_hw_en : 1;
  543. unsigned long pwm_noml_fast_hw_en : 1;
  544. unsigned long pwm_fast_noml_cond : 4;
  545. unsigned long pwm_noml_fast_cond : 4;
  546. unsigned long pwm_idle_timer : 8;
  547. unsigned long pwm_busy_timer : 8;
  548. } __attribute__((packed));
  549. union pwrmgt_cntl_u {
  550. unsigned long val : 32;
  551. struct pwrmgt_cntl_t f;
  552. } __attribute__((packed));
  553. #endif