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

Mike Frysinger vapier at gentoo.org
Thu Apr 2 13:32:23 CEST 2009


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.

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 ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090402/21ff7a55/attachment.pgp 


More information about the U-Boot mailing list