public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] common/image.c: align usage of fdt_high with initrd_high
@ 2011-12-30 14:12 Shawn Guo
  2012-01-05 15:11 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Shawn Guo @ 2011-12-30 14:12 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] common/image.c: align usage of fdt_high with initrd_high
  2011-12-30 14:12 [U-Boot] [PATCH] common/image.c: align usage of fdt_high with initrd_high Shawn Guo
@ 2012-01-05 15:11 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2012-01-05 15:11 UTC (permalink / raw)
  To: u-boot

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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"IBM uses what I like to call the 'hole-in-the-ground  technique'  to
destroy  the  competition.....  IBM digs a big HOLE in the ground and
covers it with leaves. It then puts a big POT OF GOLD nearby. Then it
gives the call, 'Hey, look at all this gold, get over here fast.'  As
soon  as  the competitor approaches the pot, he falls into the pit"
                                                     - John C. Dvorak

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-01-05 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-30 14:12 [U-Boot] [PATCH] common/image.c: align usage of fdt_high with initrd_high Shawn Guo
2012-01-05 15:11 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox