coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
uart.c File Reference
#include <device/mmio.h>
#include <boot/coreboot_tables.h>
#include <console/uart.h>
#include <drivers/uart/uart8250reg.h>
#include <stdint.h>
Include dependency graph for uart.c:

Go to the source code of this file.

Data Structures

struct  tegra210_uart
 

Functions

static void tegra210_uart_tx_flush (void)
 
static int tegra210_uart_tst_byte (void)
 
static void tegra210_uart_init (void)
 
static void tegra210_uart_tx_byte (unsigned char data)
 
static unsigned char tegra210_uart_rx_byte (void)
 
void uart_init (unsigned int idx)
 
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)
 
void uart_fill_lb (void *data)
 

Variables

struct tegra210_uart __packed
 
static struct tegra210_uart *const uart_ptr
 

Function Documentation

◆ tegra210_uart_init()

static void tegra210_uart_init ( void  )
static

◆ tegra210_uart_rx_byte()

static unsigned char tegra210_uart_rx_byte ( void  )
static

Definition at line 72 of file uart.c.

References tegra210_uart::rbr, read8(), tegra210_uart_tst_byte(), and uart_ptr.

Referenced by uart_rx_byte().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tegra210_uart_tst_byte()

static int tegra210_uart_tst_byte ( void  )
static

Definition at line 79 of file uart.c.

References tegra210_uart::lsr, read8(), UART8250_LSR_DR, and uart_ptr.

Referenced by tegra210_uart_rx_byte().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tegra210_uart_tx_byte()

static void tegra210_uart_tx_byte ( unsigned char  data)
static

Definition at line 61 of file uart.c.

References tegra210_uart::lsr, read8(), tegra210_uart::thr, UART8250_LSR_THRE, uart_ptr, and write8().

Referenced by uart_tx_byte().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tegra210_uart_tx_flush()

static void tegra210_uart_tx_flush ( void  )
static

Definition at line 67 of file uart.c.

References tegra210_uart::lsr, read8(), UART8250_LSR_TEMT, and uart_ptr.

Referenced by tegra210_uart_init(), and uart_tx_flush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ uart_fill_lb()

void uart_fill_lb ( void data)

Definition at line 104 of file uart.c.

References get_uart_baudrate(), lb_add_console(), lb_add_serial(), LB_SERIAL_TYPE_MEMORY_MAPPED, LB_TAG_CONSOLE_SERIAL8250MEM, serial, and uart_platform_refclk().

Here is the call graph for this function:

◆ uart_init()

void uart_init ( unsigned int  idx)

Definition at line 84 of file uart.c.

References tegra210_uart_init().

Here is the call graph for this function:

◆ uart_rx_byte()

unsigned char uart_rx_byte ( unsigned int  idx)

Definition at line 99 of file uart.c.

References tegra210_uart_rx_byte().

Here is the call graph for this function:

◆ uart_tx_byte()

void uart_tx_byte ( unsigned int  idx,
unsigned char  data 
)

Definition at line 89 of file uart.c.

References tegra210_uart_tx_byte().

Here is the call graph for this function:

◆ uart_tx_flush()

void uart_tx_flush ( unsigned int  idx)

Definition at line 94 of file uart.c.

References tegra210_uart_tx_flush().

Here is the call graph for this function:

Variable Documentation

◆ __packed

◆ uart_ptr

struct tegra210_uart* const uart_ptr
static
Initial value:
=
(void *)CONFIG_CONSOLE_SERIAL_TEGRA210_UART_ADDRESS

Definition at line 29 of file uart.c.

Referenced by tegra210_uart_init(), tegra210_uart_rx_byte(), tegra210_uart_tst_byte(), tegra210_uart_tx_byte(), and tegra210_uart_tx_flush().