xref: /rk3399_ARM-atf/plat/arm/board/arm_fpga/fpga_console.c (revision 3443a7027d78a9ccebc6940f0a69300ec7c1ed44)
1 /*
2  * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <drivers/console.h>
8 #include <drivers/arm/pl011.h>
9 
10 #include <platform_def.h>
11 
12 static console_t console;
13 
14 void fpga_console_init(void)
15 {
16 	(void)console_pl011_register(PLAT_FPGA_BOOT_UART_BASE,
17 		PLAT_FPGA_BOOT_UART_CLK_IN_HZ,
18 		PLAT_FPGA_CONSOLE_BAUDRATE,
19 		&console);
20 
21 	console_set_scope(&console, CONSOLE_FLAG_BOOT |
22 		CONSOLE_FLAG_RUNTIME);
23 }
24