From: Mike Frysinger Date: Fri, 9 Oct 2009 06:24:33 +0000 (-0400) Subject: Blackfin: reset watchdog in udelay() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1f003cf4738a199d99c818124784058526d2d40e;p=project%2Fbcm63xx%2Fu-boot.git Blackfin: reset watchdog in udelay() All arches apparently should reset the watchdog in their udelay loop as noted on the mailing list recently: > 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. If this is missing in other architectures, it should be fixed at the root cause, i. e. in udelay() or in the respective support routines. Signed-off-by: Mike Frysinger --- diff --git a/cpu/blackfin/interrupts.c b/cpu/blackfin/interrupts.c index bf6fb4b4cf..19456e5c14 100644 --- a/cpu/blackfin/interrupts.c +++ b/cpu/blackfin/interrupts.c @@ -20,6 +20,7 @@ #include #include +#include #include #include "cpu.h" @@ -70,6 +71,8 @@ void udelay(unsigned long usec) cclk = (CONFIG_CCLK_HZ); while (usec > 1) { + WATCHDOG_RESET(); + /* * how many clock ticks to delay? * - request(in useconds) * clock_ticks(Hz) / useconds/second