]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
scsi: bootstage: Measure time taken to scan the bus
authorSimon Glass <sjg@chromium.org>
Wed, 28 Jan 2015 05:13:44 +0000 (22:13 -0700)
committerSimon Glass <sjg@chromium.org>
Fri, 6 Feb 2015 19:07:38 +0000 (12:07 -0700)
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@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
common/cmd_scsi.c
include/bootstage.h

index cbc107ea5014fd8f36b5f6b42885ec44ba6dfb36..a0a62ebdca8e8d18e36ecfa7fac6aea6328d2df5 100644 (file)
@@ -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);
 }
 #endif
 
index df13ab2f63eddbb075d5d2cc2bdffacccd88e68b..6b7588d38f6ac4442c8368ee1b33e8087934c6da 100644 (file)
@@ -194,6 +194,7 @@ enum bootstage_id {
        BOOTSTAGE_ID_MAIN_CPU_READY,
 
        BOOTSTAGE_ID_ACCUM_LCD,
+       BOOTSTAGE_ID_ACCUM_SCSI,
 
        /* a few spare for the user, from here */
        BOOTSTAGE_ID_USER,