]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xpl: Add a function to indicate when in xPL
authorSimon Glass <sjg@chromium.org>
Mon, 30 Sep 2024 01:49:38 +0000 (19:49 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 11 Oct 2024 17:44:47 +0000 (11:44 -0600)
Add the opposite function to not_xpl() for completeness.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/spl.h

index 948486164d9f735ff20f732c895b2527fc3b8610..fe2df78b0a675fe54dda8d14cfe347fca4e7f1aa 100644 (file)
@@ -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
  *