Commit 9b514f83 authored by Damon Duan's avatar Damon Duan Committed by Varun Wadekar
Browse files

Tegra: init the console only if the platform supports it



Some platforms might want to keep the uart console disabled
during boot. This patch checks if the platform supports a
console, before calling console_init().

Change-Id: Icc9c59cb979d91fd0a72e4732403b3284bdd2dfc
Signed-off-by: default avatarDamon Duan <danield@nvidia.com>
Signed-off-by: default avatarVarun Wadekar <vwadekar@nvidia.com>
parent 8d8d8d09
...@@ -188,18 +188,18 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2, ...@@ -188,18 +188,18 @@ void bl31_early_platform_setup(bl31_params_t *from_bl2,
* Get the base address of the UART controller to be used for the * Get the base address of the UART controller to be used for the
* console * console
*/ */
assert(plat_params->uart_id);
tegra_console_base = plat_get_console_from_id(plat_params->uart_id); tegra_console_base = plat_get_console_from_id(plat_params->uart_id);
if (tegra_console_base != (uint64_t)0) {
/* /*
* Configure the UART port to be used as the console * Configure the UART port to be used as the console
*/ */
assert(tegra_console_base);
console_init(tegra_console_base, TEGRA_BOOT_UART_CLK_IN_HZ, console_init(tegra_console_base, TEGRA_BOOT_UART_CLK_IN_HZ,
TEGRA_CONSOLE_BAUDRATE); TEGRA_CONSOLE_BAUDRATE);
/* Initialise crash console */ /* Initialise crash console */
plat_crash_console_init(); plat_crash_console_init();
}
/* /*
* Do initial security configuration to allow DRAM/device access. * Do initial security configuration to allow DRAM/device access.
......
...@@ -214,8 +214,10 @@ void tegra_pwr_domain_on_finish(const psci_power_state_t *target_state) ...@@ -214,8 +214,10 @@ void tegra_pwr_domain_on_finish(const psci_power_state_t *target_state)
PSTATE_ID_SOC_POWERDN) { PSTATE_ID_SOC_POWERDN) {
/* Initialize the runtime console */ /* Initialize the runtime console */
if (tegra_console_base != (uint64_t)0) {
console_init(tegra_console_base, TEGRA_BOOT_UART_CLK_IN_HZ, console_init(tegra_console_base, TEGRA_BOOT_UART_CLK_IN_HZ,
TEGRA_CONSOLE_BAUDRATE); TEGRA_CONSOLE_BAUDRATE);
}
/* /*
* Restore Memory Controller settings as it loses state * Restore Memory Controller settings as it loses state
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment