[U-Boot] [PATCH] CFI: trigger watchdog in write_buf()

Heiko Schocher hs at denx.de
Thu Sep 15 07:19:58 CEST 2011


Signed-off-by: Heiko Schocher <hs at denx.de>
Cc: Stefan Roese <sr at denx.de>
---
 drivers/mtd/cfi_flash.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index ac91dfd..dbeed5f 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -40,6 +40,7 @@
 #include <asm/byteorder.h>
 #include <environment.h>
 #include <mtd/cfi_flash.h>
+#include <watchdog.h>
 
 /*
  * This file implements a Common Flash Interface (CFI) driver for
@@ -1350,6 +1351,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
 		src += i;
 		cnt -= i;
 		FLASH_SHOW_PROGRESS(scale, dots, digit, i);
+		WATCHDOG_RESET();
 	}
 #else
 	while (cnt >= info->portwidth) {
@@ -1362,6 +1364,7 @@ int write_buff (flash_info_t * info, uchar * src, ulong addr, ulong cnt)
 		wp += info->portwidth;
 		cnt -= info->portwidth;
 		FLASH_SHOW_PROGRESS(scale, dots, digit, info->portwidth);
+		WATCHDOG_RESET();
 	}
 #endif /* CONFIG_SYS_FLASH_USE_BUFFER_WRITE */
 
-- 
1.7.6



More information about the U-Boot mailing list