]> git.sur5r.net Git - u-boot/commitdiff
bootstage: Record the time taken to set up driver model
authorSimon Glass <sjg@chromium.org>
Mon, 22 May 2017 11:05:32 +0000 (05:05 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 5 Jun 2017 18:13:07 +0000 (14:13 -0400)
Driver model is set up ones before relocation and once after. Record the
time taken in each case.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/board_f.c
common/board_r.c
include/bootstage.h

index 4f940493fc5978621398d4ecb85bd6a07b4cd8cf..a8fc28cf4b2413c7f8f600743c9426870ff7022e 100644 (file)
@@ -732,7 +732,9 @@ static int initf_dm(void)
 #if defined(CONFIG_DM) && defined(CONFIG_SYS_MALLOC_F_LEN)
        int ret;
 
+       bootstage_start(BOOTSTATE_ID_ACCUM_DM_F, "dm_f");
        ret = dm_init_and_scan(true);
+       bootstage_accum(BOOTSTATE_ID_ACCUM_DM_F);
        if (ret)
                return ret;
 #endif
index bde98773d0efb579ebb827ebe3f5a58932dcc16c..ef909989328affa48160d9405d11b96dc5154286 100644 (file)
@@ -313,7 +313,9 @@ static int initr_dm(void)
 #ifdef CONFIG_TIMER
        gd->timer = NULL;
 #endif
+       bootstage_start(BOOTSTATE_ID_ACCUM_DM_R, "dm_r");
        ret = dm_init_and_scan(false);
+       bootstage_accum(BOOTSTATE_ID_ACCUM_DM_R);
        if (ret)
                return ret;
 #ifdef CONFIG_TIMER_EARLY
index 8607e887d8b1e0ebcf858625668b89b53f5752fb..9c7b515a743e15051c179cde05cfd1de3ebd6d1b 100644 (file)
@@ -200,6 +200,8 @@ enum bootstage_id {
        BOOTSTAGE_ID_ACCUM_SPI,
        BOOTSTAGE_ID_ACCUM_DECOMP,
        BOOTSTAGE_ID_FPGA_INIT,
+       BOOTSTATE_ID_ACCUM_DM_F,
+       BOOTSTATE_ID_ACCUM_DM_R,
 
        /* a few spare for the user, from here */
        BOOTSTAGE_ID_USER,