Commit 94c50f11 authored by Kumar Gala's avatar Kumar Gala Committed by Wolfgang Denk
Browse files

Revert "sandbox: Change md command to use map_physmem"

This reverts commit 355a8357

.

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: default avatarKumar Gala <galak@kernel.crashing.org>
parent e1a37f85
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <dataflash.h> #include <dataflash.h>
#endif #endif
#include <watchdog.h> #include <watchdog.h>
#include <asm/io.h>
#ifdef CMD_MEM_DEBUG #ifdef CMD_MEM_DEBUG
#define PRINTF(fmt,args...) printf (fmt ,##args) #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[]) ...@@ -142,13 +141,9 @@ int do_mem_md ( cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
# endif # endif
{ {
ulong bytes = size * length;
void *buf = map_physmem(addr, bytes, MAP_WRBACK);
/* Print the lines. */ /* Print the lines. */
print_buffer(addr, buf, size, length, DISP_LINE_LEN / size); print_buffer(addr, (void*)addr, size, length, DISP_LINE_LEN/size);
addr += bytes; addr += size*length;
unmap_physmem(buf, bytes);
} }
#endif #endif
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment