diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/video/tdfx.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/video/tdfx.h b/include/video/tdfx.h index 7431d9681e57..befbaf0a92d8 100644 --- a/include/video/tdfx.h +++ b/include/video/tdfx.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef _TDFX_H | 1 | #ifndef _TDFX_H |
2 | #define _TDFX_H | 2 | #define _TDFX_H |
3 | 3 | ||
4 | #include <linux/i2c.h> | ||
5 | #include <linux/i2c-algo-bit.h> | ||
6 | |||
4 | /* membase0 register offsets */ | 7 | /* membase0 register offsets */ |
5 | #define STATUS 0x00 | 8 | #define STATUS 0x00 |
6 | #define PCIINIT0 0x04 | 9 | #define PCIINIT0 0x04 |
@@ -123,6 +126,18 @@ | |||
123 | #define VIDCFG_PIXFMT_SHIFT 18 | 126 | #define VIDCFG_PIXFMT_SHIFT 18 |
124 | #define DACMODE_2X BIT(0) | 127 | #define DACMODE_2X BIT(0) |
125 | 128 | ||
129 | /* I2C bit locations in the VIDSERPARPORT register */ | ||
130 | #define DDC_ENAB 0x00040000 | ||
131 | #define DDC_SCL_OUT 0x00080000 | ||
132 | #define DDC_SDA_OUT 0x00100000 | ||
133 | #define DDC_SCL_IN 0x00200000 | ||
134 | #define DDC_SDA_IN 0x00400000 | ||
135 | #define I2C_ENAB 0x00800000 | ||
136 | #define I2C_SCL_OUT 0x01000000 | ||
137 | #define I2C_SDA_OUT 0x02000000 | ||
138 | #define I2C_SCL_IN 0x04000000 | ||
139 | #define I2C_SDA_IN 0x08000000 | ||
140 | |||
126 | /* VGA rubbish, need to change this for multihead support */ | 141 | /* VGA rubbish, need to change this for multihead support */ |
127 | #define MISC_W 0x3c2 | 142 | #define MISC_W 0x3c2 |
128 | #define MISC_R 0x3cc | 143 | #define MISC_R 0x3cc |
@@ -168,12 +183,23 @@ struct banshee_reg { | |||
168 | unsigned long miscinit0; | 183 | unsigned long miscinit0; |
169 | }; | 184 | }; |
170 | 185 | ||
186 | struct tdfx_par; | ||
187 | |||
188 | struct tdfxfb_i2c_chan { | ||
189 | struct tdfx_par *par; | ||
190 | struct i2c_adapter adapter; | ||
191 | struct i2c_algo_bit_data algo; | ||
192 | }; | ||
193 | |||
171 | struct tdfx_par { | 194 | struct tdfx_par { |
172 | u32 max_pixclock; | 195 | u32 max_pixclock; |
173 | u32 palette[16]; | 196 | u32 palette[16]; |
174 | void __iomem *regbase_virt; | 197 | void __iomem *regbase_virt; |
175 | unsigned long iobase; | 198 | unsigned long iobase; |
176 | int mtrr_handle; | 199 | int mtrr_handle; |
200 | #ifdef CONFIG_FB_3DFX_I2C | ||
201 | struct tdfxfb_i2c_chan chan[2]; | ||
202 | #endif | ||
177 | }; | 203 | }; |
178 | 204 | ||
179 | #endif /* __KERNEL__ */ | 205 | #endif /* __KERNEL__ */ |