2018-03-04 07:43:38 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
2018-12-14 00:18:21 +00:00
|
|
|
|
2018-03-04 07:43:38 +00:00
|
|
|
#include <platform_def.h>
|
|
|
|
|
2018-12-14 00:18:21 +00:00
|
|
|
#include <drivers/console.h>
|
|
|
|
#include <drivers/arm/pl011.h>
|
|
|
|
|
2018-03-24 04:38:31 +00:00
|
|
|
#if MULTI_CONSOLE_API
|
2018-03-04 07:43:38 +00:00
|
|
|
static console_pl011_t console;
|
2018-03-24 04:38:31 +00:00
|
|
|
#endif /* MULTI_CONSOLE_API */
|
2018-03-04 07:43:38 +00:00
|
|
|
|
|
|
|
void qemu_console_init(void)
|
|
|
|
{
|
|
|
|
#if MULTI_CONSOLE_API
|
|
|
|
(void)console_pl011_register(PLAT_QEMU_BOOT_UART_BASE,
|
|
|
|
PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
|
|
|
|
PLAT_QEMU_CONSOLE_BAUDRATE, &console);
|
2018-03-27 05:32:31 +01:00
|
|
|
|
|
|
|
console_set_scope(&console.console, CONSOLE_FLAG_BOOT |
|
|
|
|
CONSOLE_FLAG_RUNTIME);
|
2018-03-04 07:43:38 +00:00
|
|
|
#else
|
|
|
|
console_init(PLAT_QEMU_BOOT_UART_BASE,
|
|
|
|
PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
|
|
|
|
PLAT_QEMU_CONSOLE_BAUDRATE);
|
|
|
|
#endif /* MULTI_CONSOLE_API */
|
|
|
|
}
|
|
|
|
|