+ Vignesh

On Wed, Jul 10, 2019 at 8:49 AM Weijie Gao <[email protected]> wrote:
>
> This patch adds WATCHDOG_RESET() to loops for read/write/erase to avoid
> watchdog not being feeded in a long period.
>
> Cc: Vignesh Raghavendra <[email protected]>
> Signed-off-by: Weijie Gao <[email protected]>
> ---
>  drivers/mtd/spi/spi-nor-core.c | 13 +++++++++++++
>  drivers/mtd/spi/spi-nor-tiny.c |  3 +++
>  2 files changed, 16 insertions(+)
>
> diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c
> index 1acff745d1a..2049661f3ad 100644
> --- a/drivers/mtd/spi/spi-nor-core.c
> +++ b/drivers/mtd/spi/spi-nor-core.c
> @@ -10,6 +10,7 @@
>   */
>
>  #include <common.h>
> +#include <watchdog.h>
>  #include <linux/err.h>
>  #include <linux/errno.h>
>  #include <linux/log2.h>
> @@ -103,6 +104,8 @@ static ssize_t spi_nor_read_data(struct spi_nor *nor, 
> loff_t from, size_t len,
>                 op.addr.val += op.data.nbytes;
>                 remaining -= op.data.nbytes;
>                 op.data.buf.in += op.data.nbytes;
> +
> +               WATCHDOG_RESET();
>         }

Not sure, but it would require better testing.
_______________________________________________
U-Boot mailing list
[email protected]
https://lists.denx.de/listinfo/u-boot

Reply via email to