snow: Add flush to UART driver.
Wait for UART FIFO to be ready. (Credit to dhendrix for finding the bits to test with.) Change-Id: Ib6733e422cbc1c61b942bd90d85f88a3f412d6ff Signed-off-by: Hung-Te Lin <hungte@chromium.org> Signed-off-by: Gabe Black <gabeblack@chromium.org> Reviewed-on: http://review.coreboot.org/3698 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
ce7a5a790b
commit
7dd581494d
|
@ -162,12 +162,19 @@ static void exynos5_uart_tx_byte(unsigned char data)
|
||||||
writeb(data, &uart->utxh);
|
writeb(data, &uart->utxh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void exynos5_uart_tx_flush(void)
|
||||||
|
{
|
||||||
|
struct s5p_uart *uart = (struct s5p_uart *)base_port;
|
||||||
|
|
||||||
|
while (readl(&uart->ufstat) & 0x1ff0000);
|
||||||
|
}
|
||||||
|
|
||||||
#if !defined(__PRE_RAM__)
|
#if !defined(__PRE_RAM__)
|
||||||
|
|
||||||
static const struct console_driver exynos5_uart_console __console = {
|
static const struct console_driver exynos5_uart_console __console = {
|
||||||
.init = exynos5_init_dev,
|
.init = exynos5_init_dev,
|
||||||
.tx_byte = exynos5_uart_tx_byte,
|
.tx_byte = exynos5_uart_tx_byte,
|
||||||
// .tx_flush = exynos5_uart_tx_flush,
|
.tx_flush = exynos5_uart_tx_flush,
|
||||||
.rx_byte = exynos5_uart_rx_byte,
|
.rx_byte = exynos5_uart_rx_byte,
|
||||||
// .tst_byte = exynos5_uart_tst_byte,
|
// .tst_byte = exynos5_uart_tst_byte,
|
||||||
};
|
};
|
||||||
|
@ -196,6 +203,7 @@ void uart_tx_byte(unsigned char data)
|
||||||
|
|
||||||
void uart_tx_flush(void)
|
void uart_tx_flush(void)
|
||||||
{
|
{
|
||||||
|
exynos5_uart_tx_flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue