|
iPXE
|
16550-compatible UART More...
Go to the source code of this file.
Macros | |
| #define | NS16550_THRE_TIMEOUT_MS 100 |
| Timeout for transmit holding register to become empty. More... | |
| #define | NS16550_TEMT_TIMEOUT_MS 1000 |
| Timeout for transmitter to become empty. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static void | ns16550_transmit (struct uart *uart, uint8_t data) |
| Transmit data. More... | |
| static int | ns16550_data_ready (struct uart *uart) |
| Check if data is ready. More... | |
| static uint8_t | ns16550_receive (struct uart *uart) |
| Receive data. More... | |
| static void | ns16550_flush (struct uart *uart) |
| Flush transmitted data. More... | |
| static int | ns16550_init (struct uart *uart) |
| Initialise UART. More... | |
Variables | |
| struct uart_operations | ns16550_operations |
| 16550 UART operations More... | |
16550-compatible UART
Definition in file ns16550.c.
| #define NS16550_THRE_TIMEOUT_MS 100 |
| #define NS16550_TEMT_TIMEOUT_MS 1000 |
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
Transmit data.
| uart | UART |
| data | Data |
Definition at line 49 of file ns16550.c.
References data, mdelay(), NS16550_LSR, NS16550_LSR_THRE, ns16550_read(), NS16550_THR, NS16550_THRE_TIMEOUT_MS, ns16550_write(), and uart::priv.
|
static |
Check if data is ready.
| uart | UART |
| ready | Data is ready |
Definition at line 72 of file ns16550.c.
References NS16550_LSR, NS16550_LSR_DR, ns16550_read(), and uart::priv.
Referenced by ns16550_init().
Receive data.
| uart | UART |
| data | Data |
Definition at line 87 of file ns16550.c.
References NS16550_RBR, ns16550_read(), and uart::priv.
Referenced by ns16550_init().
|
static |
Flush transmitted data.
| uart | UART |
Definition at line 101 of file ns16550.c.
References NS16550_LSR, NS16550_LSR_TEMT, ns16550_read(), NS16550_TEMT_TIMEOUT_MS, and uart::priv.
Referenced by ns16550_init().
|
static |
Initialise UART.
| uart | UART |
| rc | Return status code |
Definition at line 120 of file ns16550.c.
References uart::baud, ns16550_uart::clock, ns16550_uart::divisor, ENODEV, NS16550_CLK_BIT, ns16550_data_ready(), NS16550_DLL, NS16550_DLM, NS16550_FCR, NS16550_FCR_FE, ns16550_flush(), NS16550_IER, NS16550_LCR, NS16550_LCR_8N1, NS16550_LCR_DLAB, NS16550_MCR, NS16550_MCR_DTR, NS16550_MCR_RTS, ns16550_read(), ns16550_receive(), NS16550_SCR, ns16550_write(), and uart::priv.
| struct uart_operations ns16550_operations |
16550 UART operations
Definition at line 171 of file ns16550.c.
Referenced by dwuart_probe(), and spcr_16550().
1.8.15