1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3  * Copyright (c) 2015, Linaro Limited
4  */
5 
6 #include <console.h>
7 #include <drivers/hi16xx_uart.h>
8 #include <kernel/panic.h>
9 #include <mm/tee_pager.h>
10 #include <mm/core_memprot.h>
11 #include <platform_config.h>
12 #include <stdint.h>
13 
14 static struct hi16xx_uart_data console_data;
15 
16 register_phys_mem_pgdir(MEM_AREA_IO_NSEC, CONSOLE_UART_BASE,
17 			HI16XX_UART_REG_SIZE);
18 
console_init(void)19 void console_init(void)
20 {
21 	hi16xx_uart_init(&console_data, CONSOLE_UART_BASE,
22 			 CONSOLE_UART_CLK_IN_HZ, CONSOLE_BAUDRATE);
23 	register_serial_console(&console_data.chip);
24 }
25