diff options
author | Marian Balakowicz <m8@semihalf.com> | 2008-01-08 18:11:45 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-02-07 01:12:56 +0100 |
commit | af13cdbc01eaf88880978bfb4f603e012818ba24 (patch) | |
tree | 87f9c7d3abf919f3ddf3dd22257b68b9bfe7505e /lib_m68k | |
parent | 958fc48abddeab513ea4847e34f22a2e9fe67fe1 (diff) | |
download | u-boot-imx-af13cdbc01eaf88880978bfb4f603e012818ba24.zip u-boot-imx-af13cdbc01eaf88880978bfb4f603e012818ba24.tar.gz u-boot-imx-af13cdbc01eaf88880978bfb4f603e012818ba24.tar.bz2 |
[new uImage] Add memmove_wd() common routine
Move common, watchdog sensible memmove code to a helper memmmove_wd() routine.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'lib_m68k')
-rw-r--r-- | lib_m68k/m68k_linux.c | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/lib_m68k/m68k_linux.c b/lib_m68k/m68k_linux.c index f865c0c..0af2eae 100644 --- a/lib_m68k/m68k_linux.c +++ b/lib_m68k/m68k_linux.c @@ -266,25 +266,10 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, initrd_end = initrd_start + len; printf(" Loading Ramdisk to %08lx, end %08lx ... ", initrd_start, initrd_end); -#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG) - { - size_t l = len; - void *to = (void *)initrd_start; - void *from = (void *)data; - - while (l > 0) { - size_t tail = - (l > CHUNKSZ) ? CHUNKSZ : l; - WATCHDOG_RESET(); - memmove(to, from, tail); - to += tail; - from += tail; - l -= tail; - } - } -#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */ - memmove((void *)initrd_start, (void *)data, len); -#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */ + + memmove_wd((void *)initrd_start, + (void *)data, len, CHUNKSZ); + puts("OK\n"); } } else { |