From: Simon Glass <sjg@chromium.org> Move struct bootstage_record to the header file so it can be used from tests. Add some more comments for the struct, while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> --- common/bootstage.c | 8 -------- include/bootstage.h | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/common/bootstage.c b/common/bootstage.c index 4532100acea..1fee2edeef3 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -26,14 +26,6 @@ enum { RECORD_COUNT = CONFIG_VAL(BOOTSTAGE_RECORD_COUNT), }; -struct bootstage_record { - ulong time_us; - uint32_t start_us; - const char *name; - int flags; /* see enum bootstage_flags */ - enum bootstage_id id; -}; - struct bootstage_data { uint rec_count; uint next_id; diff --git a/include/bootstage.h b/include/bootstage.h index ad98bffedc3..98bd9024da8 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -220,6 +220,24 @@ enum bootstage_id { BOOTSTAGE_ID_ALLOC, }; +/** + * struct bootstage_record - information about a bootstage timing + * + * @time_us: time in microseconds, either the timestamp or the total accumulated + * time for this ID + * @start_us: timestamp of the current starting point for this ID + * @name: name of the timestamp + * @flags: Flags (enum bootstage_flags) + * @id: Bootstage ID + */ +struct bootstage_record { + ulong time_us; + u32 start_us; + const char *name; + int flags; + enum bootstage_id id; +}; + /* * Return the time since boot in microseconds, This is needed for bootstage * and should be defined in CPU- or board-specific code. If undefined then -- 2.43.0