vino.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. /*
  2. * Copyright (C) 1999 Ulf Karlsson <ulfc@bun.falkenberg.se>
  3. * Copyright (C) 2003 Ladislav Michl <ladis@linux-mips.org>
  4. */
  5. #ifndef VINO_H
  6. #define VINO_H
  7. #define VINO_BASE 0x00080000 /* Vino is in the EISA address space,
  8. * but it is not an EISA bus card */
  9. struct sgi_vino_channel {
  10. u32 _pad_alpha;
  11. volatile u32 alpha;
  12. #define VINO_CLIP_X(x) ((x) & 0x3ff) /* bits 0:9 */
  13. #define VINO_CLIP_ODD(x) (((x) & 0x1ff) << 10) /* bits 10:18 */
  14. #define VINO_CLIP_EVEN(x) (((x) & 0x1ff) << 19) /* bits 19:27 */
  15. u32 _pad_clip_start;
  16. volatile u32 clip_start;
  17. u32 _pad_clip_end;
  18. volatile u32 clip_end;
  19. #define VINO_FRAMERT_PAL (1<<0) /* 0=NTSC 1=PAL */
  20. #define VINO_FRAMERT_RT(x) (((x) & 0x1fff) << 1) /* bits 1:12 */
  21. u32 _pad_frame_rate;
  22. volatile u32 frame_rate;
  23. u32 _pad_field_counter;
  24. volatile u32 field_counter;
  25. u32 _pad_line_size;
  26. volatile u32 line_size;
  27. u32 _pad_line_count;
  28. volatile u32 line_count;
  29. u32 _pad_page_index;
  30. volatile u32 page_index;
  31. u32 _pad_next_4_desc;
  32. volatile u32 next_4_desc;
  33. u32 _pad_start_desc_tbl;
  34. volatile u32 start_desc_tbl;
  35. #define VINO_DESC_JUMP (1<<30)
  36. #define VINO_DESC_STOP (1<<31)
  37. #define VINO_DESC_VALID (1<<32)
  38. u32 _pad_desc_0;
  39. volatile u32 desc_0;
  40. u32 _pad_desc_1;
  41. volatile u32 desc_1;
  42. u32 _pad_desc_2;
  43. volatile u32 desc_2;
  44. u32 _pad_Bdesc_3;
  45. volatile u32 desc_3;
  46. u32 _pad_fifo_thres;
  47. volatile u32 fifo_thres;
  48. u32 _pad_fifo_read;
  49. volatile u32 fifo_read;
  50. u32 _pad_fifo_write;
  51. volatile u32 fifo_write;
  52. };
  53. struct sgi_vino {
  54. #define VINO_CHIP_ID 0xb
  55. #define VINO_REV_NUM(x) ((x) & 0x0f)
  56. #define VINO_ID_VALUE(x) (((x) & 0xf0) >> 4)
  57. u32 _pad_rev_id;
  58. volatile u32 rev_id;
  59. #define VINO_CTRL_LITTLE_ENDIAN (1<<0)
  60. #define VINO_CTRL_A_FIELD_TRANS_INT (1<<1) /* Field transferred int */
  61. #define VINO_CTRL_A_FIFO_OF_INT (1<<2) /* FIFO overflow int */
  62. #define VINO_CTRL_A_END_DESC_TBL_INT (1<<3) /* End of desc table int */
  63. #define VINO_CTRL_A_INT (VINO_CTRL_A_FIELD_TRANS_INT | \
  64. VINO_CTRL_A_FIFO_OF_INT | \
  65. VINO_CTRL_A_END_DESC_TBL_INT)
  66. #define VINO_CTRL_B_FIELD_TRANS_INT (1<<4) /* Field transferred int */
  67. #define VINO_CTRL_B_FIFO_OF_INT (1<<5) /* FIFO overflow int */
  68. #define VINO_CTRL_B_END_DESC_TBL_INT (1<<6) /* End of desc table int */
  69. #define VINO_CTRL_B_INT (VINO_CTRL_B_FIELD_TRANS_INT | \
  70. VINO_CTRL_B_FIFO_OF_INT | \
  71. VINO_CTRL_B_END_DESC_TBL_INT)
  72. #define VINO_CTRL_A_DMA_ENBL (1<<7)
  73. #define VINO_CTRL_A_INTERLEAVE_ENBL (1<<8)
  74. #define VINO_CTRL_A_SYNC_ENBL (1<<9)
  75. #define VINO_CTRL_A_SELECT (1<<10) /* 1=D1 0=Philips */
  76. #define VINO_CTRL_A_RGB (1<<11) /* 1=RGB 0=YUV */
  77. #define VINO_CTRL_A_LUMA_ONLY (1<<12)
  78. #define VINO_CTRL_A_DEC_ENBL (1<<13) /* Decimation */
  79. #define VINO_CTRL_A_DEC_SCALE_MASK 0x1c000 /* bits 14:17 */
  80. #define VINO_CTRL_A_DEC_SCALE_SHIFT (14)
  81. #define VINO_CTRL_A_DEC_HOR_ONLY (1<<17) /* Horizontal only */
  82. #define VINO_CTRL_A_DITHER (1<<18) /* 24 -> 8 bit dither */
  83. #define VINO_CTRL_B_DMA_ENBL (1<<19)
  84. #define VINO_CTRL_B_INTERLEAVE_ENBL (1<<20)
  85. #define VINO_CTRL_B_SYNC_ENBL (1<<21)
  86. #define VINO_CTRL_B_SELECT (1<<22) /* 1=D1 0=Philips */
  87. #define VINO_CTRL_B_RGB (1<<23) /* 1=RGB 0=YUV */
  88. #define VINO_CTRL_B_LUMA_ONLY (1<<24)
  89. #define VINO_CTRL_B_DEC_ENBL (1<<25) /* Decimation */
  90. #define VINO_CTRL_B_DEC_SCALE_MASK 0x1c000000 /* bits 26:28 */
  91. #define VINO_CTRL_B_DEC_SCALE_SHIFT (26)
  92. #define VINO_CTRL_B_DEC_HOR_ONLY (1<<29) /* Decimation horizontal only */
  93. #define VINO_CTRL_B_DITHER (1<<30) /* ChanB 24 -> 8 bit dither */
  94. u32 _pad_control;
  95. volatile u32 control;
  96. #define VINO_INTSTAT_A_FIELD_TRANS (1<<0) /* Field transferred int */
  97. #define VINO_INTSTAT_A_FIFO_OF (1<<1) /* FIFO overflow int */
  98. #define VINO_INTSTAT_A_END_DESC_TBL (1<<2) /* End of desc table int */
  99. #define VINO_INTSTAT_A (VINO_INTSTAT_A_FIELD_TRANS | \
  100. VINO_INTSTAT_A_FIFO_OF | \
  101. VINO_INTSTAT_A_END_DESC_TBL)
  102. #define VINO_INTSTAT_B_FIELD_TRANS (1<<3) /* Field transferred int */
  103. #define VINO_INTSTAT_B_FIFO_OF (1<<4) /* FIFO overflow int */
  104. #define VINO_INTSTAT_B_END_DESC_TBL (1<<5) /* End of desc table int */
  105. #define VINO_INTSTAT_B (VINO_INTSTAT_B_FIELD_TRANS | \
  106. VINO_INTSTAT_B_FIFO_OF | \
  107. VINO_INTSTAT_B_END_DESC_TBL)
  108. u32 _pad_intr_status;
  109. volatile u32 intr_status;
  110. u32 _pad_i2c_control;
  111. volatile u32 i2c_control;
  112. u32 _pad_i2c_data;
  113. volatile u32 i2c_data;
  114. struct sgi_vino_channel a;
  115. struct sgi_vino_channel b;
  116. };
  117. #endif