[U-Boot] [PATCH 20/23] scsi: bootstage: Measure time taken to scan the bus

Rob Herring robherring2 at gmail.com
Tue Jan 27 18:38:25 CET 2015


On Mon, Jan 26, 2015 at 7:23 PM, Simon Glass <sjg at chromium.org> wrote:
> On some hardware this time can be significant. Add bootstage support for
> measuring this. The result can be obtained using 'bootstage report' or
> passed on to the Linux via the device tree.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>  common/cmd_scsi.c   | 2 ++
>  include/bootstage.h | 1 +
>  2 files changed, 3 insertions(+)
>
> diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
> index cbc107e..a0a62eb 100644
> --- a/common/cmd_scsi.c
> +++ b/common/cmd_scsi.c
> @@ -217,8 +217,10 @@ void scsi_init(void)
>                        (busdevfunc >> 8) & 0x7);
>         }
>  #endif
> +       bootstage_start(BOOTSTAGE_ID_ACCUM_SCSI, "ahci");
>         scsi_low_level_init(busdevfunc);
>         scsi_scan(1);
> +       bootstage_accum(BOOTSTAGE_ID_ACCUM_SCSI);

This does not cover the case if the platform calls scsi_scan at boot.
The first time is the important one as that will include disk spin-up
time.

Perhaps they shouldn't be and "scsi scan" should always be in boot scripts.

Rob


More information about the U-Boot mailing list