[PATCH 2/2] fdt: Show the type of devicetree with fdt addr

Simon Glass sjg at chromium.org
Wed Jul 21 22:55:26 CEST 2021


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 at chromium.org>
---

 cmd/fdt.c | 5 +++--
 1 file 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;
 		}
 
-- 
2.32.0.402.g57bb445576-goog



More information about the U-Boot mailing list