Hi On 1/27/21 4:19 PM, Patrick DELAUNAY wrote: > Hi, > > On 1/20/21 2:42 PM, Patrice Chotard wrote: >> In case of big area read/write on spi nand, watchdog timeout may occurs. >> To fix that, add WATCHDOG_RESET() in spinand_mtd_read() and >> spinand_mtd_write() to ensure that watchdog is reset. >> >> Signed-off-by: Patrice Chotard <[email protected]> >> >> --- >> >> drivers/mtd/nand/spi/core.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/drivers/mtd/nand/spi/core.c b/drivers/mtd/nand/spi/core.c >> index cb8ffa3fa9..7f54422c93 100644 >> --- a/drivers/mtd/nand/spi/core.c >> +++ b/drivers/mtd/nand/spi/core.c >> @@ -24,6 +24,7 @@ >> #include <errno.h> >> #include <spi.h> >> #include <spi-mem.h> >> +#include <watchdog.h> >> #include <linux/mtd/spinand.h> >> #endif >> @@ -574,6 +575,7 @@ static int spinand_mtd_read(struct mtd_info *mtd, >> loff_t from, >> #endif >> nanddev_io_for_each_page(nand, from, ops, &iter) { >> + WATCHDOG_RESET(); >> ret = spinand_select_target(spinand, iter.req.pos.target); >> if (ret) >> break; >> @@ -625,6 +627,7 @@ static int spinand_mtd_write(struct mtd_info *mtd, >> loff_t to, >> #endif >> nanddev_io_for_each_page(nand, to, ops, &iter) { >> + WATCHDOG_RESET(); >> ret = spinand_select_target(spinand, iter.req.pos.target); >> if (ret) >> break; > > > Reviewed-by: Patrick Delaunay <[email protected]> > > Thanks > > Patrick > > Applied to u-boot-stm/next
Thanks Patrice

