Add WATCHDOG_REFRESH() inside nand write and read


-- 
Giulio Benetti
R&D
Micronova srl
diff -urpN u-boot-2009.03.orig/drivers/mtd/nand/nand_util.c u-boot-2009.03/drivers/mtd/nand/nand_util.c
--- u-boot-2009.03.orig/drivers/mtd/nand/nand_util.c	2009-03-21 22:04:41.000000000 +0100
+++ u-boot-2009.03/drivers/mtd/nand/nand_util.c	2009-06-17 20:10:17.000000000 +0200
@@ -505,6 +505,8 @@ int nand_write_skip_bad(nand_info_t *nan
 		size_t block_offset = offset & (nand->erasesize - 1);
 		size_t write_size;
 
+		WATCHDOG_RESET ();
+
 		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
 			printf ("Skip bad block 0x%08zx\n",
 				offset & ~(nand->erasesize - 1));
@@ -575,6 +577,8 @@ int nand_read_skip_bad(nand_info_t *nand
 		size_t block_offset = offset & (nand->erasesize - 1);
 		size_t read_length;
 
+		WATCHDOG_RESET ();
+
 		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
 			printf ("Skipping bad block 0x%08zx\n",
 				offset & ~(nand->erasesize - 1));

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to