diff mbox

[U-Boot,v2,2/2] cmd_fdt: Print the control fdt in terms of virtual memory

Message ID 1423011866-3560-2-git-send-email-joe.hershberger@ni.com
State Superseded
Delegated to: Simon Glass
Headers show

Commit Message

Joe Hershberger Feb. 4, 2015, 1:04 a.m. UTC
If you want to inspect the control device tree using the fdt command,
the "fdt address -c" command previously unhelpfully printed the phys
memory address of the device tree. That address could not then be used
to set the fdt address for inspection. Changed the resulting print to
one that can be copied directly to the 'fdt address <addr>' command.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

---

Changes in v2:
-Reworded commit message

 common/cmd_fdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Feb. 5, 2015, 2:50 a.m. UTC | #1
On 3 February 2015 at 18:04, Joe Hershberger <joe.hershberger@ni.com> wrote:
> If you want to inspect the control device tree using the fdt command,
> the "fdt address -c" command previously unhelpfully printed the phys
> memory address of the device tree. That address could not then be used
> to set the fdt address for inspection. Changed the resulting print to
> one that can be copied directly to the 'fdt address <addr>' command.
>
> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
>
> ---
>
> Changes in v2:
> -Reworded commit message
>
>  common/cmd_fdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 4e9bc6b..b213105 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -111,7 +111,7 @@  static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 			if (!blob || !fdt_valid(&blob))
 				return 1;
 			printf("The address of the fdt is %#08lx\n",
-			       control ? (ulong)blob :
+			       control ? (ulong)map_to_sysmem(blob) :
 					getenv_hex("fdtaddr", 0));
 			return 0;
 		}