Exemple #1
0
void uart_init(int idx)
{
	unsigned int div;
	div = uart_baudrate_divisor(get_uart_baudrate(),
		uart_platform_refclk(), uart_input_clock_divider());
	sifive_uart_init(uart_platform_baseptr(idx), div);
}
Exemple #2
0
void uart_init(int idx)
{
	struct a10_uart *uart_base = uart_platform_baseptr(idx);

	/* Use default 8N1 encoding */
	a10_uart_configure(uart_base, get_uart_baudrate(),
		8, UART_PARITY_NONE, 1);
	a10_uart_enable_fifos(uart_base);
}
Exemple #3
0
void uart_init(int idx)
{
	void *base = uart_platform_baseptr(idx);
	if (!base)
		return;

	unsigned int div;
	div = uart_baudrate_divisor(get_uart_baudrate(),
		uart_platform_refclk(), uart_input_clock_divider());
	uart8250_mem_init(base, div);
}
Exemple #4
0
/* TODO: Implement function */
void uart_fill_lb(void *data)
{
	struct lb_serial serial;

	serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
	serial.baseaddr = (uint32_t)UART1_DM_BASE;
	serial.baud = get_uart_baudrate();
	serial.regwidth = 1;

	lb_add_serial(&serial, data);
	lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
}
Exemple #5
0
void uart_fill_lb(void *data)
{
	struct lb_serial serial;
	serial.type = LB_SERIAL_TYPE_MEMORY_MAPPED;
	serial.baseaddr = uart_platform_base(CONFIG_UART_FOR_CONSOLE);
	if (!serial.baseaddr)
		return;
	serial.baud = get_uart_baudrate();
	if (IS_ENABLED(CONFIG_DRIVERS_UART_8250MEM_32))
		serial.regwidth = sizeof(uint32_t);
	else
		serial.regwidth = sizeof(uint8_t);
	serial.input_hertz = uart_platform_refclk();
	serial.uart_pci_addr = CONFIG_UART_PCI_ADDR;
	lb_add_serial(&serial, data);

	lb_add_console(LB_TAG_CONSOLE_SERIAL8250MEM, data);
}