Annotation of margi2/l64014.h, revision 1.2
1.1 cvs 1: /*
2: l64014.h
3:
4: Copyright (C) Marcus Metzler for convergence integrated media.
5:
6: This program is free software; you can redistribute it and/or modify
7: it under the terms of the GNU General Public License as published by
8: the Free Software Foundation; either version 2 of the License, or
9: (at your option) any later version.
10:
11: This program is distributed in the hope that it will be useful,
12: but WITHOUT ANY WARRANTY; without even the implied warranty of
13: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: GNU General Public License for more details.
15:
16: You should have received a copy of the GNU General Public License
17: along with this program; if not, write to the Free Software
18: Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19: */
20:
21: #ifndef L64014_h
22: #define L64014_h
23:
24: #include <linux/kernel.h>
25: #include <linux/config.h>
26: #include <linux/pci.h>
27:
28:
29: #define DIO_CONTROL_INDEX 0x00
30: #define DIO_CONTROL_DATA 0x02
31: #define DIO_LSI_STATUS 0x04
32: #define DIO_LSI_CHANNEL_DATA 0x04
33: #define DIO_LSI_INDEX_LOW 0x08
34: #define DIO_LSI_DATA 0x0A
35: #define DIO_LSI_INDEX_HIGH 0x0C
36:
37: #define LSI_READY 0x08
38: #define LSI_WAIT 0x04
39: #define LSI_ARQ 0x02
40: #define LSI_VRQ 0x01
41:
42: #define IIO_ID 0x00
43: #define IIO_MODE 0x01
44: #define IIO_IRQ_CONTROL 0x02
45: #define IIO_IRQ_STATUS 0x03
46: #define IIO_LSI_CONTROL 0x06
47: #define IIO_OSC_AUD 0x08
48: #define IIO_VIDEO_CONTROL0 0x09
49: #define IIO_VIDEO_CONTROL1 0x0A
50: #define IIO_VIDEO_LOOKUP 0x0B
51: #define IIO_EEPROM_CONTROL 0x0C
52: #define IIO_VIDEO_HOR_DELAY 0x0D
53: #define IIO_VIDEO_HOR_ACTIVE 0x0E
54: #define IIO_VIDEO_HOR_HIGH 0x0F
55: #define IIO_GPIO_CONTROL 0x10
56: #define IIO_GPIO_PINS 0x11
57: #define IIO_CSS_COMMAND 0x12
58: #define IIO_CSS_STATUS 0x13
59: #define IIO_CSS_KEY 0x14
60:
61: #define SCL 0x02
62: #define SDA 0x04
63:
64: #define CS_CONTROL0 0x00
65: #define CS_CONTROL1 0x01
66: #define CS_CONTROL2 0x02
67: #define CS_DAC 0x04
68: #define CS_STATUS 0x07
69: #define CS_BKG_COL 0x08
70: #define CS_GPIO_CTRL 0x09
71: #define CS_GPIO_DATA 0x0A
72: #define CS_C_AMP 0x0D
73: #define CS_Y_AMP 0x0E
74: #define CS_I2C_ADR 0x0F
75: #define CS_SC_AMP 0x10
76: #define CS_SC_SYNTH0 0x11
77: #define CS_SC_SYNTH1 0x12
78: #define CS_SC_SYNTH2 0x13
79: #define CS_SC_SYNTH3 0x14
80: #define CS_HUE_LSB 0x15
81: #define CS_HUE_MSB 0x16
82: #define CS_CC_EN 0x18
83: #define CS_CC_21_1 0x19
84: #define CS_CC_21_2 0x1A
85: #define CS_CC_284_1 0x1B
86: #define CS_CC_284_2 0x1C
87: #define CS_INT_EN 0x3B
88: #define CS_INT_CLR 0x3C
89: #define CS_ID_REG 0x3D
90:
91:
92: #define CSS_COMMAND 0x12
93: #define CSS_STATUS 0x13
94: #define CSS_KEY 0x14
95:
96: #define L14_CSS_NONE 0x00
97: #define L14_CSS_PASSTHRU 0x01
98: #define L14_CSS_DESCRAM 0x05
99: #define L14_CSS_GEN_CH 0x08
100: #define L14_CSS_RD_CH 0x09
101: #define L14_CSS_WR_CH 0x0a
102: #define L14_CSS_WR_DRVREF 0x0b
103: #define L14_CSS_DRVAUTH 0x0c
104: #define L14_CSS_DECAUTH 0x0d
105: #define L14_CSS_DISCKEY 0x0e
106: #define L14_CSS_TITLEKEY 0x0f
107: #define L14_CSS_CMD_START 0x10
108:
109: #define L14_CSS_BUSY 0x01
110: #define L14_CSS_SUCCESS 0x02
111:
112: #define DSVC 0x40
113: #define RR 0x20
114: #define DR 0x01
115: #define AF1 0x20
116: #define AF0 0x10
117: #define SLEEP 0x08
118: #define AFS2 0x04
119: #define AFS1 0x02
120: #define AFS0 0x01
121:
1.2 ! mocm 122: #define ZVCLK13 0x04
! 123: #define ZVCLKINV 0x08
! 124: #define ZV16BIT 0x10
! 125: #define ZVVREF_INVERT 0x08
! 126: #define ZVHREF_INVERT 0x10
! 127: #define HSYNC_INVERT 0x20
! 128: #define ZV_OVERRIDE 0x40
! 129: #define ZV_ENABLE 0x80
! 130:
! 131:
1.1 cvs 132: #define IRQ_EN 0x04
133: #define IRQ_MSK 0x08
134: #define IRQ_POL 0x10
135: #define DEC_EN 0x20
136: #define DEC_INT 0x10
137: #define VSYNC_EN 0x80
138: #define VSYNC_INT 0x40
139:
140: #define VMS_NOSY 0x00
141: #define VMS_NTSC 0x01
142: #define VMS_PAL 0x02
143: #define VMS_PAL24 0x03
144:
1.2 ! mocm 145: #define MAUDIO_PAUSE 0
! 146: #define MAUDIO_PLAY 1
! 147: #define MAUDIO_FAST 2
! 148: #define MAUDIO_SLOW 3
1.1 cvs 149:
150:
151: #define RegisterReadByte(card,where) read_indexed_register(&(card->link),(where))
152: #define RegisterWriteByte(card,where,what) write_indexed_register(&(card->link),where,what)
153: #define RegisterMaskByte(card,where,mask,bits) RegisterWriteByte(card,where,(RegisterReadByte(card,where)&~(mask))|(bits))
154: #define RegisterSetByte(card,where,bits) RegisterWriteByte(card,where,RegisterReadByte(card,where)|(bits))
155: #define RegisterDelByte(card,where,mask) RegisterWriteByte(card,where,RegisterReadByte(card,where)&~(mask))
156:
157: #define RegisterReadWord(card,where) (\
158: (u16)RegisterReadByte(card,where)|\
159: ((u16)RegisterReadByte(card,(where)+1)<<8))
160: #define RegisterWriteWord(card,where,what) {\
161: RegisterWriteByte(card,where,(what) & 0xFF);\
162: RegisterWriteByte(card,(where)+1,((what)>>8) & 0xFF);}
163:
164: // 3-byte-wide (medium word, 24 Bit) access to the card's registers, LSB first
165: #define RegisterReadMWord(card,where) (\
166: (u32)RegisterReadByte(card,where)|\
167: ((u32)RegisterReadByte(card,(where)+1)<<8)|\
168: ((u32)RegisterReadByte(card,(where)+2)<<16))
169: #define RegisterWriteMWord(card,where,what) {\
170: RegisterWriteByte(card,where,(what) & 0xFF);\
171: RegisterWriteByte(card,(where)+1,((what)>>8) & 0xFF);\
172: RegisterWriteByte(card,(where)+2,((what)>>16) & 0xFF);}
173:
174: // double-word-wide access to the card's registers, LSB first
175: //#define RegisterReadDWord(card,where) le32_to_cpu(readl(card->addr+(where)))
176: //#define RegisterWriteDWord(card,where,what) writel(cpu_to_le32(what),card->addr+(where))
177: #define RegisterReadDWord(card,where) (\
178: (u32)RegisterReadByte(card,where)|\
179: ((u32)RegisterReadByte(card,(where)+1)<<8)|\
180: ((u32)RegisterReadByte(card,(where)+2)<<16)|\
181: ((u32)RegisterReadByte(card,(where)+3)<<24))
182: #define RegisterWriteDWord(card,where,what) {\
183: RegisterWriteByte(card,where,(what) & 0xFF);\
184: RegisterWriteByte(card,(where)+1,((what)>>8) & 0xFF);\
185: RegisterWriteByte(card,(where)+2,((what)>>16) & 0xFF);\
186: RegisterWriteByte(card,(where)+3,((what)>>24) & 0xFF);}
187:
188: #endif
LinuxTV legacy CVS <linuxtv.org/cvs>