qemu_console.c 504 Bytes
Newer Older
1
2
3
4
5
/*
 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */
6

7
8
#include <platform_def.h>

9
10
11
#include <drivers/console.h>
#include <drivers/arm/pl011.h>

12
static console_t console;
13
14
15
16
17
18

void qemu_console_init(void)
{
	(void)console_pl011_register(PLAT_QEMU_BOOT_UART_BASE,
			       PLAT_QEMU_BOOT_UART_CLK_IN_HZ,
			       PLAT_QEMU_CONSOLE_BAUDRATE, &console);
19

20
	console_set_scope(&console, CONSOLE_FLAG_BOOT |
21
			  CONSOLE_FLAG_RUNTIME);
22
23
}