bootm: Disable interrupts before loading OS
[platform/kernel/u-boot.git] / common / cmd_mem.c
index 53572f7..77eafa0 100644 (file)
@@ -445,7 +445,7 @@ static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
 
        bytes = size * count;
-       buf = map_sysmem(addr, bytes);
+       buf = map_sysmem(dest, bytes);
        src = map_sysmem(addr, bytes);
        while (count-- > 0) {
                if (size == 4)
@@ -551,6 +551,8 @@ static int do_mem_loop(cmd_tbl_t *cmdtp, int flag, int argc,
                        *cp++;
        }
        unmap_sysmem(buf);
+
+       return 0;
 }
 
 #ifdef CONFIG_LOOPW
@@ -631,6 +633,7 @@ int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 }
 #endif /* CONFIG_LOOPW */
 
+#ifdef CONFIG_CMD_MEMTEST
 static ulong mem_test_alt(vu_long *buf, ulong start_addr, ulong end_addr,
                          vu_long *dummy)
 {
@@ -910,7 +913,6 @@ static ulong mem_test_quick(vu_long *buf, ulong start_addr, ulong end_addr,
        return 0;
 }
 
-#ifdef CONFIG_CMD_MEMTEST
 /*
  * Perform a memory test. A more complete alternative test can be
  * configured using CONFIG_SYS_ALT_MEMTEST. The complete test loops until