About flash chip writing/erasing, reading chip status.

David Woodhouse dwmw2 at infradead.org
Mon Feb 10 03:34:00 EST 2003


On Wed, 2003-01-15 at 21:17, Steve Wahl wrote:
> I therefore think the correct test of bit5 is:
> 
> 	/* assumes ( (CMD(1<<6) >> 1) == CMD(1<<5) ) for all cases */
> 	/* I believe this is true from inspection... */
> 
> 	dq6 = CMD(1<<6);
> 
> 	do {
> 
> 		oldstatus = cfi_read(map, adr);
> 		status = cfi_read(map, addr) ;
> 
> 		toggling = ( oldstatus ^ status ) & dq6 ;
> 		dq5s_set = ( oldstatus & (toggling >> 1) ) ;
> 
> 	} while ( (toggling != 0) && (dq5s_set == 0) && !time_after(xxx));

> I'm willing to work this in to my patch.  But I want to see what
> others have to say before I put the work in.

Looks sane to me. Sorry for the delayed response.

-- 
dwmw2




More information about the linux-mtd mailing list