console/console.h: Move get_console_loglevel() declaration
If for a stage __CONSOLE_ENABLE__ is 0, then there would be no prototype for a get_console_loglevel() definition. Change-Id: I805078921a5cc1506685f8aada3af5c5241260b7 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/50083 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
cbce39005e
commit
3202c8afe4
|
@ -28,6 +28,19 @@ void __noreturn die(const char *fmt, ...);
|
||||||
*/
|
*/
|
||||||
void die_notify(void);
|
void die_notify(void);
|
||||||
|
|
||||||
|
#if CONFIG(CONSOLE_OVERRIDE_LOGLEVEL)
|
||||||
|
/*
|
||||||
|
* This function should be implemented at mainboard level.
|
||||||
|
* The returned value will _replace_ the loglevel value;
|
||||||
|
*/
|
||||||
|
int get_console_loglevel(void);
|
||||||
|
#else
|
||||||
|
static inline int get_console_loglevel(void)
|
||||||
|
{
|
||||||
|
return CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define __CONSOLE_ENABLE__ \
|
#define __CONSOLE_ENABLE__ \
|
||||||
((ENV_BOOTBLOCK && CONFIG(BOOTBLOCK_CONSOLE)) || \
|
((ENV_BOOTBLOCK && CONFIG(BOOTBLOCK_CONSOLE)) || \
|
||||||
(ENV_POSTCAR && CONFIG(POSTCAR_CONSOLE)) || \
|
(ENV_POSTCAR && CONFIG(POSTCAR_CONSOLE)) || \
|
||||||
|
@ -48,19 +61,6 @@ void console_time_report(void);
|
||||||
#define vprintk(LEVEL, fmt, args) do_vprintk(LEVEL, fmt, args)
|
#define vprintk(LEVEL, fmt, args) do_vprintk(LEVEL, fmt, args)
|
||||||
|
|
||||||
enum { CONSOLE_LOG_NONE = 0, CONSOLE_LOG_FAST, CONSOLE_LOG_ALL };
|
enum { CONSOLE_LOG_NONE = 0, CONSOLE_LOG_FAST, CONSOLE_LOG_ALL };
|
||||||
|
|
||||||
#if CONFIG(CONSOLE_OVERRIDE_LOGLEVEL)
|
|
||||||
/*
|
|
||||||
* This function should be implemented at mainboard level.
|
|
||||||
* The returned value will _replace_ the loglevel value;
|
|
||||||
*/
|
|
||||||
int get_console_loglevel(void);
|
|
||||||
#else
|
|
||||||
static inline int get_console_loglevel(void)
|
|
||||||
{
|
|
||||||
return CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
static inline void console_init(void) {}
|
static inline void console_init(void) {}
|
||||||
static inline int console_log_level(int msg_level) { return 0; }
|
static inline int console_log_level(int msg_level) { return 0; }
|
||||||
|
|
Loading…
Reference in New Issue