summaryrefslogtreecommitdiff
path: root/include/bootstage.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-02-13 13:51:18 +0000
committerWolfgang Denk <wd@denx.de>2012-03-18 21:41:39 +0100
commit770605e4f9874230728f5a592820c619b1565ebc (patch)
tree3b2f89a4e63727c1ad650e98107acb58c0fcfe2f /include/bootstage.h
parent5ff55390ed80da2570fbeab51bdd2d2a43d4901a (diff)
bootstage: Replace show_boot_progress/error() with bootstage_...()
These calls should not be made directly any more, since bootstage will call the show_boot_...() functions as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/bootstage.h')
-rw-r--r--include/bootstage.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/include/bootstage.h b/include/bootstage.h
index 8f7fcd7d77..b56d95351c 100644
--- a/include/bootstage.h
+++ b/include/bootstage.h
@@ -178,9 +178,35 @@ enum bootstage_id {
* has occurred.
*/
void show_boot_progress(int val);
-static inline void show_boot_error(int val)
+
+#ifdef CONFIG_BOOTSTAGE
+/* This is the full bootstage implementation */
+
+/*
+ * Mark a time stamp for the current boot stage.
+ */
+ulong bootstage_mark(enum bootstage_id id);
+
+ulong bootstage_error(enum bootstage_id id);
+
+#else
+/*
+ * This is a dummy implementation which just calls show_boot_progress(),
+ * and won't even do that unless CONFIG_SHOW_BOOT_PROGRESS is defined
+ */
+
+static inline ulong bootstage_mark(enum bootstage_id id)
+{
+ show_boot_progress(id);
+ return 0;
+}
+
+static inline ulong bootstage_error(enum bootstage_id id)
{
- show_boot_progress(-val);
+ show_boot_progress(-id);
+ return 0;
}
+#endif /* CONFIG_BOOTSTAGE */
+
#endif