Commit 7be7949b authored by Sergei Poselenov's avatar Sergei Poselenov

RM 2235. Support WDT on SmartFusion.

Signed-off-by: default avatarReinhard Mötzel <rmoetzel@z-laser.de>
Signed-off-by: default avatarSergei Poselenov <sposelenov@emcraft.com>
parent d980efea
......@@ -451,12 +451,22 @@ phys_size_t getenv_bootm_size(void)
void memmove_wd (void *to, void *from, size_t len, ulong chunksz)
{
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
if (to > from) {
from += len;
to += len;
}
while (len > 0) {
size_t tail = (len > chunksz) ? chunksz : len;
WATCHDOG_RESET ();
if (to > from) {
to -= tail;
from -= tail;
}
memmove (to, from, tail);
to += tail;
from += tail;
if (to < from) {
to += tail;
from += tail;
}
len -= tail;
}
#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment