The CFI driver does not reset the device's watchdog, so long-running
flash operations will cause the watchdog timer to expire. A comment in
flash_status_check() suggests that udelay() is expected to reset the
watchdog, but I can't find any architecture where it does.

Signed-off-by: Ingo van Lil <ing...@gmx.de>
---
 drivers/mtd/cfi_flash.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 6eea49a..5dcd62d 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -39,6 +39,7 @@
 #include <asm/io.h>
 #include <asm/byteorder.h>
 #include <environment.h>
+#include <watchdog.h>
 
 /*
  * This file implements a Common Flash Interface (CFI) driver for
@@ -675,7 +676,8 @@ static int flash_status_check (flash_info_t * info, 
flash_sect_t sector,
                        flash_write_cmd (info, sector, 0, info->cmd_reset);
                        return ERR_TIMOUT;
                }
-               udelay (1);             /* also triggers watchdog */
+               udelay (1);
+               WATCHDOG_RESET();
        }
        return ERR_OK;
 }
-- 
1.6.2.5

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to