retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8); 
retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8); 
static int blackbird_load_firmware(struct cx8802_dev *dev){	static const unsigned char magic[8] = {		0xa7, 0x0d, 0x00, 0x00, 0x66, 0xbb, 0x55, 0xaa	};	const struct firmware *firmware;	int i, retval = 0;	u32 value = 0;	u32 checksum = 0;	u32 *dataptr;	retval  = register_write(dev->core, IVTV_REG_VPU, 0xFFFFFFED);        retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);        retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_REFRESH, 0x80000640);        retval |= register_write(dev->core, IVTV_REG_ENC_SDRAM_PRECHARGE, 0x1A);	msleep(1);        retval |= register_write(dev->core, IVTV_REG_APU, 0);	if (retval < 0)		dprintk(0, "Error with register_write\n");	retval = request_firmware(&firmware, BLACKBIRD_FIRM_ENC_FILENAME,				  &dev->pci->dev);	if (retval != 0) {		dprintk(0, "ERROR: Hotplug firmware request failed (%s).\n",			BLACKBIRD_FIRM_ENC_FILENAME);		dprintk(0, "Please fix your hotplug setup, the board will "			"not work without firmware loaded!\n");		return -1;	}	if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) {		dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n",			firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE);		return -1;	}	if (0 != memcmp(firmware->data, magic, 8)) {		dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n");		return -1;	}	/* transfer to the chip */	dprintk(1,"Loading firmware ...\n");	dataptr = (u32*)firmware->data;	for (i = 0; i < (firmware->size >> 2); i++) {		value = *dataptr;		checksum += ~value;		memory_write(dev->core, i, value);		dataptr++;	}	/* read back to verify with the checksum */	for (i--; i >= 0; i--) {		memory_read(dev->core, i, &value);		checksum -= ~value;	}	if (checksum) {		dprintk(0, "ERROR: Firmware load failed (checksum mismatch).\n");		return -1;	}	release_firmware(firmware);	dprintk(0, "Firmware upload successful.\n");        retval |= register_write(dev->core, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST);        retval |= register_read(dev->core, IVTV_REG_SPU, &value);        retval |= register_write(dev->core, IVTV_REG_SPU, value & 0xFFFFFFFE);	msleep(1);	retval |= register_read(dev->core, IVTV_REG_VPU, &value);        retval |= register_write(dev->core, IVTV_REG_VPU, value & 0xFFFFFFE8);	if (retval < 0)		dprintk(0, "Error with register_write\n");	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4ac97914c6c35f6bf132071c718e034d0846b9f5/cx88-blackbird.c/buggy/drivers/media/video/cx88/cx88-blackbird.c