summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-02-27 21:51:44 -0600
committerMarian Balakowicz <m8@semihalf.com>2008-02-29 12:30:03 +0100
commit27953493ef025fb698d68c5dee39b36f01f4d530 (patch)
tree87ba1e034c344c6abbc78dc2b147665c8f730c2e
parenta6612bdfe7ef37b9787b66800cf02aaded05fbeb (diff)
[new uImage] ppc: Determine if we are booting an OF style
If we are bootin OF style than we can skip setting up some things that are used for the old boot method. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
-rw-r--r--lib_ppc/bootm.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index fa28b4314..3e89da1c4 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -71,10 +71,10 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
bd_t *kbd;
ulong ep = 0;
void (*kernel)(bd_t *, ulong, ulong, ulong, ulong);
+ ulong of_size = 0;
#if defined(CONFIG_OF_LIBFDT)
char *of_flat_tree = NULL;
- ulong of_size = 0;
#endif
/*
@@ -92,12 +92,19 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
alloc_current = sp_limit = get_boot_sp_limit(sp);
debug ("=> set upper limit to 0x%08lx\n", sp_limit);
- /* allocate space and init command line */
- alloc_current = get_boot_cmdline (alloc_current, &cmd_start, &cmd_end);
+#if defined(CONFIG_OF_LIBFDT)
+ /* find flattened device tree */
+ get_fdt (cmdtp, flag, argc, argv, images, &of_flat_tree, &of_size);
+#endif
- /* allocate space for kernel copy of board info */
- alloc_current = get_boot_kbd (alloc_current, &kbd);
- set_clocks_in_mhz(kbd);
+ if (!of_size) {
+ /* allocate space and init command line */
+ alloc_current = get_boot_cmdline (alloc_current, &cmd_start, &cmd_end);
+
+ /* allocate space for kernel copy of board info */
+ alloc_current = get_boot_kbd (alloc_current, &kbd);
+ set_clocks_in_mhz(kbd);
+ }
/* find kernel entry point */
if (images->legacy_hdr_valid) {
@@ -123,9 +130,6 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
sp_limit, get_sp (), &initrd_start, &initrd_end);
#if defined(CONFIG_OF_LIBFDT)
- /* find flattened device tree */
- get_fdt (cmdtp, flag, argc, argv, images, &of_flat_tree, &of_size);
-
alloc_current = fdt_relocate (alloc_current,
cmdtp, flag, argc, argv, &of_flat_tree, &of_size);