summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-11-24 16:54:22 +0800
committerfang hui <hui.fang@freescale.com>2016-03-16 13:48:11 +0800
commit1f094bcc5fcae30b8b8b4c6051d99c27348782e3 (patch)
treea2d35d0acbbe87469ba94d315f63e4b462c7426b /common
parentad8767daff1e3ac1ccf973502601975023156dd7 (diff)
downloadu-boot-imx-1f094bcc5fcae30b8b8b4c6051d99c27348782e3.zip
u-boot-imx-1f094bcc5fcae30b8b8b4c6051d99c27348782e3.tar.gz
u-boot-imx-1f094bcc5fcae30b8b8b4c6051d99c27348782e3.tar.bz2
common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY
If condition of "(load == image_start || load == image_data)" is true, should use "fdt_addr = load;", but not "fdt_blob = (char *)image_data;", or fdt_blob will be overridden by "fdt_blob = map_sysmem(fdt_addr, 0);" at the end of the switch case. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Cc: Simon Glass <sjg@chromium.org> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Max Krummenacher <max.krummenacher@toradex.com> Cc: Marek Vasut <marex@denx.de> Cc: Suriyan Ramasami <suriyan.r@gmail.com> Cc: Paul Kocialkowski <contact@paulk.fr> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> (cherry picked from commit 2ea47be02f356ff275fa5c50392ea510ddb4a96c)
Diffstat (limited to 'common')
-rw-r--r--common/image-fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index a52f7a8..c306794 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -325,7 +325,7 @@ int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
if (load == image_start ||
load == image_data) {
- fdt_blob = (char *)image_data;
+ fdt_addr = load;
break;
}