Update the 'read' command to work correctly with sandbox.
Signed-off-by: Simon Glass <sjg@chromium.org>
#include <common.h>
#include <command.h>
+#include <mapmem.h>
#include <part.h>
int do_read(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
return 1;
}
- addr = (void *)hextoul(argv[3], NULL);
+ addr = map_sysmem(hextoul(argv[3], NULL), 0);
blk = hextoul(argv[4], NULL);
cnt = hextoul(argv[5], NULL);