rename CFG_ macros to CONFIG_SYS
[oweals/u-boot.git] / common / cmd_mem.c
index 672218b9caff8163eb3e570ea5100574581abd5d..d7666c2f302591b5c8461f9514c66c32606fa93c 100644 (file)
@@ -37,8 +37,6 @@
 #endif
 #include <watchdog.h>
 
-#if defined(CONFIG_CMD_MEMORY)
-
 #ifdef CMD_MEM_DEBUG
 #define        PRINTF(fmt,args...)     printf (fmt ,##args)
 #else
@@ -385,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
@@ -465,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
           ){
@@ -665,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[])
@@ -675,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;
@@ -683,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
@@ -709,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) {
@@ -724,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);
@@ -1306,5 +1304,3 @@ U_BOOT_CMD(
        "srcaddr dstaddr [dstsize]\n"
 );
 #endif /* CONFIG_CMD_UNZIP */
-
-#endif