From: Simon Glass Date: Mon, 22 May 2017 05:05:32 -0600 Subject: [U-Boot] [PATCH 11/15] bootstage: Record the time taken to set up driver model In-Reply-To: <20170522110536.6231-1-sjg@chromium.org> References: <20170522110536.6231-1-sjg@chromium.org> Message-ID: <20170522110536.6231-12-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Driver model is set up ones before relocation and once after. Record the time taken in each case. Signed-off-by: Simon Glass --- common/board_f.c | 2 ++ common/board_r.c | 2 ++ include/bootstage.h | 2 ++ 3 files changed, 6 insertions(+) diff --git a/common/board_f.c b/common/board_f.c index 80388c50bc..f18301996a 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -729,7 +729,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 diff --git a/common/board_r.c b/common/board_r.c index 990d87021e..2d717e8423 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -314,7 +314,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 diff --git a/include/bootstage.h b/include/bootstage.h index 8607e887d8..9c7b515a74 100644 --- a/include/bootstage.h +++ b/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, -- 2.13.0.303.g4ebf302169-goog