27#define UART_LCR_H 0x2C
31#define FR_RXFE (1 << 4)
32#define FR_TXFF (1 << 5)
33#define INT_RX (1 << 4)
34#define INT_RT (1 << 6)
35#define LCR_H_FEN (1 << 4)
36#define LCR_H_WLEN8 (3 << 5)
static uint32_t io_in32(struct ioaddr *io, uintptr_t off)
static void io_out32(struct ioaddr *io, uintptr_t off, uint32_t val)
int uart_register(int id, struct uart *u)
Registers a UART, as /dev/ttyS<id>.
void uart_receive_handler(struct uart *u, size_t size)
Takes characters a UART received, and gives them to its terminal.
#define MODULE_INIT(name, i, f)
static void pl011_comm_init(struct uart *u)
Sets the UART up when it is first opened: 8-bit characters, the FIFOs, and the receive interrupts.
static char pl011_receive(struct uart *u)
Takes one received character from the receive FIFO.
static void pl011_irq(void *arg)
Handles the UART's interrupt: every received character goes to the terminal, or is dropped if no one ...
static ssize_t pl011_transmit(struct uart *u, char c)
Sends one character, once the transmit FIFO has room.
static int pl011_init(void)
Finds the platform's PL011, installs its interrupt handler, and registers it as the first UART.
Where a device's registers are.