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.

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 ceb9efa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 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)
{
#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);
#endif
}

0 comments on commit ceb9efa

Please sign in to comment.