X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fmicroblaze%2Flib%2Fbootm.c;h=9f6d6d660f29493ded1da130469d093e21288430;hb=a93c1a171ce012bbbba09bbaad22c8e516a589f9;hp=2227a81bb0c3baaf109651659eb0446f5c2f4f9f;hpb=9b4d90569028604bc491ea419187c31e4467bdca;p=u-boot diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index 2227a81bb0..9f6d6d660f 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -32,7 +32,7 @@ DECLARE_GLOBAL_DATA_PTR; -int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) +int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *images) { /* First parameter is mapped to $r5 for kernel boot args */ void (*theKernel) (char *, ulong, ulong); @@ -46,12 +46,9 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) 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 *argv[], bootm_headers_t *images) 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",