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>
diff --git a/src/include/console/console.h b/src/include/console/console.h
index a96eb15..d06b5b3 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -28,6 +28,19 @@
  */
 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 @@
 #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; }