blob: 1f00f8a72289ec0ce2ecd52d30bc5a5297088a0c [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 */
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00006
Michalis Pappascca6cb72018-03-04 15:43:38 +08007#include <platform_def.h>
8
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00009#include <drivers/console.h>
10#include <drivers/arm/pl011.h>
11
Andre Przywara2b1b1a52020-01-25 00:58:35 +000012static console_t console;
Michalis Pappascca6cb72018-03-04 15:43:38 +080013
14void qemu_console_init(void)
15{
Michalis Pappascca6cb72018-03-04 15:43:38 +080016 (void)console_pl011_register(PLAT_QEMU_BOOT_UART_BASE,
17 PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
18 PLAT_QEMU_CONSOLE_BAUDRATE, &console);
Michalis Pappasabd08362018-03-27 12:32:31 +080019
Andre Przywara2b1b1a52020-01-25 00:58:35 +000020 console_set_scope(&console, CONSOLE_FLAG_BOOT |
Michalis Pappasabd08362018-03-27 12:32:31 +080021 CONSOLE_FLAG_RUNTIME);
Michalis Pappascca6cb72018-03-04 15:43:38 +080022}
23