]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - arch/microblaze/lib/bootm.c
Merge branch 'master' of git://git.denx.de/u-boot-microblaze
[karo-tx-uboot.git] / arch / microblaze / lib / bootm.c
index 2227a81bb0c3baaf109651659eb0446f5c2f4f9f..95cee509d257857267b0b2ca8cd211b05f3061ff 100644 (file)
@@ -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;
@@ -62,11 +59,10 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
        if (ret)
                return 1;
 
-       show_boot_progress (15);
-
-       if (!(ulong) of_flat_tree)
-               of_flat_tree = (char *)simple_strtoul (argv[3], NULL, 16);
+       bootstage_mark(BOOTSTAGE_ID_RUN_OS);
 
+       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",