1 /* 2 * Copyright (c) 2024 Travis Geiselbrecht 3 * 4 * Use of this source code is governed by a MIT-style 5 * license that can be found in the LICENSE file or at 6 * https://opensource.org/licenses/MIT 7 */ 8 #pragma once 9 10 #include <dev/uart.h> 11 #include <stdint.h> 12 13 // Set this flag if the UART is a debug UART, which routes input 14 // directly into the console buffer if present. 15 #define PL011_FLAG_DEBUG_UART (1u<<0) 16 17 struct pl011_config { 18 uintptr_t base; 19 uint32_t irq; 20 uint32_t flag; 21 }; 22 23 // pl011 specific initialization routines called from platform code. 24 // The driver will otherwise implement the uart_* interface. 25 void pl011_init_early(int port, const struct pl011_config *config); 26 void pl011_init(int port);