Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1028 lines
42 KiB

  1. /*++
  2. Copyright (c) 1993 Weitek Corporation
  3. Module Name:
  4. p91regs.h
  5. Abstract:
  6. This module contains register definitions for the Weitek Power 9100.
  7. Environment:
  8. Kernel mode
  9. Revision History may be found at the end of this file.
  10. --*/
  11. //
  12. // Memclk frequency (in Mhz)...
  13. //
  14. #define DEF_P9100_REV1_MEMCLK 4600
  15. #define DEF_P9100_MEMCLK 4975
  16. //
  17. // System Configuration Register definitions
  18. //
  19. #define SYSCFG_BPP_8 (0x08003000) // 8 BPP & Byte & Half-word swap
  20. #define SYSCFG_BPP_16 (0x0C003000) // 16 BPP & Byte & Half-word swap
  21. #define SYSCFG_BPP_24 (0x1C003000) // 24 BPP & Byte & Half-word swap
  22. #define SYSCFG_BPP_32 (0x14003000) // 32 BPP & Byte & Half-word swap
  23. //
  24. // Define valid P9100 Revision ID's
  25. //
  26. #define WTK_9100_REV0 0x0000 //
  27. #define WTK_9100_REV1 0x0000 //
  28. #define WTK_9100_REV2 0x0002 //
  29. #define WTK_9100_REV3 0x0003 //
  30. //
  31. // Define Power 9100 I/O Space Configuration Index Registers.
  32. //
  33. #define P91_CONFIG_INDEX 0x9100 // Config space index register.
  34. #define P91_CONFIG_DATA 0x9104 // Config space data register.
  35. //
  36. // Define the Weitek & OEM specific IDs for P9100 board verification...
  37. //
  38. #define P91_VEN_ID 0x100E // Standard Weitek Design
  39. #define P90_DEV_ID 0x9000 // Standard Weitek P9000 Design
  40. #define P91_DEV_ID 0x9100 // Standard Weitek P9100 Design
  41. //
  42. // Configuration Register Definitions, all are Read-only unless specified.
  43. // Note: offsets are for byte reads/writes.
  44. //
  45. #define P91_CONFIG_VENDOR_LOW (0) // RO-Low order byte of Vendor ID
  46. #define P91_CONFIG_VENDOR_HIGH (1) // RO-High order byte of Vendor ID
  47. #define P91_CONFIG_DEVICE_LOW (2) // RO-Low order byte of Device ID
  48. #define P91_CONFIG_DEVICE_HIGH (3) // RO-HIGH order byte of Device ID
  49. #define P91_CONFIG_CONFIGURATION (4) // RW-Configuration Register
  50. #define P91_CONFIG_STATUS (7) // RO-Status Register
  51. #define P91_CONFIG_REVISION_ID (8) // RO-Revision ID
  52. #define P91_CONFIG_VGA_PRESENT (10) // RO-Vga Present - set by PUCONFIG
  53. #define P91_CONFIG_DISPLAY (11) // RO-PCI Display Controller
  54. #define P91_CONFIG_WBASE (19) // RW-Memory Base for Native Mode
  55. #define P91_CONFIG_ROM_ENABLE (48) // RW-ROM decoding enabled
  56. #define P91_CONFIG_ROM_BASE_0 (49) // RW-ROM Base address, Bit 0
  57. #define P91_CONFIG_ROM_BASE_8_1 (50) // RW-ROM Base address, Bits 8~1
  58. #define P91_CONFIG_ROM_BASE_16_9 (51) // RW-ROM Base address, Bits 16~9
  59. #define P91_CONFIG_CFBGA (64) // RO-Config: BUS, CFBGA & EEDAIN
  60. #define P91_CONFIG_MODE (65) // RW-Mode select
  61. #define P91_CONFIG_CKSEL (66) // RW-CKSEl & VCEN
  62. //
  63. //
  64. // Clock Synth IDs:
  65. //
  66. #define CLK_ID_ICD2061A (0x00) // ICD2061a
  67. #define CLK_ID_FIXED_MEMCLK (0x20) // Fixed MEMCLK, RAMDAC gens pixclk
  68. //
  69. // Define Power 9100 coprocesser address prefix bits.
  70. // (Page 18)
  71. //
  72. // Address format:
  73. //
  74. // 3 2 2 1 1 1 1 1 1
  75. // 1 4 3 9 8 7 6 5 4 0
  76. // ------------------------------------------------------
  77. // | a a a a a a a a | 0 0 0 0 0 | H | B | b | 0 | o o |
  78. // ------------------------------------------------------
  79. //
  80. // a - Base Address
  81. // H - Word Swap
  82. // B - Byte Swap
  83. // b - Bit Swap
  84. // o - Coprocessor register offset
  85. //
  86. #define P91_WORD_SWAP 0x00040000 //
  87. #define P91_BYTE_SWAP 0x00020000 //
  88. #define P91_BIT_SWAP 0x00010000 //
  89. //
  90. // Define Power 9100 coprocesser system control register address offsets.
  91. // (Page 23)
  92. //
  93. // Address format:
  94. //
  95. // 3 1 1
  96. // 1 5 4 7 6 2 1 0
  97. // --------------------------------------------------------------------------
  98. // | p p p p p p p p p p p p p p p p p | 0 0 0 0 0 0 0 0 | r r r r r | 0 0 |
  99. // --------------------------------------------------------------------------
  100. //
  101. // p - Address prefix bits.
  102. // r - Resiter bits (6-2):
  103. // 00001 - sysconfig
  104. // 00010 - interrupt
  105. // 00011 - interrupt_en
  106. // 00100 - alt_write_bank
  107. // 00101 - alt_read_bank
  108. //
  109. #define P91_SYSCONFIG 0x00000004 // System configuration register.
  110. #define P91_INTERRUPT 0x00000008 // Interrupt register.
  111. #define P91_INTERRUPT_EN 0x0000000C // Interrupt enable register.
  112. #define P91_ALT_WRITE_BANK 0x00000010 // Alternate write bank register.
  113. #define P91_ALT_READ_BANK 0x00000014 // Alternate read bank register.
  114. //
  115. // Define Power 9100 coprocesser device coordinate register address offsets.
  116. // (Page 27)
  117. //
  118. // Address format:
  119. //
  120. // 3 1 1
  121. // 1 5 4 8 7 6 5 4 3 2 1 0
  122. // -----------------------------------------------------------------------------
  123. // | p p p p p p p p p p p p p p p p p | 0 1 1 0 0 0 0 | r r | a | y x | 0 0 0 |
  124. // -----------------------------------------------------------------------------
  125. //
  126. // p - Address prefix bits.
  127. // r - Resiter bits (7-6):
  128. // 00 - X[0]/Y[0]
  129. // 01 - X[1]/Y[1]
  130. // 10 - X[2]/Y[2]
  131. // 11 - X[3]/Y[3]
  132. // a - Screen addressing bit (5):
  133. // 0 - Perform absolute screen addressing.
  134. // 1 - Perform window-relative screen addressing (write only).
  135. // yx - 32/16 bit read/write bits (4-3):
  136. // 00 - Not used.
  137. // 01 - Read or write 32-bit X value.
  138. // 10 - Read or write 32-bit Y value.
  139. // 11 - Read or write 16-bit X value (high 16 bits) Y value (low 16 bits).
  140. //
  141. #define P91_X0_32 0x00003008 // 32-bit X[0] register.
  142. #define P91_X1_32 0x00003048 // 32-bit X[1] register.
  143. #define P91_X2_32 0x00003088 // 32-bit X[2] register.
  144. #define P91_X3_32 0x000030C8 // 32-bit X[3] register.
  145. #define P91_Y0_32 0x00003010 // 32-bit Y[0] register.
  146. #define P91_Y1_32 0x00003050 // 32-bit Y[1] register.
  147. #define P91_Y2_32 0x00003090 // 32-bit Y[2] register.
  148. #define P91_Y3_32 0x000030D0 // 32-bit Y[3] register.
  149. #define P91_X0_Y0_16 0x00003018 // 16-bit X[0]/Y[0] register.
  150. #define P91_X1_Y1_16 0x00003058 // 16-bit X[1]/Y[1] register.
  151. #define P91_X2_Y2_16 0x00003098 // 16-bit X[2]/Y[1] register.
  152. #define P91_X3_Y3_16 0x000030D8 // 16-bit X[3]/Y[1] register.
  153. #define P91_WIN_REL_BIT 0x00000020 // Window relative addressing bit.
  154. //
  155. // Define Power 9100 coprocesser status register address offset.
  156. // (Page 28)
  157. //
  158. // Address format:
  159. //
  160. // 3 1 1
  161. // 1 5 4 2 1 0
  162. // -----------------------------------------------------------------------
  163. // | p p p p p p p p p p p p p p p p p | 0 1 0 0 0 0 0 0 0 0 0 0 0 | 0 0 |
  164. // -----------------------------------------------------------------------
  165. //
  166. // p - Address prefix bits.
  167. //
  168. #define P91_STATUS 0x00002000 // Status register.
  169. //
  170. // Define Power 9100 coprocesser parameter engine control and
  171. // condition register address offsets.
  172. // (Page 29)
  173. //
  174. // Address format:
  175. //
  176. // 3 1 1
  177. // 1 5 4 7 6 2 1 0
  178. // --------------------------------------------------------------------------
  179. // | p p p p p p p p p p p p p p p p p | 0 1 0 0 0 0 1 1 | r r r r r | 0 0 |
  180. // --------------------------------------------------------------------------
  181. //
  182. // p - Address prefix bits.
  183. // r - Resiter bits (6-2):
  184. // 00000 - Not Used.
  185. // 00001 - oor
  186. // 00010 - Not Used.
  187. // 00011 - cindex
  188. // 00100 - w_off_xy
  189. // 00101 - p_w_min
  190. // 00110 - p_w_max
  191. // 00111 - Not Used.
  192. // 01000 - yclip
  193. // 01001 - xclip
  194. // 01010 - xedge_lt
  195. // 01011 - xedge_gt
  196. // 01100 - yedge_lt
  197. // 01101 - yedge_gt
  198. //
  199. #define P91_PE_OOR 0x00002184 // Out of Range Reg. (read only)
  200. #define P91_PE_CINDEX 0x0000218C // Index Reg.
  201. #define P91_PE_W_OFF_XY 0x00002190 // Window Offset Reg.
  202. #define P91_PE_P_W_MIN 0x00002194 // Pixel Window Min Reg. (read only)
  203. #define P91_PE_P_W_MAX 0x00002198 // Pixel Window Max Reg. (read only)
  204. #define P91_PE_YCLIP 0x000021A0 // Y Clip Register. (read only)
  205. #define P91_PE_XCLIP 0x000021A4 // X Clip Register. (read only)
  206. #define P91_PE_XEDGE_LT 0x000021A8 // (read only)
  207. #define P91_PE_XEDGE_GT 0x000021AC // (read only)
  208. #define P91_PE_YEDGE_LT 0x000021B0 // (read only)
  209. #define P91_PE_YEDGE_GT 0x000021B4 // (read only)
  210. //
  211. // Define Power 9100 coprocesser drawing engine register address offsets.
  212. // (Page 33)
  213. //
  214. // Address format:
  215. //
  216. // 3 1 1
  217. // 1 5 4 9 8 2 1 0
  218. // --------------------------------------------------------------------------
  219. // | p p p p p p p p p p p p p p p p p | 0 1 0 0 0 1 | r r r r r r r | 0 0 |
  220. // --------------------------------------------------------------------------
  221. //
  222. // p - Address prefix bits.
  223. // r - Resiter bits (8-2):
  224. // 0000000 - color[0]
  225. // 0000001 - color[1]
  226. // 0000010 - pmask
  227. // 0000011 - draw_mode
  228. // 0000100 - pat_originx
  229. // 0000101 - pat_originy
  230. // 0000110 - raster
  231. // 0000111 - pixel8
  232. // 0001000 - p_w_min
  233. // 0001001 - p_w_max
  234. // 0001110 - color[2]
  235. // 0001111 - color[3]
  236. // 0100000 - pattern0
  237. // 0100001 - pattern1
  238. // 0100010 - pattern2
  239. // 0100011 - pattern3
  240. // 0101000 - b_w_min
  241. // 0101001 - b_w_max
  242. //
  243. #define P91_DE_COLOR0 0x00002200 // Color register 0.
  244. #define P91_DE_COLOR1 0x00002204 // Color register 1.
  245. #define P91_DE_PMASK 0x00002208 // Plane Mask register.
  246. #define P91_DE_DRAW_MODE 0x0000220C // Draw Mode Register.
  247. #define P91_DE_PAT_ORIGINX 0x00002210 // Pattern X Origin register.
  248. #define P91_DE_PAT_ORIGINY 0x00002214 // Pattern Y Origin register.
  249. #define P91_DE_RASTER 0x00002218 // Raster Operation register.
  250. #define P91_DE_PIXEL8 0x0000221C // Pixel 8 register.
  251. #define P91_DE_P_W_MIN 0x00002220 // Pixel Window Clip Minimum.
  252. #define P91_DE_P_W_MAX 0x00002224 // Pixel Window Clip Maximum.
  253. #define P91_DE_COLOR2 0x00002238 // Color register 2.
  254. #define P91_DE_COLOR3 0x0000223C // Color register 3.
  255. #define P91_DE_PATTERN0 0x00002280 // Pattern 0 register.
  256. #define P91_DE_PATTERN1 0x00002284 // Pattern 1 register.
  257. #define P91_DE_PATTERN2 0x00002288 // Pattern 2 register.
  258. #define P91_DE_PATTERN3 0x0000228C // Pattern 3 register.
  259. #define P91_DE_B_W_MIN 0x000022A0 // Byte Window Clip Minimum.
  260. #define P91_DE_B_W_MAX 0x000022A4 // Byte Window Clip Maximum.
  261. //
  262. // Define Power 9100 coprocesser video control register address offsets.
  263. // Note: The offsets for these registers are the same as for the Power 9000
  264. // except for srtctl2 which is new on the Power 9100.
  265. // (Page 37)
  266. //
  267. // Address format:
  268. //
  269. // 3 1 1
  270. // 1 5 4 7 6 2 1 0
  271. // --------------------------------------------------------------------------
  272. // | p p p p p p p p p p p p p p p p p | 0 0 0 0 0 0 1 0 | r r r r r | 0 0 |
  273. // --------------------------------------------------------------------------
  274. //
  275. // p - Address prefix bits.
  276. // r - Resiter bits (6-2):
  277. // 00001 - hrzc
  278. // 00010 - hrzt
  279. // 00011 - hrzsr
  280. // 00100 - hrzbr
  281. // 00101 - hrzbf
  282. // 00110 - prehrzc
  283. // 00111 - vrtc
  284. // 01000 - vrtt
  285. // 01001 - vrtsr
  286. // 01010 - vrtbr
  287. // 01011 - vrtbf
  288. // 01100 - prevrtc
  289. // 01101 - sraddr
  290. // 01110 - srtctl
  291. // 01111 - sraddr_inc
  292. // 10000 - srtctl2
  293. //
  294. #define P91_HRZC 0x00000104 // Horiz. counter (read only).
  295. #define P91_HRZT 0x00000108 // Horiz. length (read/write).
  296. #define P91_HRZSR 0x0000010C // Horiz. sync rising edge (read/write).
  297. #define P91_HRZBR 0x00000110 // Horiz. blank rising edge (read/write).
  298. #define P91_HRZBF 0x00000114 // Horiz. blank falling edge (read/write).
  299. #define P91_PREHRZC 0x00000118 // Horiz. counter preload (read/write).
  300. #define P91_VRTC 0x0000011C // Vert. counter (read only).
  301. #define P91_VRTT 0x00000120 // Vert. length (read/write).
  302. #define P91_VRTSR 0x00000124 // Vert. sync rising edge (read/write).
  303. #define P91_VRTBR 0x00000128 // Vert. blank rising edge (read/write).
  304. #define P91_VRTBF 0x0000012C // Vert. blank falling edge (read/write).
  305. #define P91_PREVRTC 0x00000130 // Vert. counter preload (read/write).
  306. #define P91_SRADDR 0x00000134 //
  307. #define P91_SRTCTL 0x00000138 // Screen repaint timing control 1.
  308. #define P91_SRADDR_INC 0x0000013C //
  309. #define P91_SRTCTL2 0x00000140 // Screen repaint timing control 2.
  310. #define P91_SRTCTL2_N (0x00) // SRTCTL2 sync polarities...
  311. #define P91_SRTCTL2_P (0x01)
  312. #define P91_SRTCTL2_H (0x03)
  313. #define P91_SRTCTL2_L (0x02)
  314. #define P91_HSYNC_HIGH_TRUE 0x00000000
  315. #define P91_HSYNC_LOW_TRUE 0x00000001
  316. #define P91_VSYNC_HIGH_TRUE 0x00000000
  317. #define P91_VSYNC_LOW_TRUE 0x00000004
  318. //
  319. // Define Power 9100 coprocesser VRAM control register address offsets.
  320. // Note: The offsets for these registers are the same as for the Power 9000
  321. // except for pu_config which is new on the Power 9100.
  322. // (Page 41)
  323. //
  324. // Address format:
  325. //
  326. // 3 1 1
  327. // 1 5 4 7 6 2 1 0
  328. // --------------------------------------------------------------------------
  329. // | p p p p p p p p p p p p p p p p p | 0 0 0 0 0 0 1 1 | r r r r r | 0 0 |
  330. // --------------------------------------------------------------------------
  331. //
  332. // p - Address prefix bits.
  333. // r - Resiter bits (6-2):
  334. // 00001 - mem_config
  335. // 00010 - rfperiod
  336. // 00011 - rfcount
  337. // 00100 - rlmax
  338. // 00101 - rlcur
  339. // 00110 - pu_config
  340. //
  341. #define P91_MEM_CONFIG 0x00000184 // Memory Configuration Register.
  342. #define P91_RFPERIOD 0x00000188 // Refresh Period Register.
  343. #define P91_RFCOUNT 0x0000018C // Refresh Count Register.
  344. #define P91_RLMAX 0x00000190 // RAS Low Miaximum Register.
  345. #define P91_RLCUR 0x00000194 // RAS Low Current Register.
  346. #define P91_PU_CONFIG 0x00000198 // Power-Up Configuration Register.
  347. #define P91_EXT_IO_ID 0x00000208 // Get external board id value from here
  348. // to detect Intergraph board
  349. //
  350. // Define Power 9100 coprocesser meta-coordinate pseudo-register address
  351. // offsets.
  352. // (Page 43)
  353. //
  354. // Address format:
  355. //
  356. // 3 1 1
  357. // 1 5 4 9 8 6 5 4 3 2 1 0
  358. // -----------------------------------------------------------------------------
  359. // | p p p p p p p p p p p p p p p p p | 0 1 1 0 0 1 | v v v | a | y x | 0 0 0 |
  360. // -----------------------------------------------------------------------------
  361. //
  362. // p - Address prefix bits.
  363. // v - Vtype bits (8-6):
  364. // 000 - point
  365. // 001 - line
  366. // 010 - triangle
  367. // 011 - quad
  368. // 100 - rectangle
  369. // a - Screen addressing bit (5):
  370. // 0 - Perform addressing relative to the window offset.
  371. // 1 - Perform addressing relative to the previos vertex.
  372. // yx - 32/16 bit read/write bits (4-3):
  373. // 00 - Not used.
  374. // 01 - Read or write 32-bit X value.
  375. // 10 - Read or write 32-bit Y value.
  376. // 11 - Read or write 16-bit X value (high 16 bits) Y value (low 16 bits).
  377. //
  378. #define P91_META_X_32 0x00003208 // 32-bit X coordinate value.
  379. #define P91_META_Y_32 0x00003210 // 32-bit Y coordinate value.
  380. #define P91_META_X_Y_16 0x00003218 // 16-bit X/Y coordinate value.
  381. #define P91_META_POINT 0x00000000 // Point draw type bits.
  382. #define P91_META_LINE 0x00000040 // Line draw type bits.
  383. #define P91_META_TRIANGLE 0x00000080 // Triangle draw type bits.
  384. #define P91_META_QUAD 0x000000C0 // Quadrilateral draw type bits.
  385. #define P91_META_RECT 0x00000100 // Rectangle draw type bits.
  386. #define P91_META_WIN_REL 0x00000000 // Window relative addressing bits.
  387. #define P91_META_VERT_REL 0x00000020 // Vertex relative addressing bits.
  388. //
  389. // Define Power 9100 coprocesser quad command register address offset.
  390. // (Page 44)
  391. //
  392. // Address format:
  393. //
  394. // 3 1 1
  395. // 1 5 4 2 1 0
  396. // -----------------------------------------------------------------------
  397. // | p p p p p p p p p p p p p p p p p | 0 1 0 0 0 0 0 0 0 0 0 1 0 | 0 0 |
  398. // -----------------------------------------------------------------------
  399. //
  400. // p - Address prefix bits.
  401. //
  402. #define P91_QUAD 0x00002008 // Quad Command Register.
  403. //
  404. // Define Power 9100 coprocesser blit command register address offset.
  405. // (Page 44)
  406. //
  407. // Address format:
  408. //
  409. // 3 1 1
  410. // 1 5 4 2 1 0
  411. // -----------------------------------------------------------------------
  412. // | p p p p p p p p p p p p p p p p p | 0 1 0 0 0 0 0 0 0 0 0 0 1 | 0 0 |
  413. // -----------------------------------------------------------------------
  414. //
  415. // p - Address prefix bits.
  416. //
  417. #define P91_BLIT 0x00002004 // Blit Command Register.
  418. //
  419. // Define Power 9100 coprocesser pixel8 command register address offset.
  420. // (Page 45)
  421. //
  422. // Address format:
  423. //
  424. // 3 1 1
  425. // 1 5 4 2 1 0
  426. // -----------------------------------------------------------------------
  427. // | p p p p p p p p p p p p p p p p p | 1 - - - - - - - - - - - - | 0 0 |
  428. // -----------------------------------------------------------------------
  429. //
  430. // p - Address prefix bits.
  431. //
  432. #define P91_PIXEL8 0x00004000 // Pixel 8 Command Register.
  433. //
  434. // Define Power 9100 coprocesser pixel1 command register address offset.
  435. // (Page 45)
  436. //
  437. // Address format:
  438. //
  439. // 3 1 1
  440. // 1 5 4 7 6 2 1 0
  441. // -------------------------------------------------------------------------
  442. // | p p p p p p p p p p p p p p p p p | 0 1 0 0 0 0 0 1 | # # # # # | 0 0 |
  443. // -------------------------------------------------------------------------
  444. //
  445. // p - Address prefix bits.
  446. //
  447. #define P91_PIXEL1 0x00002080 // Pixel 1 Command Register.
  448. #define P91_PIXEL1_COUNT_MSK 0x0000007C // Pixel Count Mask
  449. #define P91_PIXEL1_32_PIXELS 0x0000007C // Maximum Pixel Count
  450. //
  451. // Define Power 9100 coprocesser next pixels command register address offset.
  452. // (Page 46)
  453. //
  454. // Address format:
  455. //
  456. // 3 1 1
  457. // 1 5 4 2 1 0
  458. // -----------------------------------------------------------------------
  459. // | p p p p p p p p p p p p p p p p p | 0 1 0 0 0 0 0 0 0 0 1 0 1 | 0 0 |
  460. // -----------------------------------------------------------------------
  461. //
  462. // p - Address prefix bits.
  463. //
  464. #define P91_NEXT_PIXELS 0x00002014 // Next Pixels Command Register.
  465. // 3 1
  466. // 1 5 0
  467. // -------------------------------------------------------------------
  468. // | 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 |
  469. // -------------------------------------------------------------------
  470. //
  471. // Define the Power-Up Configuration Register Bits.
  472. // Page (Page 13)
  473. // 2 1 1 1 1
  474. // 3 6 5 2 1 8 7 5 4 3 2 1 0
  475. // -------------------------------------------------
  476. // | 0 | - - - - | 0 | - - - | - | - | - - | - |
  477. // -------------------------------------------------
  478. // | | | | | | | | | | | | | |
  479. // | ------- | ----- | | --- |
  480. // | | | | | | | ----> Motherboard implementation.
  481. // | | | | | | ---------> EEProm Type
  482. // | | | | | --------------> VRAM SAM Size.
  483. // | | | | ------------------> VRAM Memory Depth.
  484. // | | | ------------------------> Frequency Synthesizer type.
  485. // | | -------------------------------> Reserved.
  486. // | ---------------------------------------> RAMDAC Type.
  487. // -----------------------------------------------> Reserved.
  488. //
  489. // 3 3 2 2 2 2 2
  490. // 1 0 9 7 6 5 4
  491. // ---------------------------
  492. // | - - | - - - | - | - | 0 |
  493. // ---------------------------
  494. // | | | | | | | |
  495. // --- ----- | | ---------------> Reserved.
  496. // | | | -------------------> VGA presence.
  497. // | | -----------------------> Initial Mode Select.
  498. // | -----------------------------> Configuration Registers Base Address.
  499. // ------------------------------------> Bus Type.
  500. //
  501. #define P91_PUC_IMPLEMENTATION 0x00000001 //
  502. #define P91_PUC_MOTHER_BOARD 0x00000000 //
  503. #define P91_PUC_ADD_IN_CARD 0x00000001 //
  504. #define P91_PUC_EEPROM_TYPE 0x00000006 //
  505. #define P91_PUC_EEPROM_AT24C01 0x00000000 //
  506. #define P91_PUC_VRAM_SAM_SIZE 0x00000008 //
  507. #define P91_PUC_FULL_SIZE_SHIFT 0x00000000 //
  508. #define P91_PUC_HALF_SIZE_SHIFT 0x00000008 //
  509. #define P91_PUC_MEMORY_DEPTH 0x00000010 //
  510. #define P91_PUC_256K_VRAMS 0x00000000 //
  511. #define P91_PUC_128K_VRAMS 0x00000010 //
  512. #define P91_PUC_FREQ_SYNTH_TYPE 0x000000E0 //
  513. #define P91_PUC_EXT_IO 0x00000100 // External I/O regs are on DAC interface
  514. #define P91_PUC_ICD_2061A 0x00000000 // ICD2061a
  515. #define P91_PUC_FIXED_MEMCLK 0x00000020 // Fixed MEMCLK, RAMDAC gens pixclk
  516. #define P91_PUC_RAMDAC_TYPE 0x0000F000 //
  517. #define P91_PUC_DAC_BT485 0x00000000 //
  518. #define P91_PUC_DAC_BT489 0x00001000 //
  519. #define P91_PUC_DAC_IBM525 0x00008000 //
  520. #define P91_PUC_VGA_PRESENCE 0x02000000 //
  521. #define P91_PUC_VGA_ABSENT 0x00000000 //
  522. #define P91_PUC_VGA_PRESENT 0x02000000 //
  523. #define P91_PUC_INITIAL_MODSEL 0x04000000 //
  524. #define P91_PUC_NATIVE_MODE 0x00000000 //
  525. #define P91_PUC_VGA_MODE 0x04000000 //
  526. #define P91_PUC_CONFIG_REG_BASE 0x38000000 //
  527. #define P91_PUC_BASE_9100_9104 0x00000000 //
  528. #define P91_PUC_BASE_9108_910C 0x08000000 //
  529. #define P91_PUC_BASE_9110_9114 0x10000000 //
  530. #define P91_PUC_BASE_9118_911C 0x18000000 //
  531. #define P91_PUC_BASE_9120_9124 0x20000000 //
  532. #define P91_PUC_BASE_9128_912C 0x28000000 //
  533. #define P91_PUC_BASE_9130_9134 0x30000000 //
  534. #define P91_PUC_BASE_9138_913C 0x38000000 //
  535. #define P91_PUC_BUS_TYPE 0xC0000000 //
  536. #define P91_PUC_BUS_PCI 0x40000000 //
  537. #define P91_PUC_BUS_VESA 0x80000000 //
  538. //
  539. // Define Power up configuration bit field positions for use in shifting
  540. // the various fields to bit 0.
  541. //
  542. #define P91_PUC_EEPROM_SHIFT_CNT 0x01
  543. #define P91_PUC_SYNTH_SHIFT_CNT 0X05
  544. #define P91_PUC_RAMDAC_SHIFT_CNT 0x0C
  545. #define P91_PUC_REG_SHIFT_CNT 0x1B
  546. #define P91_PUC_BUS_SHIFT_CNT 0x1E
  547. //
  548. // Define the System Configuration Register Bits.
  549. // (Page 24)
  550. // 1 1 1 1 1 1 1 1
  551. // 9 7 6 4 3 2 1 0 9 8 0
  552. // -----------------------------------------
  553. // | - - - | - - - | - | - | - | - | - | 0 |
  554. // -----------------------------------------
  555. // | | | | | | | | | | | |
  556. // ----- ----- | | | | | -> Reserved. Must be 0.
  557. // | | | | | | -----> Pixel write buffer selection.
  558. // | | | | | ---------> Pixel read buffer selection.
  559. // | | | | -------------> Pixel access bit swap.
  560. // | | | -----------------> Pixel access byte swap.
  561. // | | ---------------------> Pixel access half-word swap.
  562. // | ---------------------------> Shift control 2.
  563. // -----------------------------------> Shift control 1.
  564. //
  565. // 3 3 2 2 2 2 2 2 2 2
  566. // 1 0 9 8 6 5 4 3 2 0
  567. // ---------------------------------------
  568. // | 0 | - - | - - - | - | - | - | - - - |
  569. // ---------------------------------------
  570. // | | | | | | | | | | |
  571. // | | ----- | | | -----
  572. // | | | | | | |
  573. // | | | | | | -----> Shift control 0.
  574. // | | | | | -----------> Overide internal PLL.
  575. // | | | | ---------------> Frame buffer controller drive load.
  576. // | | | -------------------> Disable internal selftiming on FBC.
  577. // | | -------------------------> Pixel size for drawing engine.
  578. // | --------------------------------> Shift control 3.
  579. // -------------------------------------> Reserved. Must be 0.
  580. //
  581. #define P91_WRITE_BUF_1 0x00000200
  582. #define P91_READ_BUF_1 0x00000400
  583. #define P91_SWAP_BITS 0x00000800
  584. #define P91_SWAP_BYTES 0x00001000
  585. #define P91_SWAP_WORDS 0x00002000
  586. #define P91_SHIFT2_0 0x00000000
  587. #define P91_SHIFT2_32 0x00004000
  588. #define P91_SHIFT2_64 0x00008000
  589. #define P91_SHIFT2_128 0x0000C000
  590. #define P91_SHIFT2_256 0x00010000
  591. #define P91_SHIFT2_512 0x00014000
  592. #define P91_SHIFT2_FIELD_INC 0x00004000
  593. #define P91_SHIFT1_0 0x00000000
  594. #define P91_SHIFT1_64 0x00040000
  595. #define P91_SHIFT1_128 0x00060000
  596. #define P91_SHIFT1_256 0x00080000
  597. #define P91_SHIFT1_512 0x000A0000
  598. #define P91_SHIFT1_1024 0x000C0000
  599. #define P91_SHIFT1_FIELD_INC 0x00020000
  600. #define P91_SHIFT0_0 0x00000000
  601. #define P91_SHIFT0_128 0x00300000
  602. #define P91_SHIFT0_256 0x00400000
  603. #define P91_SHIFT0_512 0x00500000
  604. #define P91_SHIFT0_1024 0x00600000
  605. #define P91_SHIFT0_2048 0x00700000
  606. #define P91_SHIFT0_FIELD_INC 0x00100000
  607. #define P91_EXT_PLL_CLOCK 0x00800000
  608. #define P91_DBL_DRIVE_LOAD 0x01000000
  609. #define P91_SELFTIME_DIS 0x02000000
  610. #define P91_DE_8BPP 0x08000000
  611. #define P91_DE_16BPP 0x0C000000
  612. #define P91_DE_24BPP 0x1C000000
  613. #define P91_DE_32BPP 0x14000000
  614. #define P91_SHIFT3_0 0x00000000
  615. #define P91_SHIFT3_1024 0x20000000
  616. #define P91_SHIFT3_2048 0x40000000
  617. #define P91_SHIFT3_4096 0x60000000
  618. #define P91_SHIFT3_FIELD_INC 0x20000000
  619. //
  620. // Define the Interrupt Register Bits.
  621. // Note: These are exactly the same as the Power 9000 bit definitions.
  622. // (Page 25)
  623. // 3
  624. // 1 6 5 4 3 2 1 0
  625. // -------------------------
  626. // | 0 | - - | - - | - - |
  627. // -------------------------
  628. // | | | | | | |
  629. // | | | | | | -----------------> Draw Engine Idle INT.
  630. // | | | | | -------------------> Draw Engine Idle INT Write Enable.
  631. // | | | | -----------------------> Pick Done INT.
  632. // | | | -------------------------> Pick Done INT. Write Enable.
  633. // | | -----------------------------> VBlank Done INT.
  634. // | -------------------------------> VBlank Done INT Write Enable.
  635. // ------------------------------------> Reserved. Must be 0.
  636. //
  637. #define P91_DE_IDLE 0x00000001
  638. #define P91_DE_IDLE_CLEAR 0x00000002
  639. #define P91_PICK_DONE 0x00000004
  640. #define P91_PICK_DONE_CLEAR 0x00000008
  641. #define P91_VBLANK_DONE 0x00000010
  642. #define P91_VBLANK_DONE_CLEAR 0x00000020
  643. //
  644. // Define the Interrupt Enable Register Bits.
  645. // Note: These are exactly the same as the Power 9000 bit definitions.
  646. // Page (26)
  647. // 3
  648. // 1 8 7 6 5 4 3 2 1 0
  649. // -------------------------------
  650. // | 0 | - - | - - | - - | - - |
  651. // -------------------------------
  652. // | | | | | | | | |
  653. // | | | | | | | | -----------> Draw Engine Int. Enable.
  654. // | | | | | | | -------------> Draw Engine Write Enable.
  655. // | | | | | | -----------------> Pick Int. Enable.
  656. // | | | | | -------------------> Pick Write Enable.
  657. // | | | | -----------------------> VBlank Int. Enable.
  658. // | | | -------------------------> VBlank Write Enable.
  659. // | | -----------------------------> Master Int. Enable.
  660. // | -------------------------------> Master Enable Write Enable.
  661. // ------------------------------------> Reserved. Must be 0.
  662. //
  663. #define P91_DE_IDLE_DIS 0x00000002 // Disable Draw Engine idle INT.
  664. #define P91_DE_IDLE_EN 0x00000003 // Enable Draw Engine idle INT.
  665. #define P91_PICKED_DIS 0x00000008 // Disable Pick INT.
  666. #define P91_PICKED_EN 0x0000000C // Enable Pick INT.
  667. #define P91_VBLANKED_DIS 0x00000020 // Disable VBlank INT.
  668. #define P91_VBLANKED_EN 0x00000030 // Enable VBlank INT.
  669. #define P91_MASTER_DIS 0x00000080 // Disable all interrupts.
  670. #define P91_MASTER_EN 0x000000C0 // Enable INTs according to bits 5-0.
  671. //
  672. // Define the Status Register Bits.
  673. // Note: These are exactly the same as the Power 9000 bit definitions.
  674. // (Page 28)
  675. // 3 3 2
  676. // 1 0 9 8 7 6 5 4 3 2 1 0
  677. // -----------------------------------------------
  678. // | - | - | 0 | - | - | - | - | - | - | - | - |
  679. // -----------------------------------------------
  680. // | | | | | | | | | | |
  681. // | | | | | | | | | | ----> Quad intersects clip window.
  682. // | | | | | | | | | --------> Quad inside clip window.
  683. // | | | | | | | | ------------> Quad outside clip window.
  684. // | | | | | | | ----------------> Quad is concave.
  685. // | | | | | | --------------------> Quad must be done by software.
  686. // | | | | | ------------------------> Blit must be done by software.
  687. // | | | | ----------------------------> Pixel must be done by software.
  688. // | | | --------------------------------> Pick detected.
  689. // | | -------------------------------------> Reserved.
  690. // | ------------------------------------------> Drawing engine busy.
  691. // -----------------------------------------------> Quad/blit re-initiate.
  692. //
  693. #define P91_SR_QUAD_INTERSECT 0x00000001
  694. #define P91_SR_QUAD_VISIBLE 0x00000002
  695. #define P91_SR_QUAD_HIDDEN 0x00000004
  696. #define P91_SR_QUAD_CONCAVE 0x00000008
  697. #define P91_SR_QUAD_SOFTWARE 0x00000010
  698. #define P91_SR_BLIT_SOFTWARE 0x00000020
  699. #define P91_SR_PIXEL_SOFTWARE 0x00000040
  700. #define P91_SR_PICKED 0x00000080
  701. #define P91_SR_ENGINE_BUSY 0x40000000
  702. #define P91_SR_NO_REINITIATE 0x80000000
  703. //
  704. // Define the Draw Mode Register Bits.
  705. // Note: These are exactly the same as the Power 9000 bit definitions.
  706. // Page (34)
  707. // 3
  708. // 1 4 3 2 1 0
  709. // -------------------
  710. // | 0 | - - | - - |
  711. // -------------------
  712. // | | | | |
  713. // | | | | -----------------------> Pick write enable bit.
  714. // | | | -------------------------> Write enable Pick write enable bit.
  715. // | | -----------------------------> Buffer selection bit.
  716. // | -------------------------------> Write enable Buffer selection bit.
  717. // ------------------------------------> Reserved. Must be 0.
  718. //
  719. #define P91_WR_INSIDE_WINDOW 0x00000002
  720. #define P91_SUPPRESS_ALL_WRITES 0x00000003
  721. #define P91_DE_DRAW_BUFF_0 0x00000008
  722. #define P91_DE_DRAW_BUFF_1 0x0000000C
  723. //
  724. // Define the Raster Register Bits.
  725. // (Page 34)
  726. // 3 1 1 1 1 1 1 1
  727. // 1 8 7 6 5 4 3 2 8 7 0
  728. // ---------------------------------------------------
  729. // | 0 | - | - | - | - | - | 0 | - - - - - - - - |
  730. // ---------------------------------------------------
  731. // | | | | | | | | | | | | | | |
  732. // | | | | | | | ---------------
  733. // | | | | | | | |
  734. // | | | | | | | --------> Minterms.
  735. // | | | | | | --------------------> Reserved.
  736. // | | | | | -------------------------> Solid Color Disable.
  737. // | | | | -----------------------------> Pattern Depth.
  738. // | | | ---------------------------------> Transparent Pixel1 Enable.
  739. // | | -------------------------------------> Quad Draw Mode.
  740. // | -----------------------------------------> Transparent Pattern Enable.
  741. // ----------------------------------------------> Reserved.
  742. //
  743. #define P91_RR_SOLID_ENABLE 0x00000000
  744. #define P91_RR_SOLID_DISABLE 0x00002000
  745. #define P91_RR_2_CLR_PATTERN 0x00000000
  746. #define P91_RR_4_CLR_PATTERN 0x00004000
  747. #define P91_RR_TRANS_PIX1_DISABL 0x00000000
  748. #define P91_RR_TRANS_PIX1_ENABLE 0x00008000
  749. #define P91_RR_QUAD_X11_MODE 0x00000000
  750. #define P91_RR_QUAD_OVERSIZE 0x00010000
  751. #define P91_RR_TRANS_PAT_DISABL 0x00000000
  752. #define P91_RR_TRANS_PAT_ENABLE 0x00020000
  753. //
  754. // Define the Screen Repaint Timing Control (SRTCTL) Register Bits.
  755. // (Page 40)
  756. // 3 1 1 1
  757. // 1 2 1 0 9 8 7 6 5 4 3 2 0
  758. // -------------------------------------------------
  759. // | 0 | - | - - | - | - | 0 | - | - | - | - - - |
  760. // -------------------------------------------------
  761. // | | | | | | | | | | | | |
  762. // | | --- | | | | | | -----
  763. // | | | | | | | | | |
  764. // | | | | | | | | | -----> QSF Counter Position.
  765. // | | | | | | | | -----------> Buffer For Display.
  766. // | | | | | | | ---------------> Screen Repaint Mode.
  767. // | | | | | | -------------------> Enable Video.
  768. // | | | | | -----------------------> Reserved.
  769. // | | | | ---------------------------> Internal Horizontal Sync.
  770. // | | | -------------------------------> Internal Vertical Sync.
  771. // | | ------------------------------------> SRADDR Increment Value.
  772. // | -----------------------------------------> 24-Bit DAC Clock Skip Mode.
  773. // ----------------------------------------------> Reserved.
  774. //
  775. #define P91_SRTCTL_QSF_MSK 0x00000007
  776. #define P91_SRTCTL_DISP_BUFFER 0x00000004
  777. #define P91_SRTCTL_DISP_BUFF_0 0x00000000
  778. #define P91_SRTCTL_DISP_BUFF_1 0x00000004
  779. #define P91_SRTCTL_HBLNK_RELOAD 0x00000010
  780. #define P91_SRTCTL_HR_NORMAL 0x00000000
  781. #define P91_SRTCTL_HR_RESTRICTED 0x00000010
  782. #define P91_SRTCTL_ENABLE_VIDEO 0x00000020
  783. #define P91_SRTCTL_HSYNC 0x00000080
  784. #define P91_SRTCTL_HSYNC_EXT 0x00000000
  785. #define P91_SRTCTL_HSYNC_INT 0x00000080
  786. #define P91_SRTCTL_VSYNC 0x00000100
  787. #define P91_SRTCTL_VSYNC_EXT 0x00000000
  788. #define P91_SRTCTL_VSYNC_INT 0x00000100
  789. #define P91_SRTCTL_SRC_INCS 0x00000600
  790. #define P91_SRTCTL_SRC_INC_256 0x00000000
  791. #define P91_SRTCTL_SRC_INC_512 0x00000200
  792. #define P91_SRTCTL_SRC_INC_1024 0x00000400
  793. #define P91_SRTCTL_V_24EN 0x00000800
  794. #define P91_SRTCTL_24EN_DISABLE 0x00000000
  795. #define P91_SRTCTL_24EN_ENABLE 0x00000800
  796. //
  797. // Define the Screen Repaint Timing Control 2 (SRTCTL2) Register Bits.
  798. // (Page 40)
  799. // 3
  800. // 1 4 3 2 1 0
  801. // -------------------
  802. // | 0 | - - | - - |
  803. // -------------------
  804. // | | | | |
  805. // | --- ---
  806. // | | |
  807. // | | ------------------------> External VSYNC Polarity Control.
  808. // | ------------------------------> External HSYNC Polarity Control.
  809. // ------------------------------------> Reserved.
  810. //
  811. #define P91_SRTCTL2_EXT_VSYNC 0x00000003
  812. #if 0
  813. #define P91_VSYNC_LOW_TRUE 0x00000000
  814. #define P91_VSYNC_HIGH_TRUE 0x00000001
  815. #endif
  816. #define P91_VSYNC_LOW_FORCED 0x00000002
  817. #define P91_VSYNC_HIGH_FORCED 0x00000003
  818. #define P91_SRTCTL2_EXT_HSYNC 0x0000000C
  819. #if 0
  820. #define P91_HSYNC_LOW_TRUE 0x00000000
  821. #define P91_HSYNC_HIGH_TRUE 0x00000004
  822. #endif
  823. #define P91_HSYNC_LOW_FORCED 0x00000008
  824. #define P91_HSYNC_HIGH_FORCED 0x0000000C
  825. //
  826. // Define the Memory Configuration Register Bits.
  827. // (Page 42)
  828. // 9 8 7 6 5 4 3 2 0
  829. // -------------------------------------
  830. // | - | - | - | - | - | - | - | - - - |
  831. // -------------------------------------
  832. // | | | | | | | | | |
  833. // | | | | | | | -----
  834. // | | | | | | | |
  835. // | | | | | | | -------> VRAM Memory Confiuration [2..0].
  836. // | | | | | | -------------> VRAM Row Miss Timing Adjustment.
  837. // | | | | | -----------------> VRAM Read Timing Adjustment.
  838. // | | | | ---------------------> VRAM Write Timing Adjustment.
  839. // | | | -------------------------> VCP Priority Select.
  840. // | | -----------------------------> RAMDAC Access Adjustment.
  841. // | ---------------------------------> DAC Read/Write signalling mode.
  842. // -------------------------------------> Memory/Video Reset.
  843. //
  844. // 2 2 1 1 1 1 1 1 1 1
  845. // 1 0 9 8 7 6 5 3 2 0
  846. // ---------------------------------------
  847. // | - | - | - | 0 | - - | - - - | - - - |
  848. // ---------------------------------------
  849. // | | | | | | | | | | | |
  850. // | | | | --- ----- -----
  851. // | | | | | | |
  852. // | | | | | | -----> VRAM Shift Clock State Macine.
  853. // | | | | | -------------> Internal CRTC Divided Dot Clock.
  854. // | | | | --------------------> Muxsel pin polarity.
  855. // | | | -------------------------> Reserved.
  856. // | | -----------------------------> Clock Edge Syrchonization.
  857. // | ---------------------------------> Video Clock Source Selection.
  858. // -------------------------------------> Additional Divide for Video Transfer.
  859. //
  860. // 3 3 2 2 2 2 2 2 2 2
  861. // 1 0 9 8 7 6 5 4 3 2
  862. // -----------------------------------
  863. // | - | - | - | - - | 0 | - - | - - |
  864. // -----------------------------------
  865. // | | | | | | | | | |
  866. // | | | --- --- ---
  867. // | | | | | | |
  868. // | | | | | | --------> Shift Clock Timing Pattern Selection.
  869. // | | | | | --------------> Serial Output Timing Pattern Selection.
  870. // | | | | -------------------> Reserved.
  871. // | | | ------------------------> Blank Generation Delay Selection.
  872. // | | -----------------------------> VRAM Memory Configuration [3].
  873. // | ---------------------------------> Slow Host Interface Adjustment.
  874. // -------------------------------------> VRAM REad Timing Adjustment.
  875. //
  876. //
  877. //
  878. #define P91_MC_CNFG_2_0_MSK 0x00000007
  879. #define P91_MC_CNFG_3_MSK 0x20000000
  880. #define P91_MC_CNFG_MSK 0x20000007
  881. #define P91_MC_CNFG_1 0x00000001 // 2 banks, 128K VRAMs, 1 1Mb buffer.
  882. #define P91_MC_CNFG_3 0x00000003 // 4 banks, 128K VRAMs, 1 2Mb buffer.
  883. #define P91_MC_CNFG_4 0x00000004 // 1 bank, 256K VRAMs, 1 1Mb buffer.
  884. #define P91_MC_CNFG_5 0x00000005 // 2 banks, 256K VRAMs, 1 2Mb buffer.
  885. #define P91_MC_CNFG_7 0x00000007 // 4 banks, 256K VRAMs, 1 4Mb buffer.
  886. #define P91_MC_CNFG_11 0x20000003 // 4 banks, 128K VRAMs, 2 1Mb buffers.
  887. #define P91_MC_CNFG_14 0x20000006 // 2 banks, 256K VRAMs, 2 1Mb buffers.
  888. #define P91_MC_CNFG_15 0x20000007 // 4 banks, 256K VRAMs, 2 2Mb buffers.
  889. #define P91_MC_MISS_ADJ_0 0x00000000
  890. #define P91_MC_MISS_ADJ_1 0x00000008
  891. #define P91_MC_READ_ADJ_0 0x00000000
  892. #define P91_MC_READ_ADJ_1 0x00000010
  893. #define P91_MC_WRITE_ADJ_0 0x00000000
  894. #define P91_MC_WRITE_ADJ_1 0x00000020
  895. #define P91_MC_VCP_PRIORITY_LO 0x00000000
  896. #define P91_MC_VCP_PRIORITY_HI 0x00000040
  897. #define P91_MC_DAC_ACCESS_ADJ_0 0x00000000
  898. #define P91_MC_DAC_ACCESS_ADJ_1 0x00000080
  899. #define P91_MC_DAC_MODE_0 0x00000000
  900. #define P91_MC_DAC_MODE_1 0x00000100
  901. #define P91_MC_HOLD_RESET 0x00000200
  902. #define P91_MC_MEM_VID_NORMAL 0x00000000
  903. #define P91_MC_MEM_VID_RESET 0x00000200
  904. #define P91_MC_SHFT_CLK_DIV_1 0x00000000
  905. #define P91_MC_SHFT_CLK_DIV_2 0x00000400
  906. #define P91_MC_SHFT_CLK_DIV_4 0x00000800
  907. #define P91_MC_SHFT_CLK_DIV_8 0x00000C00
  908. #define P91_MC_SHFT_CLK_DIV_16 0x00001000
  909. #define P91_MC_CRTC_CLK_DIV_1 0x00000000
  910. #define P91_MC_CRTC_CLK_DIV_2 0x00002000
  911. #define P91_MC_CRTC_CLK_DIV_4 0x00004000
  912. #define P91_MC_CRTC_CLK_DIV_8 0x00006000
  913. #define P91_MC_CRTC_CLK_DIV_16 0x00008000
  914. #define P91_MC_MUXSEL_NORMAL 0x00000000
  915. #define P91_MC_MUXSEL_INVERT 0x00010000
  916. #define P91_MC_MUXSEL_LOW 0x00020000
  917. #define P91_MC_MUXSEL_HIGH 0x00030000
  918. #define P91_MC_BLANK_EDGE_MSK 0x00080000
  919. #define P91_MC_SYNC_RISE_EDGE 0x00000000
  920. #define P91_MC_SYNC_FALL_EDGE 0x00080000
  921. #define P91_MC_VCLK_SRC_PIXCLK 0x00000000
  922. #define P91_MC_VCLK_SRC_DDOTCLK 0x00100000
  923. #define P91_MC_VAD_DIV_1 0x00000000
  924. #define P91_MC_VAD_DIV_2 0x00200000
  925. #define P91_MC_SHFT_CLK_1_BANK 0x00000000
  926. #define P91_MC_SHFT_CLK_2_BANK 0x00400000
  927. #define P91_MC_SHFT_CLK_4_BANK 0x00800000
  928. #define P91_MC_SERIAL_OUT_1_BANK 0x00000000
  929. #define P91_MC_SERIAL_OUT_2_BANK 0x01000000
  930. #define P91_MC_SERIAL_OUT_4_BANK 0x02000000
  931. #define P91_MC_BLNKDLY_MSK 0x18000000
  932. #define P91_MC_BLNKDLY_0_CLK 0x00000000
  933. #define P91_MC_BLNKDLY_1_CLK 0x08000000
  934. #define P91_MC_BLNKDLY_2_CLK 0x10000000
  935. #define P91_MC_BLNKDLY_3_CLK 0x18000000
  936. #define P91_MC_SLOW_HOST_ADJ_0 0x00000000
  937. #define P91_MC_SLOW_HOST_ADJ_1 0x40000000
  938. #define P91_MC_READ_SMPL_ADJ_0 0x00000000
  939. #define P91_MC_READ_SMPL_ADJ_1 0x80000000
  940. //
  941. // structure for temporary storage for VGA / Graphic switching
  942. //
  943. typedef struct _VGA_REGS {
  944. UCHAR MiscOut;
  945. UCHAR CR[0x18];
  946. UCHAR SR[4];
  947. UCHAR GR[8];
  948. UCHAR AR[0x14];
  949. UCHAR LUT[3 * 256];
  950. } VGA_REGS, *PVGA_REGS;