]> git.sur5r.net Git - u-boot/commitdiff
add WATCHDOG_RESET() on nand write and read
authorGiulio Benetti <giulio.benetti@micronovasrl.com>
Fri, 31 Jul 2009 22:30:34 +0000 (17:30 -0500)
committerWolfgang Denk <wd@denx.de>
Fri, 21 Aug 2009 20:55:21 +0000 (22:55 +0200)
Signed-off-by: giulio.benetti@micronovasrl.com
Acked-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
drivers/mtd/nand/nand_util.c

index 694ead68a16d90c9370b882e01b35b904254e226..bec927706f976cf3cf4a781badb505d721dfb922 100644 (file)
@@ -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 write_size;
 
+               WATCHDOG_RESET ();
+
                if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
                        printf ("Skip bad block 0x%08llx\n",
                                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 read_length;
 
+               WATCHDOG_RESET ();
+
                if (nand_block_isbad (nand, offset & ~(nand->erasesize - 1))) {
                        printf ("Skipping bad block 0x%08llx\n",
                                offset & ~(nand->erasesize - 1));