All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: spi-nor-core: call WATCHDOG_RESET() in spi_nor_ready()
@ 2020-03-16 20:18 Rasmus Villemoes
  2020-03-19 11:25 ` Vignesh Raghavendra
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Rasmus Villemoes @ 2020-03-16 20:18 UTC (permalink / raw)
  To: u-boot

I have a board for which doing "sf erase 0x100000 0x80000"
consistently causes the external watchdog circuit to reset the
board. Make sure to pet the watchdog during slow operations such as
erasing or writing large areas of a spi nor flash.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 drivers/mtd/spi/spi-nor-core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index 4076646225..b7f7aa7b28 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -20,6 +20,7 @@
 #include <linux/mtd/spi-nor.h>
 #include <spi-mem.h>
 #include <spi.h>
+#include <watchdog.h>
 
 #include "sf_internal.h"
 
@@ -399,6 +400,7 @@ static int spi_nor_ready(struct spi_nor *nor)
 {
 	int sr, fsr;
 
+	WATCHDOG_RESET();
 	sr = spi_nor_sr_ready(nor);
 	if (sr < 0)
 		return sr;
-- 
2.23.0

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2020-09-23  6:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 20:18 [PATCH] mtd: spi-nor-core: call WATCHDOG_RESET() in spi_nor_ready() Rasmus Villemoes
2020-03-19 11:25 ` Vignesh Raghavendra
2020-03-19 11:39   ` Rasmus Villemoes
2020-03-19 12:28     ` Vignesh Raghavendra
2020-03-19 12:44       ` Rasmus Villemoes
2020-03-19 13:23         ` Vignesh Raghavendra
2020-03-19 13:50           ` Rasmus Villemoes
2020-03-20  7:43             ` Vignesh Raghavendra
2020-03-19 14:52 ` [EXT] " Kuldeep Singh
2020-03-19 15:05   ` Rasmus Villemoes
2020-03-20 10:14 ` [PATCH v2 1/2] spi: call WATCHDOG_RESET() in spi_nor_wait_till_ready_with_timeout() Rasmus Villemoes
2020-03-20 10:14   ` [PATCH v2 2/2] spi: allow calling WATCHDOG_RESET during long reads Rasmus Villemoes
2020-03-20 11:18   ` [PATCH v2 1/2] spi: call WATCHDOG_RESET() in spi_nor_wait_till_ready_with_timeout() Wolfgang Denk
2020-03-24 13:49     ` Vignesh Raghavendra
2020-03-24 14:41       ` Wolfgang Denk
2020-03-26 10:12         ` Vignesh Raghavendra
2020-03-26 14:52           ` Wolfgang Denk
2020-05-19 22:12   ` Rasmus Villemoes
2020-09-23  6:52     ` Rasmus Villemoes

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.