summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2011-11-12 08:02:12 +0000
committerWolfgang Denk <wd@denx.de>2011-11-16 21:43:24 +0100
commit94c50f1176b711ce16ac95b58fb11d643f4b0ce8 (patch)
tree0fa86a4d315fb8b72313fc74c4171e0211b37d57
parente1a37f8599d2ffbee37f23ee1b8760faf2e1f026 (diff)
Revert "sandbox: Change md command to use map_physmem"
This reverts commit 355a835747c6f7c5071ead295a7dfc489c73cb03. The original commit broke long standing assumption that md commands work on effective addresses. This normally isn't an issue for most systems that map 1:1, however on systems with a 36-bit address map it breaks. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r--common/cmd_mem.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index 461ee1977d5..28476d750b0 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -33,7 +33,6 @@
#include <dataflash.h>
#endif
#include <watchdog.h>
-#include <asm/io.h>
#ifdef CMD_MEM_DEBUG
#define PRINTF(fmt,args...) printf (fmt ,##args)
@@ -142,13 +141,9 @@ int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
# endif
{
- ulong bytes = size * length;
- void *buf = map_physmem(addr, bytes, MAP_WRBACK);
-
/* Print the lines. */
- print_buffer(addr, buf, size, length, DISP_LINE_LEN / size);
- addr += bytes;
- unmap_physmem(buf, bytes);
+ print_buffer(addr, (void*)addr, size, length, DISP_LINE_LEN/size);
+ addr += size*length;
}
#endif