From ceb9efa9818c4f9f045f2965d861e784e110d509 Mon Sep 17 00:00:00 2001 From: Julien Masson Date: Mon, 4 Dec 2023 15:52:53 +0100 Subject: [PATCH] plat-mediatek: disable console when CFG_TEE_CORE_LOG_LEVEL is 0 Following our usage, it can be interesting to disable the console, typically for a final product. Co-developed-by: Guillaume La Roque Signed-off-by: Guillaume La Roque Signed-off-by: Julien Masson --- core/arch/arm/plat-mediatek/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/arch/arm/plat-mediatek/main.c b/core/arch/arm/plat-mediatek/main.c index 2470def4183..6cd8faef3af 100644 --- a/core/arch/arm/plat-mediatek/main.c +++ b/core/arch/arm/plat-mediatek/main.c @@ -12,8 +12,10 @@ #include #include +#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; @@ -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 }