3 Copyright 1996,2002 Gregory D. Hager, Alfred A. Rizzi, Noah J. Cowan,
4 Jason Lapenta, Scott Smedley
6 This file is part of the DT3155 Device Driver.
8 The DT3155 Device Driver is free software; you can redistribute it
9 and/or modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
13 The DT3155 Device Driver is distributed in the hope that it will be
14 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
15 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with the DT3155 Device Driver; if not, write to the Free
20 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26 Date Programmer Description of changes made
27 -------------------------------------------------------------------
28 24-Jul-2002 SS GPL licence.
32 /* This code is a modified version of examples provided by Data Translations.*/
37 /***************** 32 bit register globals **************/
39 /* offsets for 32-bit memory mapped registers */
41 #define EVEN_DMA_START 0x000
42 #define ODD_DMA_START 0x00C
43 #define EVEN_DMA_STRIDE 0x018
44 #define ODD_DMA_STRIDE 0x024
45 #define EVEN_PIXEL_FMT 0x030
46 #define ODD_PIXEL_FMT 0x034
47 #define FIFO_TRIGGER 0x038
48 #define XFER_MODE 0x03C
50 #define RETRY_WAIT_CNT 0x044
52 #define EVEN_FLD_MASK 0x04C
53 #define ODD_FLD_MASK 0x050
54 #define MASK_LENGTH 0x054
55 #define FIFO_FLAG_CNT 0x058
56 #define IIC_CLK_DUR 0x05C
57 #define IIC_CSR1 0x060
58 #define IIC_CSR2 0x064
59 #define EVEN_DMA_UPPR_LMT 0x08C
60 #define ODD_DMA_UPPR_LMT 0x090
62 #define CLK_DUR_VAL 0x01010101
66 /******** Assignments and Typedefs for 32 bit Memory Mapped Registers ********/
68 typedef union fifo_trigger_tag
{
78 typedef union xfer_mode_tag
{
89 typedef union csr1_tag
{
110 typedef union retry_wait_cnt_tag
{
118 typedef union int_csr_tag
{
125 u32 FLD_END_EVE_EN
:1;
126 u32 FLD_END_ODD_EN
:1;
132 typedef union mask_length_tag
{
142 typedef union fifo_flag_cnt_tag
{
152 typedef union iic_clk_dur
{
162 typedef union iic_csr1_tag
{
180 /**********************************
183 typedef union iic_csr2_tag
{
195 /* use for both EVEN and ODD DMA UPPER LIMITS */
200 typedef union dma_upper_lmt_tag
{
203 u32 DMA_UPPER_LMT_VAL
:24;
209 /***************** 8 bit I2C register globals ***********/
210 #define CSR2 0x010 /* indices of 8-bit I2C mapped reg's*/
211 #define EVEN_CSR 0x011
212 #define ODD_CSR 0x012
215 #define X_CLIP_START 0x020
216 #define Y_CLIP_START 0x022
217 #define X_CLIP_END 0x024
218 #define Y_CLIP_END 0x026
219 #define AD_ADDR 0x030
222 #define DIG_OUT 0x040
223 #define PM_LUT_ADDR 0x050
224 #define PM_LUT_DATA 0x051
227 /******** Assignments and Typedefs for 8 bit I2C Registers********************/
229 typedef union i2c_csr2_tag
{
242 typedef union i2c_even_csr_tag
{
252 typedef union i2c_odd_csr_tag
{
262 typedef union i2c_config_tag
{
276 typedef union i2c_ad_cmd_tag
{
277 /* bits can have 3 different meanings depending on value of AD_ADDR */
279 /* Bt252 Command Register if AD_ADDR = 00h */
284 u8 DIGITIZE_CNL_SEL1
:2;
287 /* Bt252 IOUT0 register if AD_ADDR = 01h */
292 /* BT252 IOUT1 register if AD_ADDR = 02h */
299 /* access 8-bit IIC registers */
301 extern int ReadI2C(void __iomem
*mmio
, u_short wIregIndex
, u8
*byVal
);
302 extern int WriteI2C(void __iomem
*mmio
, u_short wIregIndex
, u8 byVal
);