snow: Add flush to UART driver.
Wait for UART FIFO to be ready. (Credit to dhendrix for finding the bits to test with.) BUG=none TEST=manually boot device and see no garbage on serial output. BRANCH=none Change-Id: Ic921cc39a27b137f1a7fd137e032ffb61489bdd1 Reviewed-on: https://gerrit.chromium.org/gerrit/57660 Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: Hung-Te Lin <hungte@chromium.org> Commit-Queue: David Hendricks <dhendrix@chromium.org> Tested-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
parent
e39e2d8476
commit
6cf67f7261
1 changed files with 9 additions and 1 deletions
|
|
@ -162,12 +162,19 @@ static void exynos5_uart_tx_byte(unsigned char data)
|
|||
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__)
|
||||
|
||||
static const struct console_driver exynos5_uart_console __console = {
|
||||
.init = exynos5_init_dev,
|
||||
.tx_byte = exynos5_uart_tx_byte,
|
||||
// .tx_flush = exynos5_uart_tx_flush,
|
||||
.tx_flush = exynos5_uart_tx_flush,
|
||||
.rx_byte = exynos5_uart_rx_byte,
|
||||
// .tst_byte = exynos5_uart_tst_byte,
|
||||
};
|
||||
|
|
@ -196,6 +203,7 @@ void uart_tx_byte(unsigned char data)
|
|||
|
||||
void uart_tx_flush(void)
|
||||
{
|
||||
exynos5_uart_tx_flush();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue