[PATCH v2 25/30] xpl: Add a function to indicate when in xPL
Simon Glass
sjg at chromium.org
Sat Sep 28 22:00:25 CEST 2024
Add the opposite function to not_xpl() for completeness.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
include/spl.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/spl.h b/include/spl.h
index c9ab0f3e977..f90c3f56329 100644
--- a/include/spl.h
+++ b/include/spl.h
@@ -144,6 +144,16 @@ static inline bool not_xpl(void)
return true;
}
+/* returns true if in xPL, false if in U-Boot proper */
+static inline bool is_xpl(void)
+{
+#ifdef CONFIG_XPL_BUILD
+ return true;
+#endif
+
+ return false;
+}
+
/**
* spl_prev_phase() - Figure out the previous U-Boot phase
*
--
2.34.1
More information about the U-Boot
mailing list