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 <delay.h>
#include <gpio.h>
#include <soc/clock.h>
#include <soc/blsp.h>
#include <soc/ipq_uart.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | uart_params_t |
Macros | |
#define | FIFO_DATA_SIZE 4 |
Functions | |
static unsigned int | msm_boot_uart_dm_init_rx_transfer (void *uart_dm_base) |
msm_boot_uart_dm_init_rx_transfer - Init Rx transfer More... | |
static unsigned int | msm_boot_uart_dm_init (void *uart_dm_base) |
msm_boot_uart_dm_init - initilaizes UART controller More... | |
void | uart_tx_byte (unsigned int idx, unsigned char data) |
static unsigned int | msm_boot_uart_dm_reset (void *base) |
msm_boot_uart_dm_reset - resets UART controller More... | |
void | uart_init (unsigned int idx) |
ipq40xx_uart_init - initializes UART More... | |
void | ipq40xx_uart_init (void) |
void | uart_tx_flush (unsigned int idx) |
uart_tx_flush - transmits a string of data More... | |
uint8_t | uart_rx_byte (unsigned int idx) |
ipq40xx_serial_getc - reads a character More... | |
void | uart_fill_lb (void *data) |
Variables | |
static const uart_params_t | uart_board_param |
static int | valid_data = 0 |
static unsigned int | word = 0 |
Definition at line 224 of file uart.c.
References uart_init().
Referenced by soc_init().
msm_boot_uart_dm_init - initilaizes UART controller
uart_dm_base | UART controller base address |
Definition at line 129 of file uart.c.
References MSM_BOOT_UART_DM_8_N_1_MODE, MSM_BOOT_UART_DM_CR, MSM_BOOT_UART_DM_CR_TX_ENABLE, MSM_BOOT_UART_DM_DMEN, MSM_BOOT_UART_DM_HCR, MSM_BOOT_UART_DM_IMR, MSM_BOOT_UART_DM_IMR_ENABLED, msm_boot_uart_dm_init_rx_transfer(), MSM_BOOT_UART_DM_IPR, MSM_BOOT_UART_DM_IRDA, MSM_BOOT_UART_DM_MR1, MSM_BOOT_UART_DM_MR2, msm_boot_uart_dm_reset(), MSM_BOOT_UART_DM_RFW_VALUE, MSM_BOOT_UART_DM_RFWR, MSM_BOOT_UART_DM_STALE_TIMEOUT_LSB, MSM_BOOT_UART_DM_TFW_VALUE, MSM_BOOT_UART_DM_TFWR, and write32().
Referenced by uart_init().
msm_boot_uart_dm_init_rx_transfer - Init Rx transfer
uart_dm_base | UART controller base address |
Definition at line 59 of file uart.c.
References MSM_BOOT_UART_DM_CMD_RES_STALE_INT, MSM_BOOT_UART_DM_CMD_RESET_RX, MSM_BOOT_UART_DM_CR, MSM_BOOT_UART_DM_CR_RX_ENABLE, MSM_BOOT_UART_DM_DMRX, MSM_BOOT_UART_DM_DMRX_DEF_VALUE, MSM_BOOT_UART_DM_E_SUCCESS, MSM_BOOT_UART_DM_GCMD_ENA_STALE_EVT, and write32().
Referenced by msm_boot_uart_dm_init().
msm_boot_uart_dm_reset - resets UART controller
base | UART controller base address |
Definition at line 113 of file uart.c.
References base, MSM_BOOT_UART_DM_CMD_RES_STALE_INT, MSM_BOOT_UART_DM_CMD_RES_TX_ERR, MSM_BOOT_UART_DM_CMD_RESET_ERR_STAT, MSM_BOOT_UART_DM_CMD_RESET_RX, MSM_BOOT_UART_DM_CMD_RESET_TX, MSM_BOOT_UART_DM_CR, MSM_BOOT_UART_DM_E_SUCCESS, and write32().
Referenced by msm_boot_uart_dm_init().
Definition at line 259 of file uart.c.
References get_uart_baudrate(), lb_add_console(), lb_add_serial(), LB_SERIAL_TYPE_MEMORY_MAPPED, LB_TAG_CONSOLE_SERIAL8250MEM, serial, UART1_DM_BASE, and uart_platform_refclk().
ipq40xx_uart_init - initializes UART
Initializes clocks, GPIO and UART controller.
Definition at line 198 of file uart.c.
References uart_params_t::blsp_uart, uart_clk_mnd_t::d_value, uart_params_t::dbg_uart_gpio, ipq_configure_gpio(), uart_clk_mnd_t::m_value, uart_params_t::mnd_value, MSM_BOOT_UART_DM_CSR, msm_boot_uart_dm_init(), uart_clk_mnd_t::n_value, NO_OF_DBG_UART_GPIOS, read32(), uart_board_param, uart_clock_config(), uart_params_t::uart_dm_base, UART_DM_CLK_RX_TX_BIT_RATE, and write32().
ipq40xx_serial_getc - reads a character
Returns the character read from serial port.
Definition at line 247 of file uart.c.
References valid_data, and word.
Definition at line 90 of file uart.c.
References base, MSM_BOOT_UART_DM_NO_CHARS_FOR_TX, MSM_BOOT_UART_DM_SR, MSM_BOOT_UART_DM_SR_TXEMT, MSM_BOOT_UART_DM_TF, read32(), uart_board_param, uart_params_t::uart_dm_base, udelay(), and write32().
uart_tx_flush - transmits a string of data
idx | string to transmit |
Definition at line 233 of file uart.c.
References base, MSM_BOOT_UART_DM_SR, MSM_BOOT_UART_DM_SR_TXEMT, read32(), uart_board_param, and uart_params_t::uart_dm_base.
|
static |
Definition at line 23 of file uart.c.
Referenced by uart_init(), uart_tx_byte(), and uart_tx_flush().
|
static |
Definition at line 85 of file uart.c.
Referenced by uart_rx_byte().
|
static |
Definition at line 88 of file uart.c.
Referenced by compute_ip_checksum(), enable_rom(), int1a_handler(), sdram_set_registers(), smbus_read_cmd(), spi_sw_reset(), tegra_i2c_send_recv(), and uart_rx_byte().