From f63f863c85f0b779d0913d4305215f833208ac5a Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Wed, 4 Mar 2015 21:55:48 +0100 Subject: [PATCH] ar7240: reset watchdog when erasing otherwise the watchdog will freeze the board because the spi flash isn't reachable so fast --- u-boot/board/ar7240/common/ar7240_flash.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/u-boot/board/ar7240/common/ar7240_flash.c b/u-boot/board/ar7240/common/ar7240_flash.c index d6b7dc798d..c11f538e08 100644 --- a/u-boot/board/ar7240/common/ar7240_flash.c +++ b/u-boot/board/ar7240/common/ar7240_flash.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -100,6 +101,9 @@ flash_erase(flash_info_t *info, int s_first, int s_last) extern void show_activity(int arg); show_activity(3); #endif +#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) + WATCHDOG_RESET(); +#endif #endif ar7240_spi_sector_erase(i * sector_size);