
On Monday 06 April 2009 04:27:59 Prafulla Wadaskar wrote:
From: Mike Frysinger [mailto:vapier@gentoo.org]
On Monday 06 April 2009 03:23:30 Prafulla Wadaskar wrote:
/* Up to 2 seconds */
ret = macronix_wait_ready(flash, 2 * CONFIG_SYS_HZ);
there's a common flash erase timeout define
Block erase time for Micronix are different than specified in spi_flash_internals.h Hence MICRONIX spefic timouts defined and used in macronix.c
every flash will have a different erase time, but i have a hard time believing you picked 2*HZ (2 seconds) because of your part's requirements. more likely you copied that from the stmicro driver (like every other spi flash driver until i cleaned them up). the latest tree increases the common timeouts to seconds rather than milliseconds, so unless your flash is truly truly awful and requires longer than that, you should use the common define.
The MX25L12805D specifies Block erase max time to 2sec
touche, i stand corrected
Even sector erase time is higher (300milsec)
as i said, the latest code is updated to order of seconds. specifically, write is now 2 seconds while erase is 5 seconds. so both of these are OK for your chip and thus you should use them. -mike