ulib: Implement GD_FLG_ULIB for library-usage mode
Add a new global_data flag GD_FLG_ULIB to indicate that U-Boot is being used as a shared library. This allows suppressing console output that is inappropriate for library usage while preserving normal boot messages for standalone operation. For now the flag must be enabled by the caller and it has no effect. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -758,8 +758,20 @@ enum gd_flags {
|
||||
* drivers shall not be called.
|
||||
*/
|
||||
GD_FLG_HAVE_CONSOLE = 0x8000000,
|
||||
/**
|
||||
* @GD_FLG_ULIB: U-Boot is running as a library
|
||||
*
|
||||
* For now, this just avoids console output on startup
|
||||
*/
|
||||
GD_FLG_ULIB = 0x10000000,
|
||||
};
|
||||
|
||||
#if CONFIG_IS_ENABLED(ULIB)
|
||||
#define gd_ulib() (gd->flags & GD_FLG_ULIB)
|
||||
#else
|
||||
#define gd_ulib() 0
|
||||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* __ASM_GENERIC_GBL_DATA_H */
|
||||
|
||||
Reference in New Issue
Block a user