Example #1
0
/*
 * we rely on the bootloader having set up the HW correctly, we just enable
 * transmitter/receiver here, just in case.
 */
void cdns_uart_init(vaddr_t base, uint32_t uart_clk, uint32_t baud_rate)
{
	if (!base || !uart_clk || !baud_rate)
		return;

	/* Enable UART and RX/TX */
	write32(CDNS_UART_CONTROL_RXEN | CDNS_UART_CONTROL_TXEN,
		base + CDNS_UART_CONTROL);

	cdns_uart_flush(base);
}
Example #2
0
/*
 * we rely on the bootloader having set up the HW correctly, we just enable
 * transmitter/receiver here, just in case.
 */
void cdns_uart_init(struct cdns_uart_data *pd, paddr_t base, uint32_t uart_clk,
		uint32_t baud_rate)
{
	pd->base.pa = base;
	pd->chip.ops = &cdns_uart_ops;

	if (!uart_clk || !baud_rate)
		return;

	/* Enable UART and RX/TX */
	write32(CDNS_UART_CONTROL_RXEN | CDNS_UART_CONTROL_TXEN,
		base + CDNS_UART_CONTROL);

	cdns_uart_flush(&pd->chip);
}