summaryrefslogtreecommitdiff
path: root/include/spl.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-09-29 19:49:38 -0600
committerTom Rini <trini@konsulko.com>2024-10-11 11:44:47 -0600
commit44a4c8e93fe393cd84c70ba1be0c47e25e6ff66c (patch)
treeba0a53436d7e9688355d2bbe5cb2ca35b8b2716a /include/spl.h
parentf86580fc70a402add9aad1e003de78b5d7414736 (diff)
xpl: Add a function to indicate when in xPL
Add the opposite function to not_xpl() for completeness. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/spl.h')
-rw-r--r--include/spl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h
index 948486164d9..fe2df78b0a6 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
*