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: Damon Duan <danield@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
This commit is contained in:
parent
8d8d8d095c
commit
9b514f8312
|
@ -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
|
||||
* console
|
||||
*/
|
||||
assert(plat_params->uart_id);
|
||||
tegra_console_base = plat_get_console_from_id(plat_params->uart_id);
|
||||
|
||||
/*
|
||||
* 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,
|
||||
TEGRA_CONSOLE_BAUDRATE);
|
||||
if (tegra_console_base != (uint64_t)0) {
|
||||
/*
|
||||
* Configure the UART port to be used as the console
|
||||
*/
|
||||
console_init(tegra_console_base, TEGRA_BOOT_UART_CLK_IN_HZ,
|
||||
TEGRA_CONSOLE_BAUDRATE);
|
||||
|
||||
/* Initialise crash console */
|
||||
plat_crash_console_init();
|
||||
/* Initialise crash console */
|
||||
plat_crash_console_init();
|
||||
}
|
||||
|
||||
/*
|
||||
* 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)
|
|||
PSTATE_ID_SOC_POWERDN) {
|
||||
|
||||
/* Initialize the runtime console */
|
||||
console_init(tegra_console_base, TEGRA_BOOT_UART_CLK_IN_HZ,
|
||||
TEGRA_CONSOLE_BAUDRATE);
|
||||
if (tegra_console_base != (uint64_t)0) {
|
||||
console_init(tegra_console_base, TEGRA_BOOT_UART_CLK_IN_HZ,
|
||||
TEGRA_CONSOLE_BAUDRATE);
|
||||
}
|
||||
|
||||
/*
|
||||
* Restore Memory Controller settings as it loses state
|
||||
|
|
Loading…
Reference in New Issue