18#define NS16550_THR 0x00
21#define NS16550_RBR 0x00
24#define NS16550_IER 0x01
27#define NS16550_FCR 0x02
28#define NS16550_FCR_FE 0x01
31#define NS16550_LCR 0x03
32#define NS16550_LCR_WLS0 0x01
33#define NS16550_LCR_WLS1 0x02
34#define NS16550_LCR_STB 0x04
35#define NS16550_LCR_PEN 0x08
36#define NS16550_LCR_EPS 0x10
37#define NS16550_LCR_DLAB 0x80
39#define NS16550_LCR_WORD_LEN(x) ( ( (x) - 5 ) << 0 )
40#define NS16550_LCR_STOP_BITS(x) ( ( (x) - 1 ) << 2 )
41#define NS16550_LCR_PARITY(x) ( ( (x) - 0 ) << 3 )
51#define NS16550_LCR_WPS( word_len, parity, stop_bits ) \
52 ( NS16550_LCR_WORD_LEN ( (word_len) ) | \
53 NS16550_LCR_PARITY ( (parity) ) | \
54 NS16550_LCR_STOP_BITS ( (stop_bits) ) )
57#define NS16550_LCR_8N1 NS16550_LCR_WPS ( 8, 0, 1 )
60#define NS16550_MCR 0x04
61#define NS16550_MCR_DTR 0x01
62#define NS16550_MCR_RTS 0x02
65#define NS16550_LSR 0x05
66#define NS16550_LSR_DR 0x01
67#define NS16550_LSR_THRE 0x20
68#define NS16550_LSR_TEMT 0x40
71#define NS16550_SCR 0x07
74#define NS16550_DLL 0x00
77#define NS16550_DLM 0x01
92#define NS16550_CLK_BIT 16
95#define NS16550_CLK_DEFAULT 1843200
uint8_t data[48]
Additional event data.
uint64_t address
Base address.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
uint8_t ns16550_read(struct ns16550_uart *ns16550, unsigned int address)
void ns16550_write(struct ns16550_uart *ns16550, unsigned int address, uint8_t data)
Dummy COM1 UART for non-x86 platforms.
struct uart_operations ns16550_operations
16550 UART operations
unsigned int clock
Input clock frequency.
unsigned int shift
Register shift.
void * base
Register base address.
uint16_t divisor
Baud rate divisor.