1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3  * Copyright (c) 2020 Carlo Caione <ccaione@baylibre.com>
4  */
5 
6 #include <console.h>
7 #include <drivers/amlogic_uart.h>
8 #include <mm/core_memprot.h>
9 #include <platform_config.h>
10 #include <stdint.h>
11 
12 static struct amlogic_uart_data console_data;
13 register_phys_mem_pgdir(MEM_AREA_IO_SEC, CONSOLE_UART_BASE,
14 			CORE_MMU_PGDIR_SIZE);
15 
console_init(void)16 void console_init(void)
17 {
18 	amlogic_uart_init(&console_data, CONSOLE_UART_BASE);
19 	register_serial_console(&console_data.chip);
20 }
21