summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/nand_util.c
diff options
context:
space:
mode:
authorGiulio Benetti <giulio.benetti@micronovasrl.com>2009-07-31 17:30:34 -0500
committerWolfgang Denk <wd@denx.de>2009-08-21 22:55:21 +0200
commit1fc1d9aed08f2b3366d634fda6712a710b2cff9a (patch)
treef351d5540a660aac57bda714726911b278f7c23d /drivers/mtd/nand/nand_util.c
parent2bcbd429f44e32ead38a33f372e4c027e66710f9 (diff)
downloadu-boot-imx-1fc1d9aed08f2b3366d634fda6712a710b2cff9a.zip
u-boot-imx-1fc1d9aed08f2b3366d634fda6712a710b2cff9a.tar.gz
u-boot-imx-1fc1d9aed08f2b3366d634fda6712a710b2cff9a.tar.bz2
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>
Diffstat (limited to 'drivers/mtd/nand/nand_util.c')
-rw-r--r--drivers/mtd/nand/nand_util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nand_util.c b/drivers/mtd/nand/nand_util.c
index 694ead6..bec9277 100644
--- a/drivers/mtd/nand/nand_util.c
+++ b/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 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));