mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-16 14:08:45 +00:00
ppc flush_cache: add watch-dog triggering into the loops.
Some boards (e.g. lwmon5) need rather a frequent watch-dog kicking. Since the time it takes for the flush_cache() function to complete its job depends on the size of data being flushed, one may encounter watch-dog resets on such boards when, for example, download big files over ethernet. Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
This commit is contained in:
parent
18ec19e4aa
commit
138105efe1
1 changed files with 3 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
|
||||
#include <common.h>
|
||||
#include <asm/cache.h>
|
||||
#include <watchdog.h>
|
||||
|
||||
void flush_cache (ulong start_addr, ulong size)
|
||||
{
|
||||
|
@ -35,6 +36,7 @@ void flush_cache (ulong start_addr, ulong size)
|
|||
addr < end_addr;
|
||||
addr += CFG_CACHELINE_SIZE) {
|
||||
asm ("dcbst 0,%0": :"r" (addr));
|
||||
WATCHDOG_RESET();
|
||||
}
|
||||
asm ("sync"); /* Wait for all dcbst to complete on bus */
|
||||
|
||||
|
@ -42,6 +44,7 @@ void flush_cache (ulong start_addr, ulong size)
|
|||
addr < end_addr;
|
||||
addr += CFG_CACHELINE_SIZE) {
|
||||
asm ("icbi 0,%0": :"r" (addr));
|
||||
WATCHDOG_RESET();
|
||||
}
|
||||
}
|
||||
asm ("sync"); /* Always flush prefetch queue in any case */
|
||||
|
|
Loading…
Add table
Reference in a new issue