summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/bootstage.c10
-rw-r--r--include/bootstage.h21
2 files changed, 20 insertions, 11 deletions
diff --git a/common/bootstage.c b/common/bootstage.c
index 0fd33be97ea..326c40f1561 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -147,15 +147,9 @@ ulong bootstage_add_record(enum bootstage_id id, const char *name,
return mark;
}
-
-ulong bootstage_mark(enum bootstage_id id)
-{
- return bootstage_add_record(id, NULL, 0, timer_get_boot_us());
-}
-
-ulong bootstage_error(enum bootstage_id id)
+ulong bootstage_error_name(enum bootstage_id id, const char *name)
{
- return bootstage_add_record(id, NULL, BOOTSTAGEF_ERROR,
+ return bootstage_add_record(id, name, BOOTSTAGEF_ERROR,
timer_get_boot_us());
}
diff --git a/include/bootstage.h b/include/bootstage.h
index bca9438418f..7088d0b875e 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -268,13 +268,28 @@ ulong bootstage_add_record(enum bootstage_id id, const char *name,
/**
* Mark a time stamp for the current boot stage.
*/
-ulong bootstage_mark(enum bootstage_id id);
-
-ulong bootstage_error(enum bootstage_id id);
+#define bootstage_mark(id) bootstage_mark_name(id, __func__)
+#define bootstage_error(id) bootstage_error_name(id, __func__)
+/**
+ * bootstage_mark_name - record bootstage with passing id and name
+ * @id: Bootstage id to record this timestamp against
+ * @name: Textual name to display for this id in the report
+ *
+ * Return: recorded time stamp
+ */
ulong bootstage_mark_name(enum bootstage_id id, const char *name);
/**
+ * bootstage_error_name - record bootstage error with passing id and name
+ * @id: Bootstage id to record this timestamp against
+ * @name: Textual name to display for this id in the report
+ *
+ * Return: recorded time stamp
+ */
+ulong bootstage_error_name(enum bootstage_id id, const char *name);
+
+/**
* Mark a time stamp in the given function and line number
*
* See BOOTSTAGE_MARKER() for a convenient macro.