Merge "marvell: uart: a3720: Implement console_a3700_core_flush" into integration
diff --git a/drivers/marvell/uart/a3700_console.S b/drivers/marvell/uart/a3700_console.S
index d184a2d..dc374ee 100644
--- a/drivers/marvell/uart/a3700_console.S
+++ b/drivers/marvell/uart/a3700_console.S
@@ -232,6 +232,11 @@
* ---------------------------------------------
*/
func console_a3700_core_flush
+ /* Wait for the TX FIFO to be empty */
+1: ldr w1, [x0, #UART_STATUS_REG]
+ and w1, w1, #UARTLSR_TXFIFOEMPTY
+ cmp w1, #UARTLSR_TXFIFOEMPTY
+ b.ne 1b
ret
endfunc console_a3700_core_flush