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