From: Ingo van Lil <inguin@gmx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] CFI Driver: Reset watchdog timer after each flash operation
Date: Fri, 2 Oct 2009 12:34:17 +0200 [thread overview]
Message-ID: <20091002103417.GA9767@zaphod.peppercon.de> (raw)
The CFI driver does not reset the device's watchdog, so long-running
flash operations will cause the watchdog timer to expire. A comment in
flash_status_check() suggests that udelay() is expected to reset the
watchdog, but I can't find any architecture where it does.
Signed-off-by: Ingo van Lil <inguin@gmx.de>
---
drivers/mtd/cfi_flash.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 6eea49a..5dcd62d 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -39,6 +39,7 @@
#include <asm/io.h>
#include <asm/byteorder.h>
#include <environment.h>
+#include <watchdog.h>
/*
* This file implements a Common Flash Interface (CFI) driver for
@@ -675,7 +676,8 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector,
flash_write_cmd (info, sector, 0, info->cmd_reset);
return ERR_TIMOUT;
}
- udelay (1); /* also triggers watchdog */
+ udelay (1);
+ WATCHDOG_RESET();
}
return ERR_OK;
}
--
1.6.2.5
next reply other threads:[~2009-10-02 10:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-02 10:34 Ingo van Lil [this message]
2009-10-02 11:06 ` [U-Boot] [PATCH] CFI Driver: Reset watchdog timer after each flash operation Stefan Roese
2009-10-02 12:12 ` Ingo van Lil
2009-10-03 23:29 ` Wolfgang Denk
2009-10-04 11:15 ` Ingo van Lil
2009-10-04 11:49 ` Graeme Russ
2009-10-02 12:30 ` Wolfgang Denk
2009-10-02 18:31 ` Mike Frysinger
2009-10-02 19:35 ` Wolfgang Denk
2009-10-02 20:21 ` J. William Campbell
2009-10-02 21:59 ` 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=20091002103417.GA9767@zaphod.peppercon.de \
--to=inguin@gmx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox