All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giulio Benetti <giulio.benetti@micronovasrl.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] add WATCHDOG_RESET() on nand write and read
Date: Thu, 18 Jun 2009 17:16:13 +0200	[thread overview]
Message-ID: <h1dlse$3bu$2@ger.gmane.org> (raw)

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));


-- 
Giulio Benetti
R&D
Micronova srl

             reply	other threads:[~2009-06-18 15:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-18 15:16 Giulio Benetti [this message]
2009-07-19 19:50 ` [U-Boot] [PATCH] add WATCHDOG_RESET() on nand write and read Wolfgang Denk
2009-07-31 22:35   ` Scott Wood
2009-07-31 22:50     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='h1dlse$3bu$2@ger.gmane.org' \
    --to=giulio.benetti@micronovasrl.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.