diff options
author | Pali Rohár <pali@kernel.org> | 2021-02-16 11:49:11 +0100 |
---|---|---|
committer | Pali Rohár <pali@kernel.org> | 2021-02-16 11:49:11 +0100 |
commit | ab1fe18841252b49e9c4b61ac499c0e7ddbee2a4 (patch) | |
tree | 69fb2a7fae6dd9f35571039e19f54cc4caf74395 /drivers | |
parent | 66306814586b1bf6bcb859aaad218ec3bb090e94 (diff) | |
download | trusted-firmware-a-ab1fe18841252b49e9c4b61ac499c0e7ddbee2a4.tar.gz |
marvell: uart: a3720: Fix comments in console_a3700_core_init() function
The delay loop executes 3 instructions. These 3 instructions are executed
in 2 processor ticks and 30000 iterations on a 600 MHz CPU should yield
approximately 100 us. This means we are waiting 2 ms, not 20 ms, for TX
FIFO to be empty.
Signed-off-by: Pali Rohár <pali@kernel.org>
Change-Id: I2cccad405bcc73cd6d1062adc0205c405c16c15f
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/marvell/uart/a3700_console.S | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/marvell/uart/a3700_console.S b/drivers/marvell/uart/a3700_console.S index 58dad7aa54..7bef7a142e 100644 --- a/drivers/marvell/uart/a3700_console.S +++ b/drivers/marvell/uart/a3700_console.S @@ -60,10 +60,10 @@ func console_a3700_core_init str w3, [x0, #UART_POSSR_REG] /* - * Wait for the TX (THR and TSR) to be empty. If wait for 20ms, the TX FIFO is + * Wait for the TX (THR and TSR) to be empty. If wait for 2ms, the TX FIFO is * still not empty, TX FIFO will reset by all means. */ - mov w1, #20 /* max time out 20ms */ + mov w1, #20 /* max time out 20 * 100 us */ 2: /* Check whether TX (THR and TSR) is empty */ ldr w3, [x0, #UART_STATUS_REG] @@ -72,13 +72,13 @@ func console_a3700_core_init b.ne 4f /* Delay */ - mov w2, #30000 + mov w2, #30000 /* 30000 cycles of below 3 instructions on 600 MHz CPU ~~ 100 us */ 3: sub w2, w2, #1 cmp w2, #0 b.ne 3b - /* Check whether 10ms is waited */ + /* Check whether wait timeout expired */ sub w1, w1, #1 cmp w1, #0 b.ne 2b |