mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-21 15:12:04 +00:00
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: Patrick Sestier <psestier@mircom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
23a70bf9c3
commit
bd0d19cc5f
1 changed files with 3 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <spi.h>
|
#include <spi.h>
|
||||||
#include <spi_flash.h>
|
#include <spi_flash.h>
|
||||||
|
#include <watchdog.h>
|
||||||
|
|
||||||
#include "spi_flash_internal.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);
|
timebase = get_timer(0);
|
||||||
do {
|
do {
|
||||||
|
WATCHDOG_RESET();
|
||||||
|
|
||||||
ret = spi_xfer(spi, 8, NULL, &status, 0);
|
ret = spi_xfer(spi, 8, NULL, &status, 0);
|
||||||
if (ret)
|
if (ret)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue