]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mtd/cfi_flash.c
* Fix: watchdog timed out, if flash blank (0xFF) blocks
[people/ms/u-boot.git] / drivers / mtd / cfi_flash.c
index 5494bcffa7c4b247992f8a7e0e997a4b02cda2bf..722c3fc7bdd17a2ef0e1eb3db30678979046f048 100644 (file)
@@ -40,6 +40,7 @@
 #include <asm/byteorder.h>
 #include <environment.h>
 #include <mtd/cfi_flash.h>
+#include <watchdog.h>
 
 /*
  * This file implements a Common Flash Interface (CFI) driver for
@@ -577,6 +578,7 @@ static int flash_status_check (flash_info_t * info, flash_sect_t sector,
        reset_timer();
 #endif
        start = get_timer (0);
+       WATCHDOG_RESET();
        while (flash_is_busy (info, sector)) {
                if (get_timer (start) > tout) {
                        printf ("Flash %s timeout at address %lx data %lx\n",
@@ -668,6 +670,7 @@ static int flash_status_poll(flash_info_t *info, void *src, void *dst,
        reset_timer();
 #endif
        start = get_timer(0);
+       WATCHDOG_RESET();
        while (1) {
                switch (info->portwidth) {
                case FLASH_CFI_8BIT: