From: Wolfgang Denk Date: Sun, 19 Jul 2009 21:50:25 +0200 Subject: [U-Boot] [PATCH] add WATCHDOG_RESET() on nand write and read In-Reply-To: References: Message-ID: <20090719195025.43F79832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Scott, In message Giulio Benetti wrote: > I think it's better to put Watchdog reset also inside read and write nand. > What do you think? > > Signed-off-by: giulio.benetti at micronovasrl.com > > diff -urpN b/drivers/mtd/nand/nand_util.c a/drivers/mtd/nand/nand_util.c > --- b/drivers/mtd/nand/nand_util.c 2009-06-14 21:30:39.000000000 +0200 > +++ a/drivers/mtd/nand/nand_util.c 2009-06-18 17:13:19.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)); Acked-by: Wolfgang Denk Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "It's like deja vu all over again." - Yogi Berra