ls1043ardb: PPA: add PPA validation in case of secure boot
[oweals/u-boot.git] / include / common.h
index 1bb8a7956bf96a7d6547a553223f5622c6129478..e9f0dea3084212eaa836306e97496565d1b617ef 100644 (file)
@@ -101,6 +101,12 @@ typedef volatile unsigned char     vu_char;
 #define _DEBUG 0
 #endif
 
+#ifdef CONFIG_SPL_BUILD
+#define _SPL_BUILD     1
+#else
+#define _SPL_BUILD     0
+#endif
+
 /* Define this at the top of a file to add a prefix to debug messages */
 #ifndef pr_fmt
 #define pr_fmt(fmt) fmt
@@ -121,6 +127,10 @@ typedef volatile unsigned char     vu_char;
 #define debug(fmt, args...)                    \
        debug_cond(_DEBUG, fmt, ##args)
 
+/* Show a message if not in SPL */
+#define warn_non_spl(fmt, args...)                     \
+       debug_cond(!_SPL_BUILD, fmt, ##args)
+
 /*
  * An assertion is run-time check done in debug mode only. If DEBUG is not
  * defined then it is skipped. If DEBUG is defined and the assertion fails,