summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-08-15 08:24:35 -0500
committerWolfgang Denk <wd@denx.de>2008-08-21 00:55:02 +0200
commit7dbc38ad915f4ae67f4cd1818b7ac8fed368aaa9 (patch)
tree21a09c3b84449543ed722f4a3be4ee4998dfe502 /common
parentf953d99fd528a496b400a706b511eaf8e3ea66af (diff)
downloadbootable_bootloader_goldelico_gta04-7dbc38ad915f4ae67f4cd1818b7ac8fed368aaa9.zip
bootable_bootloader_goldelico_gta04-7dbc38ad915f4ae67f4cd1818b7ac8fed368aaa9.tar.gz
bootable_bootloader_goldelico_gta04-7dbc38ad915f4ae67f4cd1818b7ac8fed368aaa9.tar.bz2
fdt: fdt addr w/o any args reports back the current working address
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'common')
-rw-r--r--common/cmd_fdt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 436fec9..c129993 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -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()) {