#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
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
/* 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
){
/*
* 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[])
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;
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
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) {
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);
/**************************************************/
-#if defined(CONFIG_CMD_MEMORY)
U_BOOT_CMD(
md, 3, 1, do_mem_md,
"md - memory display\n",
"srcaddr dstaddr [dstsize]\n"
);
#endif /* CONFIG_CMD_UNZIP */
-
-#endif
-#endif