diff mbox

common/image.c: align usage of fdt_high with initrd_high

Message ID 1325255360-17891-1-git-send-email-shawn.guo@linaro.org
State New
Headers show

Commit Message

Shawn Guo Dec. 30, 2011, 2:29 p.m. UTC
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>
---
Hi Dirk,

I sent this patch to u-boot mailing list, but it did not go through.
And I got the following message back.

"Your mail to 'U-Boot' with the subject

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

Is being held until the list moderator can review it for approval.

The reason it is being held:

   Post to moderated list"

I'm not interested in following it, so I send you in case you want
to have it mainlined.

Regards,
Shawn

 common/image.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
diff mbox

Patch

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;
 			}