aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2021-01-28 18:35:12 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-02-01 08:52:18 +0000
commit3202c8afe48d170f68458f0e10b42d04629477c2 (patch)
tree66869af9b451284a470e6eea6b08049e6103ea2c
parentcbce39005ede7e9f0feba6fa98bd7ebd0bb629cc (diff)
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>
-rw-r--r--src/include/console/console.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/include/console/console.h b/src/include/console/console.h
index a96eb15148..d06b5b36fa 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -28,6 +28,19 @@ void __noreturn die(const char *fmt, ...);
*/
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__ \
((ENV_BOOTBLOCK && CONFIG(BOOTBLOCK_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)
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
static inline void console_init(void) {}
static inline int console_log_level(int msg_level) { return 0; }