]> git.sur5r.net Git - u-boot/blobdiff - arch/microblaze/lib/bootm.c
microblaze: Support flashes on lower addresses
[u-boot] / arch / microblaze / lib / bootm.c
index 2227a81bb0c3baaf109651659eb0446f5c2f4f9f..9f6d6d660f29493ded1da130469d093e21288430 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;
@@ -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",