diff options
author | Patrick Sestier <psestier@mircom.com> | 2011-04-15 14:25:25 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-06-01 22:21:42 +0200 |
commit | bd0d19cc5f346ff6504d47497ec799e066168b96 (patch) | |
tree | 4747dfdb41c263bfdddf3e488d25d1c04c3699a5 /drivers/mtd/spi/spi_flash.c | |
parent | 23a70bf9c352ec5b6ac52d5be8087b963c2073dd (diff) | |
download | u-boot-imx-bd0d19cc5f346ff6504d47497ec799e066168b96.zip u-boot-imx-bd0d19cc5f346ff6504d47497ec799e066168b96.tar.gz u-boot-imx-bd0d19cc5f346ff6504d47497ec799e066168b96.tar.bz2 |
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>
Diffstat (limited to 'drivers/mtd/spi/spi_flash.c')
-rw-r--r-- | drivers/mtd/spi/spi_flash.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c index c75b716..016b586 100644 --- a/drivers/mtd/spi/spi_flash.c +++ b/drivers/mtd/spi/spi_flash.c @@ -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; |