]> git.sur5r.net Git - u-boot/blobdiff - common/fdt_support.c
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx
[u-boot] / common / fdt_support.c
index d483d66f11d2e8b7cb17d516927d72d4b9fd09eb..5a83bca48177d738f6d493283214ac6ca099167e 100644 (file)
@@ -602,9 +602,12 @@ int fdt_resize(void *blob)
                }
        }
 
-       /* Calculate the actual size of the fdt */
+       /*
+        * Calculate the actual size of the fdt
+        * plus the size needed for fdt_add_mem_rsv
+        */
        actualsize = fdt_off_dt_strings(blob) +
-               fdt_size_dt_strings(blob);
+               fdt_size_dt_strings(blob) + sizeof(struct fdt_reserve_entry);
 
        /* Make it so the fdt ends on a page boundary */
        actualsize = ALIGN(actualsize, 0x1000);