Tegra: no need to re-init the same console
authorVarun Wadekar <vwadekar@nvidia.com>
Tue, 4 Apr 2017 20:40:12 +0000 (13:40 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Thu, 13 Apr 2017 21:18:42 +0000 (14:18 -0700)
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
plat/nvidia/tegra/common/tegra_bl31_setup.c

index 308753ecb55f33fd15299a2cc070dada9ebc4403..2b3901a24512b7c6d2edfafef6122bc714ef36d5 100644 (file)
@@ -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
 
        /* ---------------------------------------------
index d2a6be56fe643089c4e81c33c117f568405c914c..8307af706abb173b37af84a0241c8d960762e223 100644 (file)
@@ -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();
        }
 
        /*