[coreboot-gerrit] Patch set updated for coreboot: soc/samsung/exynos5420/uart.c: Implement 'uart_tx_flush()'

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Wed Apr 13 21:20:51 CEST 2016


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/7927

-gerrit

commit 3534e9c80d07d38890a8a45c5861df9e897a3d67
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date:   Fri Dec 26 12:44:08 2014 +1100

    soc/samsung/exynos5420/uart.c: Implement 'uart_tx_flush()'
    
    This brings 'uart.c' implementations closer together between
    Exynos generations.
    
    Change-Id: Ifbc61794207ff36a9d8a98951e917f3b6d2ef205
    Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
 src/soc/samsung/exynos5420/uart.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/soc/samsung/exynos5420/uart.c b/src/soc/samsung/exynos5420/uart.c
index 359050a..6f2253a 100644
--- a/src/soc/samsung/exynos5420/uart.c
+++ b/src/soc/samsung/exynos5420/uart.c
@@ -144,6 +144,11 @@ static void exynos5_uart_tx_byte(struct s5p_uart *uart, unsigned char data)
 	write8(&uart->utxh, data);
 }
 
+static void exynos5_uart_tx_flush(struct s5p_uart *uart)
+{
+	while (readl(&uart->ufstat) & 0x1ff0000);
+}
+
 uintptr_t uart_platform_base(int idx)
 {
 	if (idx < 4)
@@ -172,7 +177,8 @@ void uart_tx_byte(int idx, unsigned char data)
 
 void uart_tx_flush(int idx)
 {
-	/* Exynos5250 implements this too. */
+	struct s5p_uart *uart = uart_platform_baseptr(idx);
+	exynos5_uart_tx_flush(uart);
 }
 
 #ifndef __PRE_RAM__



More information about the coreboot-gerrit mailing list