X-Git-Url: https://git.kernelconcepts.de/?a=blobdiff_plain;f=common%2Fimage-fdt.c;h=a2342fa3dfdd07c1de766200986cfac97579aa4d;hb=6126c8e88609286c04600da9dce7a7537f568845;hp=9fc7481fd80d190a015814b626091dd8a65bdcce;hpb=019b57cc1d280c3768e2e8a7ff22e07a64c2f670;p=karo-tx-uboot.git diff --git a/common/image-fdt.c b/common/image-fdt.c index 9fc7481fd8..a2342fa3df 100644 --- a/common/image-fdt.c +++ b/common/image-fdt.c @@ -450,7 +450,7 @@ __weak int ft_verify_fdt(void *fdt) return 1; } -__weak int arch_fixup_memory_node(void *blob) +__weak int arch_fixup_fdt(void *blob) { return 0; } @@ -467,7 +467,10 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, puts(" - must RESET the board to recover.\n"); return -1; } - arch_fixup_memory_node(blob); + if (arch_fixup_fdt(blob) < 0) { + puts("ERROR: arch specific fdt fixup failed"); + return -1; + } if (IMAGE_OF_BOARD_SETUP) ft_board_setup(blob, gd->bd); fdt_fixup_ethernet(blob); @@ -476,7 +479,7 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob, (phys_size_t)fdt_totalsize(blob)); - ret = fdt_resize(blob); + ret = fdt_shrink_to_minimum(blob); if (ret < 0) return ret; of_size = ret; @@ -492,7 +495,7 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob, if (!ft_verify_fdt(blob)) return -1; -#ifdef CONFIG_SOC_K2HK +#if defined(CONFIG_SOC_KEYSTONE) if (IMAGE_OF_BOARD_SETUP) ft_board_setup_ex(blob, gd->bd); #endif