Hello Martin Roth, Marc Jones, Johnny Lin, Angel Pons,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/45770
to review the following change.
Change subject: [RFC] mb/scaleway: Use mainboard_get_option() API ......................................................................
[RFC] mb/scaleway: Use mainboard_get_option() API
Change-Id: I1acb11d76fd7620001f84b2c3331820dcaab8875 Signed-off-by: Nico Huber nico.h@gmx.de --- M src/mainboard/scaleway/tagada/Kconfig M src/mainboard/scaleway/tagada/bmcinfo.c 2 files changed, 10 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/45770/1
diff --git a/src/mainboard/scaleway/tagada/Kconfig b/src/mainboard/scaleway/tagada/Kconfig index cbbb6ae..ab51b1e 100644 --- a/src/mainboard/scaleway/tagada/Kconfig +++ b/src/mainboard/scaleway/tagada/Kconfig @@ -8,6 +8,7 @@ select BOARD_ROMSIZE_KB_16384 select HAVE_ACPI_TABLES select CONSOLE_OVERRIDE_LOGLEVEL + select USE_MAINBOARD_OPTIONS select UART_OVERRIDE_BAUDRATE
config MAINBOARD_DIR diff --git a/src/mainboard/scaleway/tagada/bmcinfo.c b/src/mainboard/scaleway/tagada/bmcinfo.c index 099d37e..982c09c 100644 --- a/src/mainboard/scaleway/tagada/bmcinfo.c +++ b/src/mainboard/scaleway/tagada/bmcinfo.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <stdint.h> +#include <string.h> #include <console/console.h> #include <console/uart.h> +#include <option.h>
#include "bmcinfo.h"
@@ -172,10 +174,13 @@ return 115200; }
-#if __CONSOLE_ENABLE__ /* Override default console loglevel */ -int get_console_loglevel(void) +enum cb_err mainboard_get_option(void *const dest, const char *const name) { - return bmcinfo_coreboot_verbosity_level(); + if (strcmp(name, "debug_level") == 0) { + *(char *)dest = bmcinfo_coreboot_verbosity_level(); + return CB_SUCCESS; + } + + return CB_CMOS_OPTION_NOT_FOUND; } -#endif