]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/image.c
net: cosmetic: Fix var naming net <-> eth drivers
[karo-tx-uboot.git] / common / image.c
index b75a5ce29a669b398c5c652282753a9ee28471ff..abc0d890f289d622503f7e028ade7a48dc55478c 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <environment.h>
 #include <image.h>
+#include <mapmem.h>
 
 #if defined(CONFIG_FIT) || defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
@@ -120,6 +121,10 @@ static const table_entry_t uimage_os[] = {
        {       IH_OS_SOLARIS,  "solaris",      "Solaris",              },
        {       IH_OS_SVR4,     "svr4",         "SVR4",                 },
 #endif
+#if defined(CONFIG_BOOTM_OPENRTOS) || defined(USE_HOSTCC)
+       {       IH_OS_OPENRTOS, "openrtos",     "OpenRTOS",             },
+#endif
+
        {       -1,             "",             "",                     },
 };
 
@@ -145,6 +150,7 @@ static const table_entry_t uimage_type[] = {
        {       IH_TYPE_MXSIMAGE,   "mxsimage",   "Freescale MXS Boot Image",},
        {       IH_TYPE_ATMELIMAGE, "atmelimage", "ATMEL ROM-Boot Image",},
        {       IH_TYPE_X86_SETUP,  "x86_setup",  "x86 setup.bin",    },
+       {       IH_TYPE_LPC32XXIMAGE, "lpc32xximage",  "LPC32XX Boot Image", },
        {       -1,                 "",           "",                   },
 };
 
@@ -485,12 +491,22 @@ void memmove_wd(void *to, void *from, size_t len, ulong chunksz)
                return;
 
 #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) */
@@ -742,7 +758,7 @@ int genimg_get_format(const void *img_addr)
  * genimg_get_image - get image from special storage (if necessary)
  * @img_addr: image start address
  *
- * genimg_get_image() checks if provided image start adddress is located
+ * genimg_get_image() checks if provided image start address is located
  * in a dataflash storage. If so, image is moved to a system RAM memory.
  *
  * returns: