public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] CFI Driver: Reset watchdog timer after each flash operation
@ 2009-10-02 10:34 Ingo van Lil
  2009-10-02 11:06 ` Stefan Roese
  2009-10-02 12:30 ` Wolfgang Denk
  0 siblings, 2 replies; 11+ messages in thread
From: Ingo van Lil @ 2009-10-02 10:34 UTC (permalink / raw)
  To: u-boot

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 <inguin@gmx.de>
---
 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 <asm/io.h>
 #include <asm/byteorder.h>
 #include <environment.h>
+#include <watchdog.h>
 
 /*
  * 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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-10-04 11:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-02 10:34 [U-Boot] [PATCH] CFI Driver: Reset watchdog timer after each flash operation Ingo van Lil
2009-10-02 11:06 ` Stefan Roese
2009-10-02 12:12   ` Ingo van Lil
2009-10-03 23:29     ` Wolfgang Denk
2009-10-04 11:15       ` Ingo van Lil
2009-10-04 11:49         ` Graeme Russ
2009-10-02 12:30 ` Wolfgang Denk
2009-10-02 18:31   ` Mike Frysinger
2009-10-02 19:35     ` Wolfgang Denk
2009-10-02 20:21     ` J. William Campbell
2009-10-02 21:59       ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox