summaryrefslogtreecommitdiff
path: root/cmd/read.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-30 15:52:15 -0600
committerTom Rini <trini@konsulko.com>2022-08-12 08:14:24 -0400
commite141075f1c46a587960e1b0541494417243e6b90 (patch)
treecec85ad10a87afbddbd82938a5dd5e60425ef42d /cmd/read.c
parent55f7990bfeb92c172065d5b53c59d5306cc554ca (diff)
downloadu-boot-e141075f1c46a587960e1b0541494417243e6b90.tar.gz
u-boot-e141075f1c46a587960e1b0541494417243e6b90.tar.bz2
u-boot-e141075f1c46a587960e1b0541494417243e6b90.zip
dm: core: Support sandbox with read interface
Update the 'read' command to work correctly with sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd/read.c')
-rw-r--r--cmd/read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd/read.c b/cmd/read.c
index 99c7e3854e..fecfadaa1f 100644
--- a/cmd/read.c
+++ b/cmd/read.c
@@ -10,6 +10,7 @@
#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[])
@@ -45,7 +46,7 @@ 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);