Skip to content

Commit

Permalink
plat-mediatek: disable console when CFG_TEE_CORE_LOG_LEVEL is 0
Browse files Browse the repository at this point in the history
Following our usage, it can be interesting to disable the console,
typically for a final product.

Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Co-developed-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Signed-off-by: Julien Masson <jmasson@baylibre.com>
  • Loading branch information
massonju committed Dec 4, 2023
1 parent d3f6526 commit e55e5c9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/arch/arm/plat-mediatek/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
#include <platform_config.h>
#include <stdint.h>

#if (CFG_TEE_CORE_LOG_LEVEL != 0)
register_phys_mem_pgdir(MEM_AREA_IO_NSEC,
CONSOLE_UART_BASE, SERIAL8250_UART_REG_SIZE);
#endif

static struct serial8250_uart_data console_data;

Expand All @@ -33,7 +35,9 @@ void boot_primary_init_intc(void)

void console_init(void)
{
serial8250_uart_init(&console_data, CONSOLE_UART_BASE,
CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE);
register_serial_console(&console_data.chip);
if (CFG_TEE_CORE_LOG_LEVEL != 0) {
serial8250_uart_init(&console_data, CONSOLE_UART_BASE,
CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE);
register_serial_console(&console_data.chip);
}
}

0 comments on commit e55e5c9

Please sign in to comment.