]> git.sur5r.net Git - u-boot/blobdiff - common/image-fdt.c
mx6qsabreauto: Add parallel NOR flash support
[u-boot] / common / image-fdt.c
index 173d36206ae61b4337cd495ef656a68321e776b5..a39ae1b4cce9f172dea99f9459f2320f6b98e8a7 100644 (file)
@@ -355,7 +355,6 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
                                ulong load, len;
 
                                fdt_noffset = fit_image_load(images,
-                                       FIT_FDT_PROP,
                                        fdt_addr, &fit_uname_fdt,
                                        &fit_uname_config,
                                        arch, IH_TYPE_FLATDT,
@@ -414,11 +413,11 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
                        }
                } else {
                        debug("## No Flattened Device Tree\n");
-                       return 0;
+                       goto error;
                }
        } else {
                debug("## No Flattened Device Tree\n");
-               return 0;
+               goto error;
        }
 
        *of_flat_tree = fdt_blob;
@@ -451,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;
 }
@@ -463,12 +462,15 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
        ulong *initrd_end = &images->initrd_end;
        int ret;
 
-       if (fdt_chosen(blob, 1) < 0) {
+       if (fdt_chosen(blob) < 0) {
                puts("ERROR: /chosen node create failed");
                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);
@@ -477,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;
@@ -493,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