-#ifndef CONFIG_SYS_NO_FLASH
- /* move the blob if it is in flash (set relocate) */
- if (addr2info ((ulong)fdt_blob) != NULL)
- relocate = 1;
-#endif
-
- /*
- * The blob needs to be inside the boot mapping.
- */
- if (fdt_blob < (char *)bootmap_base)
- relocate = 1;
-
- if ((fdt_blob + *of_size + CONFIG_SYS_FDT_PAD) >=
- ((char *)CONFIG_SYS_BOOTMAPSZ + bootmap_base))
- relocate = 1;
-
- /* move flattend device tree if needed */
- if (relocate) {
- int err;
- ulong of_start = 0;
-
- /* position on a 4K boundary before the alloc_current */
- /* Pad the FDT by a specified amount */
- of_len = *of_size + CONFIG_SYS_FDT_PAD;
- of_start = (unsigned long)lmb_alloc_base(lmb, of_len, 0x1000,
- (CONFIG_SYS_BOOTMAPSZ + bootmap_base));
-
- if (of_start == 0) {
- puts("device tree - allocation error\n");
- goto error;
- }
+ /* position on a 4K boundary before the alloc_current */
+ /* Pad the FDT by a specified amount */
+ of_len = *of_size + CONFIG_SYS_FDT_PAD;
+ of_start = (void *)(unsigned long)lmb_alloc_base(lmb, of_len, 0x1000,
+ (CONFIG_SYS_BOOTMAPSZ + bootmap_base));