]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
cmd_fdt: fix working_fdt is set to wrong value
authorHua Yanghao <huayanghao@gmail.com>
Sun, 21 Dec 2014 20:45:59 +0000 (04:45 +0800)
committerTom Rini <trini@ti.com>
Mon, 5 Jan 2015 20:13:28 +0000 (15:13 -0500)
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.

common/cmd_fdt.c

index 25b4675744f57f8e58f7390159a88f5ea9b772d1..dc59fab8280dc57f0ae546ad552215dea0d99774 100644 (file)
@@ -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;