]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/lib/bootm.c
mx35: Fix eSDHC clocks
[u-boot] / arch / arm / lib / bootm.c
index 1c1bee6aeb135251eac353783a6fb76196c2961a..37476cc90d5cc6a9791bb146ec023a018bd901f3 100644 (file)
@@ -69,8 +69,8 @@ void arch_lmb_reserve(struct lmb *lmb)
        sp = get_sp();
        debug("## Current stack ends at 0x%08lx ", sp);
 
-       /* adjust sp by 1K to be safe */
-       sp -= 1024;
+       /* adjust sp by 4K to be safe */
+       sp -= 4096;
        lmb_reserve(lmb, sp,
                    gd->bd->bi_dram[0].start + gd->bd->bi_dram[0].size - sp);
 }
@@ -96,6 +96,9 @@ static void announce_and_cleanup(void)
 {
        printf("\nStarting kernel ...\n\n");
        bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
+#ifdef CONFIG_BOOTSTAGE_FDT
+       bootstage_fdt_add_report();
+#endif
 #ifdef CONFIG_BOOTSTAGE_REPORT
        bootstage_report();
 #endif
@@ -256,7 +259,11 @@ static int create_fdt(bootm_headers_t *images)
 
        fdt_chosen(*of_flat_tree, 1);
        fixup_memory_node(*of_flat_tree);
+       fdt_fixup_ethernet(*of_flat_tree);
        fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1);
+#ifdef CONFIG_OF_BOARD_SETUP
+       ft_board_setup(*of_flat_tree, gd->bd);
+#endif
 
        return 0;
 }
@@ -317,6 +324,7 @@ static void boot_jump_linux(bootm_headers_t *images)
        unsigned long machid = gd->bd->bi_arch_number;
        char *s;
        void (*kernel_entry)(int zero, int arch, uint params);
+       unsigned long r2;
 
        kernel_entry = (void (*)(int, int, uint))images->ep;
 
@@ -330,7 +338,15 @@ static void boot_jump_linux(bootm_headers_t *images)
                "...\n", (ulong) kernel_entry);
        bootstage_mark(BOOTSTAGE_ID_RUN_OS);
        announce_and_cleanup();
-       kernel_entry(0, machid, gd->bd->bi_boot_params);
+
+#ifdef CONFIG_OF_LIBFDT
+       if (images->ft_len)
+               r2 = (unsigned long)images->ft_addr;
+       else
+#endif
+               r2 = gd->bd->bi_boot_params;
+
+       kernel_entry(0, machid, r2);
 }
 
 /* Main Entry point for arm bootm implementation