[U-Boot] [PATCH] common/image.c: align usage of fdt_high with initrd_high

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.guo@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; }

Dear Shawn Guo,
In message 1325254347-17701-1-git-send-email-shawn.guo@linaro.org you wrote:
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.
Can you please also update the documentation to avoid any such confusion? Thanks.
Best regards,
Wolfgang Denk
participants (2)
-
Shawn Guo
-
Wolfgang Denk