aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorSimon Glass2021-07-21 14:55:26 -0600
committerSimon Glass2021-08-01 09:05:24 -0600
commitb29a0dbdc3de43a8574335bef93d50c659eff2e5 (patch)
tree138fcffbb6a14e7c9588c40e985d724396f99447 /cmd
parent0c929631a237be26042b87259c3404d9756a0773 (diff)
fdt: Show the type of devicetree with fdt addr
It seems useful to show whether the address of the Control or Working devicetree is being shown. Add support for this. Drop the confusing 0x prefix since the command itself only accepts hex. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/fdt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/fdt.c b/cmd/fdt.c
index 5acc3ebaf33..baec05529ad 100644
--- a/cmd/fdt.c
+++ b/cmd/fdt.c
@@ -136,9 +136,10 @@ static int do_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
blob = working_fdt;
if (!blob || !fdt_valid(&blob))
return 1;
- printf("The address of the fdt is %#08lx\n",
+ printf("%s fdt: %08lx\n",
+ control ? "Control" : "Working",
control ? (ulong)map_to_sysmem(blob) :
- env_get_hex("fdtaddr", 0));
+ env_get_hex("fdtaddr", 0));
return 0;
}