Skip to content
Snippets Groups Projects
Commit bd0d19cc authored by Patrick Sestier's avatar Patrick Sestier Committed by Wolfgang Denk
Browse files

sf: kick watchdog when polling


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

Signed-off-by: default avatarPatrick Sestier <psestier@mircom.com>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent 23a70bf9
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment