[Concept,02/11] bootstage: Move the bootstage record to the header file
Commit Message
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(-)
@@ -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;
@@ -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