BT878_DA_IOM=1,BT878_DA_APP to enable serial highspeed mode. */ 
BT878_DA_IOM=1,BT878_DA_APP to enable serial highspeed mode. */ 
static int dvb_bt8xx_probe(struct device *dev){	struct bttv_sub_device *sub = to_bttv_sub_dev(dev);	struct dvb_bt8xx_card *card;	struct pci_dev* bttv_pci_dev;	int ret;	if (!(card = kmalloc(sizeof(struct dvb_bt8xx_card), GFP_KERNEL)))		return -ENOMEM;	memset(card, 0, sizeof(*card));	init_MUTEX(&card->lock);	card->bttv_nr = sub->core->nr;	strncpy(card->card_name, sub->core->name, sizeof(sub->core->name));	card->i2c_adapter = &sub->core->i2c_adap;	switch(sub->core->type)	{	case BTTV_PINNACLESAT:		card->gpio_mode = 0x0400c060;		/* should be: BT878_A_GAIN=0,BT878_A_PWRDN,BT878_DA_DPM,BT878_DA_SBR,		              BT878_DA_IOM=1,BT878_DA_APP to enable serial highspeed mode. */		card->op_sync_orin = 0;		card->irq_err_ignore = 0;		break;#ifdef BTTV_DVICO_DVBT_LITE	case BTTV_DVICO_DVBT_LITE:#endif		card->gpio_mode = 0x0400C060;		card->op_sync_orin = 0;		card->irq_err_ignore = 0;		/* 26, 15, 14, 6, 5		 * A_PWRDN  DA_DPM DA_SBR DA_IOM_DA		 * DA_APP(parallel) */		break;#ifdef BTTV_TWINHAN_VP3021	case BTTV_TWINHAN_VP3021:#else	case BTTV_NEBULA_DIGITV:#endif	case BTTV_AVDVBT_761:		card->gpio_mode = (1 << 26) | (1 << 14) | (1 << 5);		card->op_sync_orin = 0;		card->irq_err_ignore = 0;		/* A_PWRDN DA_SBR DA_APP (high speed serial) */		break;	case BTTV_AVDVBT_771: //case 0x07711461:		card->gpio_mode = 0x0400402B;		card->op_sync_orin = BT878_RISC_SYNC_MASK;		card->irq_err_ignore = 0;		/* A_PWRDN DA_SBR  DA_APP[0] PKTP=10 RISC_ENABLE FIFO_ENABLE*/		break;	case BTTV_TWINHAN_DST:		card->gpio_mode = 0x2204f2c;		card->op_sync_orin = BT878_RISC_SYNC_MASK;		card->irq_err_ignore = BT878_APABORT | BT878_ARIPERR |				       BT878_APPERR | BT878_AFBUS;		/* 25,21,14,11,10,9,8,3,2 then		 * 0x33 = 5,4,1,0		 * A_SEL=SML, DA_MLB, DA_SBR,		 * DA_SDR=f, fifo trigger = 32 DWORDS		 * IOM = 0 == audio A/D		 * DPM = 0 == digital audio mode		 * == async data parallel port		 * then 0x33 (13 is set by start_capture)		 * DA_APP = async data parallel port,		 * ACAP_EN = 1,		 * RISC+FIFO ENABLE */		break;	case BTTV_PC_HDTV:		card->gpio_mode = 0x0100EC7B;		card->op_sync_orin = 0;		card->irq_err_ignore = 0;		break;	default:		printk(KERN_WARNING "dvb_bt8xx: Unknown bttv card type: %d.\n",				sub->core->type);		kfree(card);		return -ENODEV;	}	dprintk("dvb_bt8xx: identified card%d as %s\n", card->bttv_nr, card->card_name);	if (!(bttv_pci_dev = bttv_get_pcidev(card->bttv_nr))) {		printk("dvb_bt8xx: no pci device for card %d\n", card->bttv_nr);		kfree(card);		return -EFAULT;	}	if (!(card->bt = dvb_bt8xx_878_match(card->bttv_nr, bttv_pci_dev))) {		printk("dvb_bt8xx: unable to determine DMA core of card %d,\n",		       card->bttv_nr);		printk("dvb_bt8xx: if you have the ALSA bt87x audio driver "		       "installed, try removing it.\n");		kfree(card);		return -EFAULT;	}	init_MUTEX(&card->bt->gpio_lock);	card->bt->bttv_nr = sub->core->nr;	if ( (ret = dvb_bt8xx_load_card(card, sub->core->type)) ) {		kfree(card);		return ret;	}	dev_set_drvdata(dev, card);	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/50b215a05878ce9636dace6cd21f7e91ff005058/dvb-bt8xx.c/clean/drivers/media/dvb/bt8xx/dvb-bt8xx.c