diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2008-12-17 16:53:07 +0100 |
commit | cb5473205206c7f14cbb1e747f28ec75b48826e2 (patch) | |
tree | 8f4808d60917100b18a10b05230f7638a0a9bbcc /common/cmd_mem.c | |
parent | baf449fc5ff96f071bb0e3789fd3265f6d4fd9a0 (diff) | |
parent | 92c78a3bbcb2ce508b4bf1c4a1e0940406a024bb (diff) | |
download | u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.zip u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.gz u-boot-imx-cb5473205206c7f14cbb1e747f28ec75b48826e2.tar.bz2 |
Merge branch 'fixes' into cleanups
Conflicts:
board/atmel/atngw100/atngw100.c
board/atmel/atstk1000/atstk1000.c
cpu/at32ap/at32ap700x/gpio.c
include/asm-avr32/arch-at32ap700x/clk.h
include/configs/atngw100.h
include/configs/atstk1002.h
include/configs/atstk1003.h
include/configs/atstk1004.h
include/configs/atstk1006.h
include/configs/favr-32-ezkit.h
include/configs/hammerhead.h
include/configs/mimc200.h
Diffstat (limited to 'common/cmd_mem.c')
-rw-r--r-- | common/cmd_mem.c | 54 |
1 files changed, 9 insertions, 45 deletions
diff --git a/common/cmd_mem.c b/common/cmd_mem.c index 4766c24..400cfd7 100644 --- a/common/cmd_mem.c +++ b/common/cmd_mem.c @@ -37,37 +37,6 @@ #endif #include <watchdog.h> -#if defined(CONFIG_CMD_MEMORY) \ - || defined(CONFIG_CMD_I2C) \ - || defined(CONFIG_CMD_ITEST) \ - || defined(CONFIG_CMD_PCI) \ - || defined(CONFIG_CMD_PORTIO) - -int cmd_get_data_size(char* arg, int default_size) -{ - /* Check for a size specification .b, .w or .l. - */ - int len = strlen(arg); - if (len > 2 && arg[len-2] == '.') { - switch(arg[len-1]) { - case 'b': - return 1; - case 'w': - return 2; - case 'l': - return 4; - case 's': - return -2; - default: - return -1; - } - } - return default_size; -} -#endif - -#if defined(CONFIG_CMD_MEMORY) - #ifdef CMD_MEM_DEBUG #define PRINTF(fmt,args...) printf (fmt ,##args) #else @@ -414,7 +383,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } -#ifndef CFG_NO_FLASH +#ifndef CONFIG_SYS_NO_FLASH /* check if we are copying to Flash */ if ( (addr2info(dest) != NULL) #ifdef CONFIG_HAS_DATAFLASH @@ -494,7 +463,7 @@ int do_mem_cp ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /* Check if we are copying from DataFlash to RAM */ if (addr_dataflash(addr) && !addr_dataflash(dest) -#ifndef CFG_NO_FLASH +#ifndef CONFIG_SYS_NO_FLASH && (addr2info(dest) == NULL) #endif ){ @@ -694,7 +663,7 @@ int do_mem_loopw (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /* * Perform a memory test. A more complete alternative test can be - * configured using CFG_ALT_MEMTEST. The complete test loops until + * configured using CONFIG_SYS_ALT_MEMTEST. The complete test loops until * interrupted by ctrl-c or by a failure of one of the sub-tests. */ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) @@ -704,7 +673,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) ulong readback; int rcode = 0; -#if defined(CFG_ALT_MEMTEST) +#if defined(CONFIG_SYS_ALT_MEMTEST) vu_long len; vu_long offset; vu_long test_offset; @@ -712,8 +681,8 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) vu_long temp; vu_long anti_pattern; vu_long num_words; -#if defined(CFG_MEMTEST_SCRATCH) - vu_long *dummy = (vu_long*)CFG_MEMTEST_SCRATCH; +#if defined(CONFIG_SYS_MEMTEST_SCRATCH) + vu_long *dummy = (vu_long*)CONFIG_SYS_MEMTEST_SCRATCH; #else vu_long *dummy = 0; /* yes, this is address 0x0, not NULL */ #endif @@ -738,13 +707,13 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if (argc > 1) { start = (ulong *)simple_strtoul(argv[1], NULL, 16); } else { - start = (ulong *)CFG_MEMTEST_START; + start = (ulong *)CONFIG_SYS_MEMTEST_START; } if (argc > 2) { end = (ulong *)simple_strtoul(argv[2], NULL, 16); } else { - end = (ulong *)(CFG_MEMTEST_END); + end = (ulong *)(CONFIG_SYS_MEMTEST_END); } if (argc > 3) { @@ -753,7 +722,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) pattern = 0; } -#if defined(CFG_ALT_MEMTEST) +#if defined(CONFIG_SYS_ALT_MEMTEST) printf ("Testing %08x ... %08x:\n", (uint)start, (uint)end); PRINTF("%s:%d: start 0x%p end 0x%p\n", __FUNCTION__, __LINE__, start, end); @@ -1206,7 +1175,6 @@ int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { unsigned long src, dst; unsigned long src_len = ~0UL, dst_len = ~0UL; - int err; switch (argc) { case 4: @@ -1227,7 +1195,6 @@ int do_unzip ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) /**************************************************/ -#if defined(CONFIG_CMD_MEMORY) U_BOOT_CMD( md, 3, 1, do_mem_md, "md - memory display\n", @@ -1336,6 +1303,3 @@ U_BOOT_CMD( "srcaddr dstaddr [dstsize]\n" ); #endif /* CONFIG_CMD_UNZIP */ - -#endif -#endif |