The 'Starting linux' message appears twice in the code, but both call
through the same place. Unify these and add calls to bootstage to
mark the occasion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Michael Spang <spang@chromium.org>
Acked-by: Graeme Russ <graeme.russ@gmail.com>
 
 int __weak x86_cleanup_before_linux(void)
 {
+#ifdef CONFIG_BOOTSTAGE_STASH
+       bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH,
+                       CONFIG_BOOTSTAGE_STASH_SIZE);
+#endif
+
        return 0;
 }
 
 
                goto error;
        }
 
-#ifdef DEBUG
-       printf("## Transferring control to Linux (at address %08x) ...\n",
-               (u32)base_ptr);
-#endif
-
-       /* we assume that the kernel is in place */
-       printf("\nStarting kernel ...\n\n");
-
        boot_zimage(base_ptr, load_address);
        /* does not return */
 
 
 
 void boot_zimage(void *setup_base, void *load_address)
 {
+       debug("## Transferring control to Linux (at address %08x) ...\n",
+             (u32)setup_base);
+
+       bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
+#ifdef CONFIG_BOOTSTAGE_REPORT
+       bootstage_report();
+#endif
        board_final_cleanup();
 
        printf("\nStarting kernel ...\n\n");
                return -1;
        }
 
-       printf("## Transferring control to Linux "
-              "(at address %08x) ...\n",
-              (u32)base_ptr);
-
        /* we assume that the kernel is in place */
        boot_zimage(base_ptr, load_address);
        /* does not return */