Skip to contentSkip to conversation

sf: kick watchdog when polling

PATCH New Mike Frysinger 2 participants 2 messages Apr 16, 2011 – Jun 1, 2011 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sf: kick watchdog when polling

From: Patrick Sestier <[email protected]>

The status polling can take a while, so make sure we kick the watchdog after each successful poll.

---
 drivers/mtd/spi/spi_flash.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/mtd/spi/spi_flash.c +3 -0
index c75b716..016b586 100644
@@ -11,6 +11,7 @@
 #include <malloc.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <watchdog.h>
 
 #include "spi_flash_internal.h"
 
@@ -105,6 +106,8 @@ int spi_flash_cmd_poll_bit(struct spi_flash *flash, unsigned long timeout,
 
 	timebase = get_timer(0);
 	do {
+		WATCHDOG_RESET();
+
 		ret = spi_xfer(spi, 8, NULL, &status, 0);
 		if (ret)
 			return -1;
Signature · 1 line
1.7.5.rc1
#1 lore raw

PATCH 1/1 sf: kick watchdog when polling

Dear Mike Frysinger,

Quoted 10 lines · In message <[email protected]> you wrote:

From: Patrick Sestier <[email protected]>

The status polling can take a while, so make sure we kick the watchdog after each successful poll.

---
 drivers/mtd/spi/spi_flash.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
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
We, the unwilling, led by the unknowing, are doing the impossible for
the ungrateful. We have done so much, for so long, with so little, we
are now qualified to do anything with nothing.