unsigned long timer1 = 0, timer2; 
static int sync_receive_data_send_cmd(int doRecive, int doSend, unsigned int address, unsigned long wait_time){	int pos = 0;	unsigned long timer1 = 0, timer2;	int dosleep;	dosleep = !w100fb_get_blanking();	if (dosleep && doSend) {		CCNT_ON();		/* polling HSync */		SyncHS();		/* get CCNT */		CCNT(timer1);	}	if (doRecive)		pos = corgi_ssp_ads7846_get();	if (doSend) {		int cmd = ADSCTRL_PD0 | ADSCTRL_PD1 | (address << ADSCTRL_ADR_SH) | ADSCTRL_STS;		/* dummy command */		corgi_ssp_ads7846_put(cmd);		corgi_ssp_ads7846_get();		if (dosleep) {			/* Wait after HSync */			CCNT(timer2);			if (timer2-timer1 > wait_time) {				/* timeout */				SyncHS();				/* get OSCR */				CCNT(timer1);				/* Wait after HSync */				CCNT(timer2);			}			while (timer2 - timer1 < wait_time)				CCNT(timer2);		}		corgi_ssp_ads7846_put(cmd);		if (dosleep)			CCNT_OFF();	}	return pos;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/347e4843fa1fc21bf542c6f086fcf5ef1ab5f58e/corgi_ts.c/buggy/drivers/input/touchscreen/corgi_ts.c