summaryrefslogtreecommitdiff
path: root/common/image.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-08-11 06:43:38 +0200
committerStefan Roese <sr@denx.de>2008-08-11 06:43:38 +0200
commit81c4dc39797e88ebbde14bb4b711f9588f197680 (patch)
tree1d518f2187cc027a86e4b7c38739f02a23ea871b /common/image.c
parenteab1007334b93a6209f1ec33615e26ef5311ede7 (diff)
parente84d568fa2a9f4ce7888141e71676368ef6b3f25 (diff)
Merge branch 'master' of /home/stefan/git/u-boot/u-boot
Diffstat (limited to 'common/image.c')
-rw-r--r--common/image.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/common/image.c b/common/image.c
index 535c302d4e..1807348389 100644
--- a/common/image.c
+++ b/common/image.c
@@ -189,6 +189,22 @@ int image_check_dcrc (image_header_t *hdr)
return (dcrc == image_get_dcrc (hdr));
}
+void memmove_wd (void *to, void *from, size_t len, ulong chunksz)
+{
+#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
+ while (len > 0) {
+ size_t tail = (len > chunksz) ? chunksz : len;
+ WATCHDOG_RESET ();
+ memmove (to, from, tail);
+ to += tail;
+ from += tail;
+ len -= tail;
+ }
+#else /* !(CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG) */
+ memmove (to, from, len);
+#endif /* CONFIG_HW_WATCHDOG || CONFIG_WATCHDOG */
+}
+#endif /* USE_HOSTCC */
/**
* image_multi_count - get component (sub-image) count
@@ -833,7 +849,7 @@ int boot_get_ramdisk (int argc, char *argv[], bootm_headers_t *images,
rd_noffset = fit_conf_get_ramdisk_node (fit_hdr, cfg_noffset);
if (rd_noffset < 0) {
debug ("* ramdisk: no ramdisk in config\n");
- return 1;
+ return 0;
}
}
#endif