浏览代码

cmd_mem: fix cp command

The "cp" command has not worked since
commit 0628ab8ec59834f98ede267edd21ddb8ba0bb57b,
because of the following lines, which set the destination
and the source to the same address.

	buf = map_sysmem(addr, bytes);
	src = map_sysmem(addr, bytes);

Tested-by: Tom Rini <trini@ti.com>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Masahiro Yamada 12 年之前
父节点
当前提交
53237afe5b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      common/cmd_mem.c

+ 1 - 1
common/cmd_mem.c

@@ -445,7 +445,7 @@ static int do_mem_cp(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 #endif
 #endif
 
 
 	bytes = size * count;
 	bytes = size * count;
-	buf = map_sysmem(addr, bytes);
+	buf = map_sysmem(dest, bytes);
 	src = map_sysmem(addr, bytes);
 	src = map_sysmem(addr, bytes);
 	while (count-- > 0) {
 	while (count-- > 0) {
 		if (size == 4)
 		if (size == 4)