![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <device/mmio.h>
#include <boot/coreboot_tables.h>
#include <console/uart.h>
#include <types.h>
Go to the source code of this file.
Data Structures | |
struct | sifive_uart_registers |
Macros | |
#define | TXDATA_FULL BIT(31) |
#define | RXDATA_EMPTY BIT(31) |
#define | TXCTRL_TXEN BIT(0) |
#define | TXCTRL_NSTOP_SHIFT 1 |
#define | TXCTRL_NSTOP(x) (((x)-1) << TXCTRL_NSTOP_SHIFT) |
#define | TXCTRL_TXCNT_SHIFT 16 |
#define | TXCTRL_TXCNT(x) ((x) << TXCTRL_TXCNT_SHIFT) |
#define | RXCTRL_RXEN BIT(0) |
#define | RXCTRL_RXCNT_SHIFT 16 |
#define | RXCTRL_RXCNT(x) ((x) << RXCTRL_RXCNT_SHIFT) |
#define | IP_TXWM BIT(0) |
#define | IP_RXWM BIT(1) |
Functions | |
static void | sifive_uart_init (struct sifive_uart_registers *regs, int div) |
void | uart_init (unsigned int idx) |
static bool | uart_can_tx (struct sifive_uart_registers *regs) |
void | uart_tx_byte (unsigned int idx, unsigned char data) |
void | uart_tx_flush (unsigned int idx) |
unsigned char | uart_rx_byte (unsigned int idx) |
unsigned int | uart_input_clock_divider (void) |
void | uart_fill_lb (void *data) |
Variables | |
struct sifive_uart_registers | __packed |
#define RXCTRL_RXCNT | ( | x | ) | ((x) << RXCTRL_RXCNT_SHIFT) |
#define TXCTRL_NSTOP | ( | x | ) | (((x)-1) << TXCTRL_NSTOP_SHIFT) |
#define TXCTRL_TXCNT | ( | x | ) | ((x) << TXCTRL_TXCNT_SHIFT) |
|
static |
Definition at line 36 of file sifive.c.
References RXCTRL_RXCNT, RXCTRL_RXEN, TXCTRL_NSTOP, TXCTRL_TXCNT, TXCTRL_TXEN, and write32().
Referenced by uart_init().
|
static |
Definition at line 56 of file sifive.c.
References read32(), and TXDATA_FULL.
Referenced by uart_tx_byte().
Definition at line 48 of file sifive.c.
References get_uart_baudrate(), sifive_uart_init(), uart_baudrate_divisor(), uart_input_clock_divider(), uart_platform_baseptr(), and uart_platform_refclk().
Definition at line 94 of file sifive.c.
Referenced by uart_init().
Definition at line 82 of file sifive.c.
References read32(), sifive_uart_registers::rxdata, RXDATA_EMPTY, and uart_platform_baseptr().
Definition at line 61 of file sifive.c.
References uart_can_tx(), uart_platform_baseptr(), and write32().
Definition at line 71 of file sifive.c.
References sifive_uart_registers::ip, IP_TXWM, read32(), and uart_platform_baseptr().
struct sifive_uart_registers __packed |