]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fdt: Show the type of devicetree with fdt addr
authorSimon Glass <sjg@chromium.org>
Wed, 21 Jul 2021 20:55:26 +0000 (14:55 -0600)
committerSimon Glass <sjg@chromium.org>
Sun, 1 Aug 2021 15:05:24 +0000 (09:05 -0600)
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>
cmd/fdt.c

index 5acc3ebaf3356e4bbcdcff8717b5fc38448ce4a3..baec05529adaefd1056aafc5ca9b0a4feff52bfd 100644 (file)
--- 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;
                }