X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fcmd_mem.c;h=c3aab3d4b53ea68cf003840b8bdf3c09b95cf7d0;hb=fe0ae3e239541cb5d9ea1684a36e1a37cea45afa;hp=042c994a1bb53b7d535b5dd4a9c7e9951e6f3e1c;hpb=1c9f47ab2a2e9b62d08d39bfb9c4adc8f8edc5da;p=karo-tx-uboot.git diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 042c994a1b..c3aab3d4b5 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -2,23 +2,7 @@ * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ /* @@ -445,7 +429,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 +535,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 +617,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) { @@ -1002,7 +989,7 @@ static int do_mem_mtest(cmd_tbl_t *cmdtp, int flag, int argc, return ret; /* not reached */ } - +#endif /* CONFIG_CMD_MEMTEST */ /* Modify memory. * @@ -1240,11 +1227,13 @@ U_BOOT_CMD( ); #endif /* CONFIG_LOOPW */ +#ifdef CONFIG_CMD_MEMTEST U_BOOT_CMD( mtest, 5, 1, do_mem_mtest, "simple RAM read/write test", "[start [end [pattern [iterations]]]]" ); +#endif /* CONFIG_CMD_MEMTEST */ #ifdef CONFIG_MX_CYCLIC U_BOOT_CMD(