mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-15 00:47:02 +02:00
The code managing the console is the same for all the platforms currently supported. Since it is unlikely to change in the future move the code to an external file in the common directory. Signed-off-by: Carlo Caione <ccaione@baylibre.com> Change-Id: I6df555ea82d483b4f08a4a1e2cb0a7488fbaa015
34 lines
889 B
C
34 lines
889 B
C
/*
|
|
* Copyright (c) 2019, Carlo Caione <ccaione@baylibre.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#include <common/debug.h>
|
|
#include <meson_console.h>
|
|
#include <platform_def.h>
|
|
|
|
/*******************************************************************************
|
|
* Function that sets up the console
|
|
******************************************************************************/
|
|
static console_meson_t aml_console;
|
|
|
|
void aml_console_init(void)
|
|
{
|
|
int rc = console_meson_register(AML_UART0_AO_BASE,
|
|
AML_UART0_AO_CLK_IN_HZ,
|
|
AML_UART_BAUDRATE,
|
|
&aml_console);
|
|
if (rc == 0) {
|
|
/*
|
|
* The crash console doesn't use the multi console API, it uses
|
|
* the core console functions directly. It is safe to call panic
|
|
* and let it print debug information.
|
|
*/
|
|
panic();
|
|
}
|
|
|
|
console_set_scope(&aml_console.console,
|
|
CONSOLE_FLAG_BOOT | CONSOLE_FLAG_RUNTIME);
|
|
}
|