[U-Boot] [PATCH 7/7] sf: stmicro: use common page timeout define

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Thu Apr 2 13:43:17 CEST 2009


Mike Frysinger wrote:
> On Thursday 02 April 2009 07:20:13 Haavard Skinnemoen wrote:
> > Mike Frysinger wrote:
> > > -		/* Up to 2 seconds */
> > > -		ret = stmicro_wait_ready(flash, 2 * CONFIG_SYS_HZ);
> > > +		ret = stmicro_wait_ready(flash, SPI_FLASH_PAGE_ERASE_TIMEOUT);
> >
> > 50 ms is an awful lot less than 2 seconds. Sure this is safe?
> 
> the 2 sec mark was copied in all spi flash drivers based on the original port 
> rather than referring to a datasheet, and it works on my Blackfin boards that 
> have stmicro parts.

Ok, that's good enough for me.

> personally i think the timeouts in the current spi flash common code is too 
> low in general, so i'd propose we raise them.  after all, the timeouts only 
> matter in when something goes wrong, so they wouldnt be reached.  and the low 
> threshold seems like it makes the presumption of faster SPI bus speeds.
> 
> i.e. how about raising the timeout values 50x or 100x ?

I think that sounds like a good idea.

Haavard


More information about the U-Boot mailing list