![]() |
coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <types.h>
Go to the source code of this file.
Functions | |
int | uart_is_enabled (const size_t bus) |
Returns the UART state. More... | |
int | uart_setup (const size_t bus, int baudrate) |
Setup UART with desired BAUD rate in 8N1, no parity mode. More... | |
int uart_is_enabled | ( | const size_t | bus | ) |
Returns the UART state.
bus | The UART to operate on |
Definition at line 120 of file uart.c.
References assert, cn81xx_uart_ctl::csclk_en, read64(), cn81xx_uart_ctl::s, cn81xx_uart_ctl::u, UAAx_PF_BAR0, and cn81xx_uart::uctl_ctl.
Referenced by bootblock_mainboard_early_init(), and dt_platform_fixup().
int uart_setup | ( | const size_t | bus, |
int | baudrate | ||
) |
Setup UART with desired BAUD rate in 8N1, no parity mode.
bus | The UART to operate on |
baudrate | baudrate to set up |
Exit here if the UART is not going to be used in coreboot. The previous initialization steps are sufficient to make the Linux kernel not panic.
Definition at line 141 of file uart.c.
References assert, pl011_uart::cr, cn81xx_uart_ctl::csclk_en, pl011_uart::fbrd, cn81xx_uart_ctl::h_clk_byp_sel, cn81xx_uart_ctl::h_clk_en, cn81xx_uart_ctl::h_clkdiv_rst, cn81xx_uart_ctl::h_clkdiv_sel, pl011_uart::ibrd, pl011_uart::lcr_h, cn81xx_uart::pl011, PL011_UARTCR_RXE, PL011_UARTCR_TXE, PL011_UARTCR_UARTEN, PL011_UARTLCR_H_FEN, PL011_UARTLCR_H_WLEN_8, read64(), cn81xx_uart_ctl::s, thunderx_get_io_clock(), cn81xx_uart_ctl::u, cn81xx_uart_ctl::uaa_rst, UAAx_PF_BAR0, UART_FBRD_BAUD_DIVFRAC_MASK, UART_SCLK_DIV, uart_sclk_divisor(), uart_wait_hclk(), cn81xx_uart::uctl_ctl, cn81xx_uart_ctl::uctl_rst, write32(), and write64().
Referenced by bootblock_mainboard_early_init().