public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] arm: fix bootm with device tree
@ 2012-04-19 21:09 Stephen Warren
  2012-04-19 21:09 ` [U-Boot] [PATCH 2/2] arm: restore fdt_fixup_ethernet call to do_bootm_linux Stephen Warren
  2012-04-19 21:30 ` [U-Boot] [PATCH 1/2] arm: fix bootm with device tree Tom Rini
  0 siblings, 2 replies; 8+ messages in thread
From: Stephen Warren @ 2012-04-19 21:09 UTC (permalink / raw)
  To: u-boot

From: Stephen Warren <swarren@nvidia.com>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized
do_bootm_linux() for ARM. During the re-organization, the code to pass
the device tree to the kernel was removed. Add it back. This restores
the ability to boot a kernel using device tree.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/lib/bootm.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 1c1bee6..95e596a 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -317,6 +317,7 @@ static void boot_jump_linux(bootm_headers_t *images)
 	unsigned long machid = gd->bd->bi_arch_number;
 	char *s;
 	void (*kernel_entry)(int zero, int arch, uint params);
+	unsigned long r2;
 
 	kernel_entry = (void (*)(int, int, uint))images->ep;
 
@@ -330,7 +331,15 @@ static void boot_jump_linux(bootm_headers_t *images)
 		"...\n", (ulong) kernel_entry);
 	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
 	announce_and_cleanup();
-	kernel_entry(0, machid, gd->bd->bi_boot_params);
+
+#ifdef CONFIG_OF_LIBFDT
+	if (images->ft_len)
+		r2 = images->ft_addr;
+	else
+#endif
+		r2 = gd->bd->bi_boot_params;
+
+	kernel_entry(0, machid, r2);
 }
 
 /* Main Entry point for arm bootm implementation
-- 
1.7.0.4

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

end of thread, other threads:[~2012-04-20 22:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-19 21:09 [U-Boot] [PATCH 1/2] arm: fix bootm with device tree Stephen Warren
2012-04-19 21:09 ` [U-Boot] [PATCH 2/2] arm: restore fdt_fixup_ethernet call to do_bootm_linux Stephen Warren
2012-04-19 21:30   ` Tom Rini
2012-04-19 21:30 ` [U-Boot] [PATCH 1/2] arm: fix bootm with device tree Tom Rini
2012-04-20 20:42   ` Stephen Warren
2012-04-20 20:52     ` Tom Rini
2012-04-20 21:29       ` Tom Warren
2012-04-20 22:13         ` Tom Rini

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