mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-22 07:01:39 +00:00
Add warn_non_spl() to show a message in U-Boot proper
SPL tends to be more space-constrained that U-Boot proper. Some error messages are best suppressed in SPL. Add a macros to make this easy. warn_non_spl() does nothing when built in SPL code. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
5e7f743324
commit
982868264e
1 changed files with 10 additions and 0 deletions
|
@ -101,6 +101,12 @@ typedef volatile unsigned char vu_char;
|
||||||
#define _DEBUG 0
|
#define _DEBUG 0
|
||||||
#endif
|
#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 */
|
/* Define this at the top of a file to add a prefix to debug messages */
|
||||||
#ifndef pr_fmt
|
#ifndef pr_fmt
|
||||||
#define pr_fmt(fmt) fmt
|
#define pr_fmt(fmt) fmt
|
||||||
|
@ -121,6 +127,10 @@ typedef volatile unsigned char vu_char;
|
||||||
#define debug(fmt, args...) \
|
#define debug(fmt, args...) \
|
||||||
debug_cond(_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
|
* 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,
|
* defined then it is skipped. If DEBUG is defined and the assertion fails,
|
||||||
|
|
Loading…
Add table
Reference in a new issue