From: Marian Balakowicz <m8@semihalf.com>
Date: Fri, 29 Feb 2008 21:22:46 +0000 (+0100)
Subject: [new uImage] Fix FDT blob totalsize calculation in boot_relocate_fdt()
X-Git-Tag: v2025.01-rc5-pxa1908~22345^2^2~32
X-Git-Url: http://git.dujemihanovic.xyz/img/static/html/index.html?a=commitdiff_plain;h=05e07b1ea22844e946cfcf7d5e8a0199d18d2a95;p=u-boot.git

[new uImage] Fix FDT blob totalsize calculation in boot_relocate_fdt()

Do not use global fdt blob pointer, calculate blob size from routine
argument blob pointer.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
---

diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index 8974ccd81c..797715773d 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -557,7 +557,7 @@ static int boot_relocate_fdt (struct lmb *lmb, ulong bootmap_base,
 	if (fdt_blob >= (char *)CFG_BOOTMAPSZ)
 		relocate = 1;
 
-	of_len = be32_to_cpu (fdt_totalsize (fdt));
+	of_len = be32_to_cpu (fdt_totalsize (fdt_blob));
 
 	/* move flattend device tree if needed */
 	if (relocate) {