aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorHua Yanghao2014-12-22 04:45:59 +0800
committerTom Rini2015-01-05 15:13:28 -0500
commit90bac29a76bc8d649b41a55f2786c0abef9bb2c1 (patch)
tree4a2b8e5783d229b3b30127e621492ea01ea6e6cb /common
parent97a8196451d786e640fb96895a0e7dbefe6c9ff8 (diff)
cmd_fdt: fix working_fdt is set to wrong value
Instead of setting working_fdt to map_sysmem(addr) (e.g. blob), it should be set to addr directly as inside set_working_fdt_addr it uses map_sysmem(addr) again. To test: ./u-boot -d dts/dt.bin , then issue: fdt addr 0x100, fdt print will then cause an segmentation fault. After this fix fdt print is functional.
Diffstat (limited to 'common')
-rw-r--r--common/cmd_fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 25b4675744f..dc59fab8280 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -123,7 +123,7 @@ static int do_fdt(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
if (control)
gd->fdt_blob = blob;
else
- set_working_fdt_addr(blob);
+ set_working_fdt_addr((void *)blob);
if (argc >= 2) {
int len;