blob: 9c02957ec140ba4801d668fe5a33e417740a492a [file] [log] [blame]
Michalis Pappascca6cb72018-03-04 15:43:38 +08001/*
2 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6#include <console.h>
7#include <pl011.h>
8#include <platform_def.h>
9
10static console_pl011_t console;
11static console_pl011_t crash_console;
12
13void qemu_console_init(void)
14{
15#if MULTI_CONSOLE_API
16 (void)console_pl011_register(PLAT_QEMU_BOOT_UART_BASE,
17 PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
18 PLAT_QEMU_CONSOLE_BAUDRATE, &console);
19#else
20 console_init(PLAT_QEMU_BOOT_UART_BASE,
21 PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
22 PLAT_QEMU_CONSOLE_BAUDRATE);
23#endif /* MULTI_CONSOLE_API */
24}
25
26void qemu_crash_console_init(void)
27{
28#if MULTI_CONSOLE_API
29 (void)console_pl011_register(PLAT_QEMU_CRASH_UART_BASE,
30 PLAT_QEMU_CRASH_UART_CLK_IN_HZ,
31 PLAT_QEMU_CONSOLE_BAUDRATE, &crash_console);
32#else
33 console_core_init(PLAT_QEMU_CRASH_UART_BASE,
34 PLAT_QEMU_CRASH_UART_CLK_IN_HZ,
35 PLAT_QEMU_CONSOLE_BAUDRATE);
36#endif /* MULTI_CONSOLE_API */
37}