mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
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 <vapier@gentoo.org>
This commit is contained in:
parent
370ec73455
commit
1f003cf473
1 changed files with 3 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
#include <watchdog.h>
|
||||||
#include <asm/blackfin.h>
|
#include <asm/blackfin.h>
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
|
||||||
|
@ -70,6 +71,8 @@ void udelay(unsigned long usec)
|
||||||
cclk = (CONFIG_CCLK_HZ);
|
cclk = (CONFIG_CCLK_HZ);
|
||||||
|
|
||||||
while (usec > 1) {
|
while (usec > 1) {
|
||||||
|
WATCHDOG_RESET();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* how many clock ticks to delay?
|
* how many clock ticks to delay?
|
||||||
* - request(in useconds) * clock_ticks(Hz) / useconds/second
|
* - request(in useconds) * clock_ticks(Hz) / useconds/second
|
||||||
|
|
Loading…
Add table
Reference in a new issue