Commit 0d06b058 authored by Pali Rohár's avatar Pali Rohár
Browse files

marvell: uart: a3720: Increase TX FIFO EMPTY timeout from 2ms to 3ms



TX FIFO has space for 32 characters. With default UART baudrate 115200 it
takes more than 2ms to transmit all 32 characters, so wait at least 3ms
before flushing TX FIFO.

If WTMI firmware transmitted something via UART before TF-A was booted,
some characters may still wait in TX FIFO when TF-A is initializing UART
driver. So wait at least 3ms to ensure that HW has enough time to transmit
all characters waiting in TX FIFO.

This fixes an issue where sometimes characters transmitted on UART by our
custom WTMI image are lost.
Signed-off-by: default avatarPali Rohár <pali@kernel.org>
Change-Id: I8ea4ea58e4ba3e0c0d7f47e679171b9b94442f19
parent 98641515
...@@ -60,10 +60,10 @@ func console_a3700_core_init ...@@ -60,10 +60,10 @@ func console_a3700_core_init
str w3, [x0, #UART_POSSR_REG] str w3, [x0, #UART_POSSR_REG]
/* /*
* Wait for the TX (THR and TSR) to be empty. If wait for 2ms, the TX FIFO is * Wait for the TX (THR and TSR) to be empty. If wait for 3ms, the TX FIFO is
* still not empty, TX FIFO will reset by all means. * still not empty, TX FIFO will reset by all means.
*/ */
mov w1, #20 /* max time out 20 * 100 us */ mov w1, #30 /* max time out 30 * 100 us */
2: 2:
/* Check whether TX (THR and TSR) is empty */ /* Check whether TX (THR and TSR) is empty */
ldr w3, [x0, #UART_STATUS_REG] ldr w3, [x0, #UART_STATUS_REG]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment