summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/spi/spi-nor-core.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-03-15 12:15:38 -0400
committerTom Rini <trini@konsulko.com>2021-03-15 12:15:38 -0400
commit22fc991dafee0142fc6bf621e7bd558bd58020b4 (patch)
treee5da8826fd735de968519f432864dc1545d96017 /drivers/mtd/spi/spi-nor-core.c
parent1876b390f31afca15de334e499aa071b0bf64a44 (diff)
parent4103e13534141c31e4e9bf40848ab3a61dabce81 (diff)
downloadu-boot-22fc991dafee0142fc6bf621e7bd558bd58020b4.tar.gz
u-boot-22fc991dafee0142fc6bf621e7bd558bd58020b4.tar.xz
u-boot-22fc991dafee0142fc6bf621e7bd558bd58020b4.zip
Merge tag 'v2021.04-rc4' into next
Prepare v2021.04-rc4
Diffstat (limited to 'drivers/mtd/spi/spi-nor-core.c')
-rw-r--r--drivers/mtd/spi/spi-nor-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
index ef426dac02..e0efebc355 100644
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <log.h>
+#include <watchdog.h>
#include <dm.h>
#include <dm/device_compat.h>
#include <dm/devres.h>
@@ -566,6 +567,7 @@ static int spi_nor_erase(struct mtd_info *mtd, struct erase_info *instr)
len = instr->len;
while (len) {
+ WATCHDOG_RESET();
#ifdef CONFIG_SPI_FLASH_BAR
ret = write_bar(nor, addr);
if (ret < 0)
@@ -1250,6 +1252,7 @@ static int spi_nor_write(struct mtd_info *mtd, loff_t to, size_t len,
for (i = 0; i < len; ) {
ssize_t written;
loff_t addr = to + i;
+ WATCHDOG_RESET();
/*
* If page_size is a power of two, the offset can be quickly