The commit message of a28afca (Add uboot "fdt_high" enviroment variable)
states that fdt_high behaves similarly to the existing initrd_high.
But fdt_high actually has an outstanding difference from initrd_high.
The former specifies the start address, while the later specifies the
end address.

As fdt_high and initrd_high will likely be used together, it'd be nice
to have them behave same.  The patch changes the behavior of fdt_high
to have it aligned with initrd_high.

Signed-off-by: Shawn Guo <shawn....@linaro.org>
---
 common/image.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/common/image.c b/common/image.c
index 77ca6e4..12ceacf 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1294,10 +1294,8 @@ int boot_relocate_fdt(struct lmb *lmb, char 
**of_flat_tree, ulong *of_size)
                if (desired_addr) {
                        of_start =
                            (void *)(ulong) lmb_alloc_base(lmb, of_len, 0x1000,
-                                                          ((ulong)
-                                                           desired_addr)
-                                                          + of_len);
-                       if (desired_addr && of_start != desired_addr) {
+                                                          (ulong)desired_addr);
+                       if (of_start == 0) {
                                puts("Failed using fdt_high value for Device 
Tree");
                                goto error;
                        }
-- 
1.7.4.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to