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

Mike Frysinger vapier at gentoo.org
Thu Apr 2 12:58:01 CEST 2009


Signed-off-by: Mike Frysinger <vapier at gentoo.org>
CC: Haavard Skinnemoen <haavard.skinnemoen at atmel.com>
---
 drivers/mtd/spi/stmicro.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/spi/stmicro.c b/drivers/mtd/spi/stmicro.c
index e401cd0..b43e9f4 100644
--- a/drivers/mtd/spi/stmicro.c
+++ b/drivers/mtd/spi/stmicro.c
@@ -295,8 +295,7 @@ int stmicro_erase(struct spi_flash *flash, u32 offset, size_t len)
 			break;
 		}
 
-		/* Up to 2 seconds */
-		ret = stmicro_wait_ready(flash, 2 * CONFIG_SYS_HZ);
+		ret = stmicro_wait_ready(flash, SPI_FLASH_PAGE_ERASE_TIMEOUT);
 		if (ret < 0) {
 			debug("SF: STMicro page erase timed out\n");
 			break;
-- 
1.6.2



More information about the U-Boot mailing list