There is a bug in the CKRM CPU scheduler. This has been reported to the
[linux-2.6.git] / drivers / media / video / vino.h
1 /*
2  * Copyright (C) 1999 Ulf Carlsson (ulfc@bun.falkenberg.se)
3  * Copyright (C) 2001 Ralf Baechle (ralf@gnu.org)
4  */
5
6 #define VINO_BASE               0x00080000      /* In EISA address space */
7
8 #define VINO_REVID              0x0000
9 #define VINO_CTRL               0x0008
10 #define VINO_INTSTAT            0x0010  /* Interrupt status */
11 #define VINO_I2C_CTRL           0x0018
12 #define VINO_I2C_DATA           0x0020
13 #define VINO_A_ALPHA            0x0028  /* Channel A ... */
14 #define VINO_A_CLIPS            0x0030  /* Clipping start */
15 #define VINO_A_CLIPE            0x0038  /* Clipping end */
16 #define VINO_A_FRAMERT          0x0040  /* Framerate */
17 #define VINO_A_FLDCNT           0x0048  /* Field counter */
18 #define VINO_A_LNSZ             0x0050
19 #define VINO_A_LNCNT            0x0058
20 #define VINO_A_PGIX             0x0060  /* Page index */
21 #define VINO_A_DESC_PTR         0x0068  /* Ptr to next four descriptors */
22 #define VINO_A_DESC_TLB_PTR     0x0070  /* Ptr to start of descriptor table */
23 #define VINO_A_DESC_DATA0       0x0078  /* Descriptor data 0 */
24 #define VINO_A_DESC_DATA1       0x0080  /* ... */
25 #define VINO_A_DESC_DATA2       0x0088
26 #define VINO_A_DESC_DATA3       0x0090
27 #define VINO_A_FIFO_THRESHOLD   0x0098  /* FIFO threshold */
28 #define VINO_A_FIFO_RP          0x00a0
29 #define VINO_A_FIFO_WP          0x00a8
30 #define VINO_B_ALPHA            0x00b0  /* Channel B ... */
31 #define VINO_B_CLIPS            0x00b8
32 #define VINO_B_CLIPE            0x00c0
33 #define VINO_B_FRAMERT          0x00c8
34 #define VINO_B_FLDCNT           0x00d0
35 #define VINO_B_LNSZ             0x00d8
36 #define VINO_B_LNCNT            0x00e0
37 #define VINO_B_PGIX             0x00e8
38 #define VINO_B_DESC_PTR         0x00f0
39 #define VINO_B_DESC_TLB_PTR     0x00f8
40 #define VINO_B_DESC_DATA0       0x0100
41 #define VINO_B_DESC_DATA1       0x0108
42 #define VINO_B_DESC_DATA2       0x0110
43 #define VINO_B_DESC_DATA3       0x0118
44 #define VINO_B_FIFO_THRESHOLD   0x0120
45 #define VINO_B_FIFO_RP          0x0128
46 #define VINO_B_FIFO_WP          0x0130
47
48 /* Bits in the VINO_REVID register */
49
50 #define VINO_REVID_REV_MASK             0x000f  /* bits 0:3 */
51 #define VINO_REVID_ID_MASK              0x00f0  /* bits 4:7 */
52
53 /* Bits in the VINO_CTRL register */
54
55 #define VINO_CTRL_LITTLE_ENDIAN         (1<<0)
56 #define VINO_CTRL_A_FIELD_TRANS_INT     (1<<1)  /* Field transferred int */
57 #define VINO_CTRL_A_FIFO_OF_INT         (1<<2)  /* FIFO overflow int */
58 #define VINO_CTRL_A_END_DESC_TBL_INT    (1<<3)  /* End of desc table int */
59 #define VINO_CTRL_B_FIELD_TRANS_INT     (1<<4)  /* Field transferred int */
60 #define VINO_CTRL_B_FIFO_OF_INT         (1<<5)  /* FIFO overflow int */
61 #define VINO_CTRL_B_END_DESC_TLB_INT    (1<<6)  /* End of desc table int */
62 #define VINO_CTRL_A_DMA_ENBL            (1<<7)
63 #define VINO_CTRL_A_INTERLEAVE_ENBL     (1<<8)
64 #define VINO_CTRL_A_SYNC_ENBL           (1<<9)
65 #define VINO_CTRL_A_SELECT              (1<<10) /* 1=D1 0=Philips */
66 #define VINO_CTRL_A_RGB                 (1<<11) /* 1=RGB 0=YUV */
67 #define VINO_CTRL_A_LUMA_ONLY           (1<<12)
68 #define VINO_CTRL_A_DEC_ENBL            (1<<13) /* Decimation */
69 #define VINO_CTRL_A_DEC_SCALE_MASK      0x1c000 /* bits 14:17 */
70 #define VINO_CTRL_A_DEC_HOR_ONLY        (1<<17) /* Horizontal only */
71 #define VINO_CTRL_A_DITHER              (1<<18) /* 24 -> 8 bit dither */
72 #define VINO_CTRL_B_DMA_ENBL            (1<<19)
73 #define VINO_CTRL_B_INTERLEAVE_ENBL     (1<<20)
74 #define VINO_CTRL_B_SYNC_ENBL           (1<<21)
75 #define VINO_CTRL_B_SELECT              (1<<22) /* 1=D1 0=Philips */
76 #define VINO_CTRL_B_RGB                 (1<<22) /* 1=RGB 0=YUV */
77 #define VINO_CTRL_B_LUMA_ONLY           (1<<23)
78 #define VINO_CTRL_B_DEC_ENBL            (1<<24) /* Decimation */
79 #define VINO_CTRL_B_DEC_SCALE_MASK      0x1c000000      /* bits 25:28 */
80 #define VINO_CTRL_B_DEC_HOR_ONLY        (1<<29) /* Decimation horizontal only */
81 #define VINO_CTRL_B_DITHER              (1<<30) /* ChanB 24 -> 8 bit dither */
82
83 /* Bits in the Interrupt and Status register */
84
85 #define VINO_INTSTAT_A_FIELD_TRANS      (1<<0)  /* Field transferred int */
86 #define VINO_INTSTAT_A_FIFO_OF          (1<<1)  /* FIFO overflow int */
87 #define VINO_INTSTAT_A_END_DESC_TBL     (1<<2)  /* End of desc table int */
88 #define VINO_INTSTAT_B_FIELD_TRANS      (1<<3)  /* Field transferred int */
89 #define VINO_INTSTAT_B_FIFO_OF          (1<<4)  /* FIFO overflow int */
90 #define VINO_INTSTAT_B_END_DESC_TBL     (1<<5)  /* End of desc table int */
91
92 /* Bits in the Clipping Start register */
93
94 #define VINO_CLIPS_START                0x3ff           /* bits 0:9 */
95 #define VINO_CLIPS_ODD_MASK             0x7fc00         /* bits 10:18 */
96 #define VINO_CLIPS_EVEN_MASK            0xff80000       /* bits 19:27 */
97
98 /* Bits in the Clipping End register */
99
100 #define VINO_CLIPE_END                  0x3ff           /* bits 0:9 */
101 #define VINO_CLIPE_ODD_MASK             0x7fc00         /* bits 10:18 */
102 #define VINO_CLIPE_EVEN_MASK            0xff80000       /* bits 19:27 */
103
104 /* Bits in the Frame Rate register */
105
106 #define VINO_FRAMERT_PAL                (1<<0)  /* 0=NTSC 1=PAL */
107 #define VINO_FRAMERT_RT_MASK            0x1ffe          /* bits 1:12 */
108
109 /* Bits in the VINO_I2C_CTRL */
110
111 #define VINO_CTRL_I2C_IDLE              (1<<0)  /* write: 0=force idle
112                                                  * read: 0=idle 1=not idle */
113 #define VINO_CTRL_I2C_DIR               (1<<1)  /* 0=read 1=write */
114 #define VINO_CTRL_I2C_MORE_BYTES        (1<<2)  /* 0=last byte 1=more bytes */
115 #define VINO_CTRL_I2C_TRANS_BUSY        (1<<4)  /* 0=trans done 1=trans busy */
116 #define VINO_CTRL_I2C_ACK               (1<<5)  /* 0=ack received 1=ack not */
117 #define VINO_CTRL_I2C_BUS_ERROR         (1<<7)  /* 0=no bus err 1=bus err */