summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-04-02 08:11:31 -0400
committerMike Frysinger <vapier@gentoo.org>2009-04-02 08:11:31 -0400
commit1abe365ffcfc29c061e8fd8b45551be5ad1428dd (patch)
tree46dd80de0b631955ce06249f2b2947294f7a9944 /drivers
parent2a6ce1115b3cbe746965cfa0058ce645b6c1ada1 (diff)
sf: set common timeouts in seconds, not milliseconds
Since timeouts are only hit when there is a problem in the system, we don't want to prematurely timeout on a functioning setup. Thus having low timeouts (in milliseconds) doesn't gain us anything in the production case, but rather increases likely hood of causing problems where none otherwise exist. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/spi/spi_flash_internal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mtd/spi/spi_flash_internal.h b/drivers/mtd/spi/spi_flash_internal.h
index 2d020c3fbf..5d1e395afc 100644
--- a/drivers/mtd/spi/spi_flash_internal.h
+++ b/drivers/mtd/spi/spi_flash_internal.h
@@ -4,9 +4,12 @@
* Copyright (C) 2008 Atmel Corporation
*/
-/* Common parameters */
-#define SPI_FLASH_PROG_TIMEOUT ((10 * CONFIG_SYS_HZ) / 1000)
-#define SPI_FLASH_PAGE_ERASE_TIMEOUT ((50 * CONFIG_SYS_HZ) / 1000)
+/* Common parameters -- kind of high, but they should only occur when there
+ * is a problem (and well your system already is broken), so err on the side
+ * of caution in case we're dealing with slower SPI buses and/or processors.
+ */
+#define SPI_FLASH_PROG_TIMEOUT (2 * CONFIG_SYS_HZ)
+#define SPI_FLASH_PAGE_ERASE_TIMEOUT (5 * CONFIG_SYS_HZ)
#define SPI_FLASH_SECTOR_ERASE_TIMEOUT (10 * CONFIG_SYS_HZ)
/* Common commands */