Merge changes I8ea4ea58,I1f0b4aab,I2cccad40 into integration

* changes:
  marvell: uart: a3720: Increase TX FIFO EMPTY timeout from 2ms to 3ms
  marvell: uart: a3720: Update delay code to be compatible with 1200 MHz CPU
  marvell: uart: a3720: Fix comments in console_a3700_core_init() function
This commit is contained in:
Madhukar Pappireddy 2021-02-22 00:31:57 +00:00 committed by TrustedFirmware Code Review
commit 6e86102317
1 changed files with 4 additions and 4 deletions

View File

@ -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 20ms, 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 20ms */ 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]
@ -72,13 +72,13 @@ func console_a3700_core_init
b.ne 4f b.ne 4f
/* Delay */ /* Delay */
mov w2, #30000 mov w2, #60000 /* 60000 cycles of below 3 instructions on 1200 MHz CPU ~~ 100 us */
3: 3:
sub w2, w2, #1 sub w2, w2, #1
cmp w2, #0 cmp w2, #0
b.ne 3b b.ne 3b
/* Check whether 10ms is waited */ /* Check whether wait timeout expired */
sub w1, w1, #1 sub w1, w1, #1
cmp w1, #0 cmp w1, #0
b.ne 2b b.ne 2b