]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootstage: arm: Add bootstage calls in board and bootm
authorSimon Glass <sjg@chromium.org>
Mon, 13 Feb 2012 13:51:21 +0000 (13:51 +0000)
committerWolfgang Denk <wd@denx.de>
Sun, 18 Mar 2012 20:43:17 +0000 (21:43 +0100)
Add calls to bootstage before and after relocation, and just
before jumping to the OS.

The idea here is you can call bootstage_report() to get a report.
Additionally, if you define CONFIG_BOOTSTAGE_REPORT then a report is
printed automatically by U-Boot just before jumping to the kernel.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/arm/lib/board.c
arch/arm/lib/bootm.c

index 500e2164ce4b85d2606b26a596c195ab7216fed4..b9b35de61adafb5c670a9448475a6a5c3a18153a 100644 (file)
@@ -266,6 +266,8 @@ void board_init_f(ulong bootflag)
        ulong reg;
 #endif
 
+       bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_F, "board_init_f");
+
        /* Pointer is writable since we allocated a register for it */
        gd = (gd_t *) ((CONFIG_SYS_INIT_SP_ADDR) & ~0x07);
        /* compiler optimization barrier needed for GCC >= 3.4 */
@@ -455,6 +457,7 @@ void board_init_r(gd_t *id, ulong dest_addr)
        gd = id;
 
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
+       bootstage_mark_name(BOOTSTAGE_ID_START_UBOOT_R, "board_init_r");
 
        monitor_flash_len = _end_ofs;
 
index f114cd6a02d2a973a216c36cad6f495647c4008c..2961ab2ac67b885ac1d9b8e258825bfcb12b684c 100644 (file)
@@ -83,6 +83,10 @@ void arch_lmb_reserve(struct lmb *lmb)
 static void announce_and_cleanup(void)
 {
        printf("\nStarting kernel ...\n\n");
+       bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
+#ifdef CONFIG_BOOTSTAGE_REPORT
+       bootstage_report();
+#endif
 
 #ifdef CONFIG_USB_DEVICE
        {