X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=common%2Fimage-fdt.c;h=e7540be8d631c4a1cbe08e2fb7ed70306dfa61a9;hb=6fa0d3457238af30a41c2ae2939f0d1e85895e33;hp=8c3f3e63740c08db668bcd6a6d9f96c68bdf2696;hpb=4d339a9e8a758889de5da16b562aff5601bb3d8d;p=u-boot diff --git a/common/image-fdt.c b/common/image-fdt.c index 8c3f3e6374..e7540be8d6 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -285,7 +285,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch, fdt_noffset = fit_get_node_from_config(images, FIT_FDT_PROP, fdt_addr); - if (fdt_noffset == -ENOLINK) + if (fdt_noffset == -ENOENT) return 0; else if (fdt_noffset < 0) return 1; @@ -458,11 +458,6 @@ __weak int ft_verify_fdt(void *fdt) return 1; } -__weak int arch_fixup_fdt(void *blob) -{ - return 0; -} - int image_setup_libfdt(bootm_headers_t *images, void *blob, int of_size, struct lmb *lmb) { @@ -502,10 +497,11 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, fdt_fixup_ethernet(blob); /* Delete the old LMB reservation */ - lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob, - (phys_size_t)fdt_totalsize(blob)); + if (lmb) + lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob, + (phys_size_t)fdt_totalsize(blob)); - ret = fdt_shrink_to_minimum(blob); + ret = fdt_shrink_to_minimum(blob, 0); if (ret < 0) goto err; of_size = ret; @@ -515,7 +511,8 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, fdt_set_totalsize(blob, of_size); } /* Create a new LMB reservation */ - lmb_reserve(lmb, (ulong)blob, of_size); + if (lmb) + lmb_reserve(lmb, (ulong)blob, of_size); fdt_initrd(blob, *initrd_start, *initrd_end); if (!ft_verify_fdt(blob))