瀏覽代碼

add WATCHDOG_RESET() on nand write and read

Signed-off-by: giulio.benetti@micronovasrl.com
Acked-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Giulio Benetti 15 年之前
父節點
當前提交
1fc1d9aed0
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      drivers/mtd/nand/nand_util.c

+ 4 - 0
drivers/mtd/nand/nand_util.c

@@ -508,6 +508,8 @@ int nand_write_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
 		size_t block_offset = offset & (nand->erasesize - 1);
 		size_t block_offset = offset & (nand->erasesize - 1);
 		size_t write_size;
 		size_t write_size;
 
 
+		WATCHDOG_RESET ();
+
 		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
 		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
 			printf ("Skip bad block 0x%08llx\n",
 			printf ("Skip bad block 0x%08llx\n",
 				offset & ~(nand->erasesize - 1));
 				offset & ~(nand->erasesize - 1));
@@ -578,6 +580,8 @@ int nand_read_skip_bad(nand_info_t *nand, loff_t offset, size_t *length,
 		size_t block_offset = offset & (nand->erasesize - 1);
 		size_t block_offset = offset & (nand->erasesize - 1);
 		size_t read_length;
 		size_t read_length;
 
 
+		WATCHDOG_RESET ();
+
 		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
 		if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
 			printf ("Skipping bad block 0x%08llx\n",
 			printf ("Skipping bad block 0x%08llx\n",
 				offset & ~(nand->erasesize - 1));
 				offset & ~(nand->erasesize - 1));