From e87dac6b4580e748d61b2b2144b8d58f25397ccf Mon Sep 17 00:00:00 2001 From: Varun Wadekar <vwadekar@nvidia.com> Date: Tue, 4 Apr 2017 13:40:12 -0700 Subject: [PATCH] Tegra: no need to re-init the same console This patch stops initialising the same UART console, as a "crash" console. The normal and the crash consoles use the same UART port and hence the crash console init function now only checks if the console is ready to be used. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> --- plat/nvidia/tegra/common/aarch64/tegra_helpers.S | 11 ++++++----- plat/nvidia/tegra/common/tegra_bl31_setup.c | 3 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/plat/nvidia/tegra/common/aarch64/tegra_helpers.S b/plat/nvidia/tegra/common/aarch64/tegra_helpers.S index 308753ecb..2b3901a24 100644 --- a/plat/nvidia/tegra/common/aarch64/tegra_helpers.S +++ b/plat/nvidia/tegra/common/aarch64/tegra_helpers.S @@ -243,11 +243,12 @@ endfunc platform_mem_init * --------------------------------------------- */ func plat_crash_console_init - adr x0, tegra_console_base - ldr x0, [x0] - mov_imm x1, TEGRA_BOOT_UART_CLK_IN_HZ - mov_imm x2, TEGRA_CONSOLE_BAUDRATE - b console_core_init + mov x0, #0 + adr x1, tegra_console_base + ldr x1, [x1] + cbz x1, 1f + mov w0, #1 +1: ret endfunc plat_crash_console_init /* --------------------------------------------- diff --git a/plat/nvidia/tegra/common/tegra_bl31_setup.c b/plat/nvidia/tegra/common/tegra_bl31_setup.c index d2a6be56f..8307af706 100644 --- a/plat/nvidia/tegra/common/tegra_bl31_setup.c +++ b/plat/nvidia/tegra/common/tegra_bl31_setup.c @@ -202,9 +202,6 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2, */ console_init(tegra_console_base, TEGRA_BOOT_UART_CLK_IN_HZ, TEGRA_CONSOLE_BAUDRATE); - - /* Initialise crash console */ - plat_crash_console_init(); } /* -- GitLab