brktree_reg.h

来自「基于组件方式开发操作系统的OSKIT源代码」· C头文件 代码 · 共 518 行 · 第 1/2 页

H
518
字号
/* * Copyright (c) 1995 Mark Tinguely and Jim Lowe * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software *    must display the following acknowledgement: *	This product includes software developed by Mark Tinguely and Jim Lowe * 4. The name of the author may not be used to endorse or promote products  *    derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * $Id: brktree_reg.h,v 1.23.2.2 1999/03/01 10:48:18 roger Exp $ */#ifndef PCI_LATENCY_TIMER#define	PCI_LATENCY_TIMER		0x0c	/* pci timer register */#endif/* * Definitions for the Philips SAA7116 digital video to pci interface. */#define BROOKTREE_848_PCI_ID            0x0350109E#define BROOKTREE_849_PCI_ID            0x0351109E#define BROOKTREE_878_PCI_ID            0x036E109E#define BROOKTREE_879_PCI_ID            0x036F109E#define BROOKTREE_848                   1#define BROOKTREE_848A                  2#define BROOKTREE_849                   3#define BROOKTREE_878                   4#define BROOKTREE_879                   5typedef volatile u_int 	bregister_t;/* * if other persuasion endian, then compiler will probably require that * these next * macros be reversed */#define	BTBYTE(what)	bregister_t  what:8; int :24#define	BTWORD(what)	bregister_t  what:16; int: 16#define BTLONG(what)	bregister_t  what:32struct bt848_registers {    BTBYTE (dstatus);		/* 0, 1,2,3 */#define BT848_DSTATUS_PRES		(1<<7)#define BT848_DSTATUS_HLOC		(1<<6)#define BT848_DSTATUS_FIELD		(1<<5)#define BT848_DSTATUS_NUML		(1<<4)#define BT848_DSTATUS_CSEL		(1<<3)#define BT848_DSTATUS_PLOCK		(1<<2)#define BT848_DSTATUS_LOF		(1<<1)#define BT848_DSTATUS_COF		(1<<0)    BTBYTE (iform);		/* 4, 5,6,7 */#define BT848_IFORM_MUXSEL		(0x3<<5)# define BT848_IFORM_M_MUX1		(0x03<<5)# define BT848_IFORM_M_MUX0		(0x02<<5)# define BT848_IFORM_M_MUX2		(0x01<<5)# define BT848_IFORM_M_MUX3		(0x0)# define BT848_IFORM_M_RSVD		(0x00<<5)#define BT848_IFORM_XTSEL		(0x3<<3)# define BT848_IFORM_X_AUTO		(0x03<<3)# define BT848_IFORM_X_XT1		(0x02<<3)# define BT848_IFORM_X_XT0		(0x01<<3)# define BT848_IFORM_X_RSVD		(0x00<<3)    BTBYTE (tdec);		/* 8, 9,a,b */    BTBYTE (e_crop);		/* c, d,e,f */    BTBYTE (e_vdelay_lo);	/* 10, 11,12,13 */    BTBYTE (e_vactive_lo);	/* 14, 15,16,17 */    BTBYTE (e_delay_lo);	/* 18, 19,1a,1b */    BTBYTE (e_hactive_lo);	/* 1c, 1d,1e,1f */    BTBYTE (e_hscale_hi);	/* 20, 21,22,23 */    BTBYTE (e_hscale_lo);	/* 24, 25,26,27 */    BTBYTE (bright);		/* 28, 29,2a,2b */    BTBYTE (e_control);		/* 2c, 2d,2e,2f */#define BT848_E_CONTROL_LNOTCH		(1<<7)#define BT848_E_CONTROL_COMP		(1<<6)#define BT848_E_CONTROL_LDEC		(1<<5)#define BT848_E_CONTROL_CBSENSE		(1<<4)#define BT848_E_CONTROL_RSVD		(1<<3)#define BT848_E_CONTROL_CON_MSB		(1<<2)#define BT848_E_CONTROL_SAT_U_MSB	(1<<1)#define BT848_E_CONTROL_SAT_V_MSB	(1<<0)    BTBYTE (contrast_lo);	/* 30, 31,32,33 */    BTBYTE (sat_u_lo);		/* 34, 35,36,37 */    BTBYTE (sat_v_lo);		/* 38, 39,3a,3b */    BTBYTE (hue);		/* 3c, 3d,3e,3f */    BTBYTE (e_scloop);		/* 40, 41,42,43 */#define BT848_E_SCLOOP_RSVD1		(1<<7)#define BT848_E_SCLOOP_CAGC		(1<<6)#define BT848_E_SCLOOP_CKILL		(1<<5)#define BT848_E_SCLOOP_HFILT		(0x3<<3)# define BT848_E_SCLOOP_HFILT_ICON	(0x3<<3)# define BT848_E_SCLOOP_HFILT_QCIF	(0x2<<3)# define BT848_E_SCLOOP_HFILT_CIF	(0x1<<3)# define BT848_E_SCLOOP_HFILT_AUTO	(0x0<<3)#define BT848_E_SCLOOP_RSVD0		(0x7<<0)    int		:32;		/* 44, 45,46,47 */    BTBYTE (oform);		/* 48, 49,4a,4b */    BTBYTE (e_vscale_hi);	/* 4c, 4d,4e,4f */    BTBYTE (e_vscale_lo);	/* 50, 51,52,53 */    BTBYTE (test);		/* 54, 55,56,57 */    int		:32;		/* 58, 59,5a,5b */    int		:32;		/* 5c, 5d,5e,5f */    BTLONG (adelay);		/* 60, 61,62,63 */    BTBYTE (bdelay);		/* 64, 65,66,67 */    BTBYTE (adc);		/* 68, 69,6a,6b */#define BT848_ADC_RESERVED		(0x80)	/* required pattern */#define BT848_ADC_SYNC_T		(1<<5)#define BT848_ADC_AGC_EN		(1<<4)#define BT848_ADC_CLK_SLEEP		(1<<3)#define BT848_ADC_Y_SLEEP		(1<<2)#define BT848_ADC_C_SLEEP		(1<<1)#define BT848_ADC_CRUSH			(1<<0)    BTBYTE (e_vtc);		/* 6c, 6d,6e,6f */    int		:32;		/* 70, 71,72,73 */    int 	:32;		/* 74, 75,76,77 */    int		:32;		/* 78, 79,7a,7b */    BTLONG (sreset);		/* 7c, 7d,7e,7f */    u_char 	filler1[0x84-0x80];    BTBYTE (tgctrl);		/* 84, 85,86,87 */#define BT848_TGCTRL_TGCKI		(3<<3)#define BT848_TGCTRL_TGCKI_XTAL		(0<<3)#define BT848_TGCTRL_TGCKI_PLL		(1<<3)#define BT848_TGCTRL_TGCKI_GPCLK	(2<<3)#define BT848_TGCTRL_TGCKI_GPCLK_I	(3<<3)    u_char 	filler[0x8c-0x88];    BTBYTE (o_crop);		/* 8c, 8d,8e,8f */    BTBYTE (o_vdelay_lo);	/* 90, 91,92,93 */    BTBYTE (o_vactive_lo);	/* 94, 95,96,97 */    BTBYTE (o_delay_lo);	/* 98, 99,9a,9b */    BTBYTE (o_hactive_lo);	/* 9c, 9d,9e,9f */    BTBYTE (o_hscale_hi);	/* a0, a1,a2,a3 */    BTBYTE (o_hscale_lo);	/* a4, a5,a6,a7 */    int		:32;		/* a8, a9,aa,ab */    BTBYTE (o_control);		/* ac, ad,ae,af */#define BT848_O_CONTROL_LNOTCH		(1<<7)#define BT848_O_CONTROL_COMP		(1<<6)#define BT848_O_CONTROL_LDEC		(1<<5)#define BT848_O_CONTROL_CBSENSE		(1<<4)#define BT848_O_CONTROL_RSVD		(1<<3)#define BT848_O_CONTROL_CON_MSB		(1<<2)#define BT848_O_CONTROL_SAT_U_MSB	(1<<1)#define BT848_O_CONTROL_SAT_V_MSB	(1<<0)    u_char	fillter1[16];    BTBYTE (o_scloop);		/* c0, c1,c2,c3 */#define BT848_O_SCLOOP_RSVD1		(1<<7)#define BT848_O_SCLOOP_CAGC		(1<<6)#define BT848_O_SCLOOP_CKILL		(1<<5)#define BT848_O_SCLOOP_HFILT		(0x3<<3)#define BT848_O_SCLOOP_HFILT_ICON	(0x3<<3)#define BT848_O_SCLOOP_HFILT_QCIF	(0x2<<3)#define BT848_O_SCLOOP_HFILT_CIF	(0x1<<3)#define BT848_O_SCLOOP_HFILT_AUTO	(0x0<<3)#define BT848_O_SCLOOP_RSVD0		(0x7<<0)    int		:32;		/* c4, c5,c6,c7 */    int		:32;		/* c8, c9,ca,cb */    BTBYTE (o_vscale_hi);	/* cc, cd,ce,cf */    BTBYTE (o_vscale_lo);	/* d0, d1,d2,d3 */    BTBYTE (color_fmt);		/* d4, d5,d6,d7 */    bregister_t color_ctl_swap		:4; /* d8 */#define BT848_COLOR_CTL_WSWAP_ODD	(1<<3)#define BT848_COLOR_CTL_WSWAP_EVEN	(1<<2)#define BT848_COLOR_CTL_BSWAP_ODD	(1<<1)#define BT848_COLOR_CTL_BSWAP_EVEN	(1<<0)    bregister_t color_ctl_gamma		:1;    bregister_t color_ctl_rgb_ded	:1;    bregister_t color_ctl_color_bars	:1;    bregister_t color_ctl_ext_frmrate	:1;    int		:24;		/* d9,da,db */    BTBYTE (cap_ctl);		/* dc, dd,de,df */#define BT848_CAP_CTL_DITH_FRAME	(1<<4)#define BT848_CAP_CTL_VBI_ODD		(1<<3)#define BT848_CAP_CTL_VBI_EVEN		(1<<2)#define BT848_CAP_CTL_ODD		(1<<1)#define BT848_CAP_CTL_EVEN		(1<<0)    BTBYTE (vbi_pack_size);	/* e0, e1,e2,e3 */    BTBYTE (vbi_pack_del);	/* e4, e5,e6,e7 */    int		:32;		/* e8, e9,ea,eb */    BTBYTE (o_vtc);		/* ec, ed,ee,ef */    BTBYTE (pll_f_lo);		/* f0, f1,f2,f3 */    BTBYTE (pll_f_hi);		/* f4, f5,f6,f7 */    BTBYTE (pll_f_xci);		/* f8, f9,fa,fb */#define BT848_PLL_F_C			(1<<6)#define BT848_PLL_F_X			(1<<7)    u_char	filler2[0x100-0xfc];    BTLONG (int_stat);		/* 100, 101,102,103 */    BTLONG (int_mask);		/* 104, 105,106,107 */#define BT848_INT_RISCS			(0xf<<28)#define BT848_INT_RISC_EN		(1<<27)#define BT848_INT_RACK			(1<<25)#define BT848_INT_FIELD			(1<<24)#define BT848_INT_MYSTERYBIT		(1<<23)#define BT848_INT_SCERR			(1<<19)#define BT848_INT_OCERR			(1<<18)#define BT848_INT_PABORT		(1<<17)#define BT848_INT_RIPERR		(1<<16)#define BT848_INT_PPERR			(1<<15)#define BT848_INT_FDSR			(1<<14)#define BT848_INT_FTRGT			(1<<13)#define BT848_INT_FBUS			(1<<12)#define BT848_INT_RISCI			(1<<11)#define BT848_INT_GPINT			(1<<9)#define BT848_INT_I2CDONE		(1<<8)#define BT848_INT_RSV1			(1<<7)#define BT848_INT_RSV0			(1<<6)#define BT848_INT_VPRES			(1<<5)#define BT848_INT_HLOCK			(1<<4)#define BT848_INT_OFLOW			(1<<3)#define BT848_INT_HSYNC			(1<<2)#define BT848_INT_VSYNC			(1<<1)#define BT848_INT_FMTCHG		(1<<0)    int		:32;		/* 108, 109,10a,10b */    BTWORD (gpio_dma_ctl);	/* 10c, 10d,10e,10f */#define BT848_DMA_CTL_PL23TP4		(0<<6)	/* planar1 trigger 4 */#define BT848_DMA_CTL_PL23TP8		(1<<6)	/* planar1 trigger 8 */#define BT848_DMA_CTL_PL23TP16		(2<<6)	/* planar1 trigger 16 */#define BT848_DMA_CTL_PL23TP32		(3<<6)	/* planar1 trigger 32 */#define BT848_DMA_CTL_PL1TP4		(0<<4)	/* planar1 trigger 4 */#define BT848_DMA_CTL_PL1TP8		(1<<4)	/* planar1 trigger 8 */#define BT848_DMA_CTL_PL1TP16		(2<<4)	/* planar1 trigger 16 */#define BT848_DMA_CTL_PL1TP32		(3<<4)	/* planar1 trigger 32 */#define BT848_DMA_CTL_PKTP4		(0<<2)	/* packed trigger 4 */#define BT848_DMA_CTL_PKTP8		(1<<2)	/* packed trigger 8 */#define BT848_DMA_CTL_PKTP16		(2<<2)	/* packed trigger 16 */#define BT848_DMA_CTL_PKTP32		(3<<2)	/* packed trigger 32 */#define BT848_DMA_CTL_RISC_EN		(1<<1)#define BT848_DMA_CTL_FIFO_EN		(1<<0)    BTLONG (i2c_data_ctl);	/* 110, 111,112,113 */#define BT848_DATA_CTL_I2CDIV		(0xf<<4)#define BT848_DATA_CTL_I2CSYNC		(1<<3)#define BT848_DATA_CTL_I2CW3B		(1<<2)#define BT848_DATA_CTL_I2CSCL		(1<<1)#define BT848_DATA_CTL_I2CSDA		(1<<0)    BTLONG (risc_strt_add);	/* 114, 115,116,117 */    BTLONG (gpio_out_en);	/* 118, 119,11a,11b */	/* really 24 bits */    BTLONG (gpio_reg_inp);	/* 11c, 11d,11e,11f */	/* really 24 bits */    BTLONG (risc_count);	/* 120, 121,122,123 */    u_char	filler3[0x200-0x124];    BTLONG (gpio_data);		/* 200, 201,202,203 */	/* really 24 bits */};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?