write_scoop_reg(&corgiscoop_device.dev, SCOOP_MCR, nmcr); 
write_scoop_reg(scoop, SCOOP_MCR, nmcr); 
static int sharpsl_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,				       const socket_state_t *state){	unsigned long flags;	unsigned short cpr, ncpr, ccr, nccr, mcr, nmcr, imr, nimr;	switch (state->Vcc) {	case	0:  	break;	case 	33: 	break;	case	50: 	break;	default:		 printk(KERN_ERR "sharpsl_pcmcia_configure_socket(): bad Vcc %u\n", state->Vcc);		 return -1;	}	if ((state->Vpp!=state->Vcc) && (state->Vpp!=0)) {		printk(KERN_ERR "CF slot cannot support Vpp %u\n", state->Vpp);		return -1;	}	local_irq_save(flags);	nmcr = (mcr = read_scoop_reg(&corgiscoop_device.dev, SCOOP_MCR)) & ~0x0010;	ncpr = (cpr = read_scoop_reg(&corgiscoop_device.dev, SCOOP_CPR)) & ~0x0083;	nccr = (ccr = read_scoop_reg(&corgiscoop_device.dev, SCOOP_CCR)) & ~0x0080;	nimr = (imr = read_scoop_reg(&corgiscoop_device.dev, SCOOP_IMR)) & ~0x003E;	ncpr |= (state->Vcc == 33) ? 0x0001 :				(state->Vcc == 50) ? 0x0002 : 0;	nmcr |= (state->flags&SS_IOCARD) ? 0x0010 : 0;	ncpr |= (state->flags&SS_OUTPUT_ENA) ? 0x0080 : 0;	nccr |= (state->flags&SS_RESET)? 0x0080: 0;	nimr |=	((skt->status&SS_DETECT) ? 0x0004 : 0)|			((skt->status&SS_READY)  ? 0x0002 : 0)|			((skt->status&SS_BATDEAD)? 0x0010 : 0)|			((skt->status&SS_BATWARN)? 0x0020 : 0)|			((skt->status&SS_STSCHG) ? 0x0010 : 0)|			((skt->status&SS_WRPROT) ? 0x0008 : 0);	if (!(ncpr & 0x0003)) {		keep_rd = 0;	} else if (!keep_rd) {		if (nccr & 0x0080)			keep_rd = 1;		else			nccr |= 0x0080;	}	if (mcr != nmcr)		write_scoop_reg(&corgiscoop_device.dev, SCOOP_MCR, nmcr);	if (cpr != ncpr)		write_scoop_reg(&corgiscoop_device.dev, SCOOP_CPR, ncpr);	if (ccr != nccr)		write_scoop_reg(&corgiscoop_device.dev, SCOOP_CCR, nccr);	if (imr != nimr)		write_scoop_reg(&corgiscoop_device.dev, SCOOP_IMR, nimr);	local_irq_restore(flags);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/0ce7625f3c1e3f921f6b83f7e944e00031a39dfa/pxa2xx_sharpsl.c/buggy/drivers/pcmcia/pxa2xx_sharpsl.c