return -1; 
return -ETIMEDOUT; 
int av7110_bootarm(struct av7110 *av7110){	struct saa7146_dev *dev = av7110->dev;	u32 ret;	int i;	dprintk(4, "%p\n", av7110);	saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO);	/* Disable DEBI and GPIO irq */	SAA7146_IER_DISABLE(av7110->dev, MASK_03 | MASK_19);	SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03);	/* enable DEBI */	saa7146_write(av7110->dev, MC1, 0x08800880);	saa7146_write(av7110->dev, DD1_STREAM_B, 0x00000000);	saa7146_write(av7110->dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));	/* test DEBI */	iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4);	if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4)) != 0x10325476) {		printk(KERN_ERR "dvb-ttpci: debi test in av7110_bootarm() failed: "		       "%08x != %08x (check your BIOS 'Plug&Play OS' settings)\n",		       ret, 0x10325476);		return -1;	}	for (i = 0; i < 8192; i += 4)		iwdebi(av7110, DEBISWAP, DPRAM_BASE + i, 0x00, 4);	dprintk(2, "debi test OK\n");	/* boot */	dprintk(1, "load boot code\n");	saa7146_setgpio(dev, ARM_IRQ_LINE, SAA7146_GPIO_IRQLO);	//saa7146_setgpio(dev, DEBI_DONE_LINE, SAA7146_GPIO_INPUT);	//saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT);	mwdebi(av7110, DEBISWAB, DPRAM_BASE, bootcode, sizeof(bootcode));	iwdebi(av7110, DEBINOSWAP, BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2);	if (saa7146_wait_for_debi_done(av7110->dev, 1)) {		printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): "		       "saa7146_wait_for_debi_done() timed out\n");		return -1;	}	saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTHI);	mdelay(1);	dprintk(1, "load dram code\n");	if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0) {		printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): "		       "load_dram() failed\n");		return -1;	}	saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO);	mdelay(1);	dprintk(1, "load dpram code\n");	mwdebi(av7110, DEBISWAB, DPRAM_BASE, av7110->bin_dpram, av7110->size_dpram);	if (saa7146_wait_for_debi_done(av7110->dev, 1)) {		printk(KERN_ERR "dvb-ttpci: av7110_bootarm(): "		       "saa7146_wait_for_debi_done() timed out after loading DRAM\n");		return -1;	}	saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTHI);	msleep(30);	/* the firmware needs some time to initialize */	//ARM_ClearIrq(av7110);	ARM_ResetMailBox(av7110);	SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03);	SAA7146_IER_ENABLE(av7110->dev, MASK_03);	av7110->arm_errors = 0;	av7110->arm_ready = 1;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/c9090ebb247999354f80d45d45b3d5a804a94f7f/av7110_hw.c/clean/drivers/media/dvb/ttpci/av7110_hw.c