]> git.sur5r.net Git - u-boot/commitdiff
fdt: fdt addr w/o any args reports back the current working address
authorKumar Gala <galak@kernel.crashing.org>
Fri, 15 Aug 2008 13:24:35 +0000 (08:24 -0500)
committerWolfgang Denk <wd@denx.de>
Wed, 20 Aug 2008 22:55:02 +0000 (00:55 +0200)
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
common/cmd_fdt.c

index 436fec9928a20dc8e7260da43a3aef9e039b263a..c129993a912e5281e4298550056e6cfe16e8cdea 100644 (file)
@@ -67,6 +67,14 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                /*
                 * Set the address [and length] of the fdt.
                 */
+               if (argc == 2) {
+                       if (!fdt_valid()) {
+                               return 1;
+                       }
+                       printf("The address of the fdt is %p\n", working_fdt);
+                       return 0;
+               }
+
                working_fdt = (struct fdt_header *)simple_strtoul(argv[2], NULL, 16);
 
                if (!fdt_valid()) {