From: Ingo van Lil Date: Fri, 2 Oct 2009 12:34:17 +0200 Subject: [U-Boot] [PATCH] CFI Driver: Reset watchdog timer after each flash operation Message-ID: <20091002103417.GA9767@zaphod.peppercon.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de The CFI driver does not reset the device's watchdog, so long-running flash operations will cause the watchdog timer to expire. A comment in flash_status_check() suggests that udelay() is expected to reset the watchdog, but I can't find any architecture where it does. Signed-off-by: Ingo van Lil --- drivers/mtd/cfi_flash.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c index 6eea49a..5dcd62d 100644 --- a/drivers/mtd/cfi_flash.c +++ b/drivers/mtd/cfi_flash.c @@ -39,6 +39,7 @@ #include #include #include +#include /* * This file implements a Common Flash Interface (CFI) driver for @@ -675,7 +676,8 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector, flash_write_cmd (info, sector, 0, info->cmd_reset); return ERR_TIMOUT; } - udelay (1); /* also triggers watchdog */ + udelay (1); + WATCHDOG_RESET(); } return ERR_OK; } -- 1.6.2.5