From: Simon Glass Date: Mon, 30 Sep 2024 01:49:38 +0000 (-0600) Subject: xpl: Add a function to indicate when in xPL X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-favicon.png?a=commitdiff_plain;h=44a4c8e93fe393cd84c70ba1be0c47e25e6ff66c;p=u-boot.git xpl: Add a function to indicate when in xPL Add the opposite function to not_xpl() for completeness. Signed-off-by: Simon Glass --- diff --git a/include/spl.h b/include/spl.h index 948486164d..fe2df78b0a 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 *