From: Simon Glass Date: Sat, 30 Jul 2022 21:52:15 +0000 (-0600) Subject: dm: core: Support sandbox with read interface X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=e141075f1c46a587960e1b0541494417243e6b90;p=u-boot.git dm: core: Support sandbox with read interface Update the 'read' command to work correctly with sandbox. Signed-off-by: Simon Glass --- 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 #include +#include #include 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);