Browse Source

bootstage: Record the time taken to set up driver model

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>
Simon Glass 8 years ago
parent
commit
63c5bf48d5
3 changed files with 6 additions and 0 deletions
  1. 2 0
      common/board_f.c
  2. 2 0
      common/board_r.c
  3. 2 0
      include/bootstage.h

+ 2 - 0
common/board_f.c

@@ -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

+ 2 - 0
common/board_r.c

@@ -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

+ 2 - 0
include/bootstage.h

@@ -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,