summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/microblaze/lib/bootm.c14
-rw-r--r--arch/nios2/lib/bootm.c8
2 files changed, 8 insertions, 14 deletions
diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c
index 8e2c6d8..9f6d6d6 100644
--- a/arch/microblaze/lib/bootm.c
+++ b/arch/microblaze/lib/bootm.c
@@ -46,12 +46,9 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
char *of_flat_tree = NULL;
#if defined(CONFIG_OF_LIBFDT)
- ulong of_size = 0;
-
- /* find flattened device tree */
- ret = boot_get_fdt (flag, argc, argv, images, &of_flat_tree, &of_size);
- if (ret)
- return 1;
+ /* did generic code already find a device tree? */
+ if (images->ft_len)
+ of_flat_tree = images->ft_addr;
#endif
theKernel = (void (*)(char *, ulong, ulong))images->ep;
@@ -64,9 +61,8 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
show_boot_progress (15);
- if (!(ulong) of_flat_tree)
- of_flat_tree = (char *)simple_strtoul (argv[3], NULL, 16);
-
+ if (!of_flat_tree && argc > 3)
+ of_flat_tree = (char *)simple_strtoul(argv[3], NULL, 16);
#ifdef DEBUG
printf ("## Transferring control to Linux (at address 0x%08lx) " \
"ramdisk 0x%08lx, FDT 0x%08lx...\n",
diff --git a/arch/nios2/lib/bootm.c b/arch/nios2/lib/bootm.c
index 40a4d15..f32be52 100644
--- a/arch/nios2/lib/bootm.c
+++ b/arch/nios2/lib/bootm.c
@@ -36,11 +36,9 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
ulong initrd_end = images->rd_end;
char *of_flat_tree = NULL;
#if defined(CONFIG_OF_LIBFDT)
- ulong of_size = 0;
-
- /* find flattened device tree */
- if (boot_get_fdt(flag, argc, argv, images, &of_flat_tree, &of_size))
- return 1;
+ /* did generic code already find a device tree? */
+ if (images->ft_len)
+ of_flat_tree = images->ft_addr;
#endif
if (!of_flat_tree && argc > 3)
of_flat_tree = (char *)simple_strtoul(argv[3], NULL, 16);