1 From 77673025dd2dab30832e4264bf8de9474a9b9142 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 29 Sep 2017 10:32:19 +0100
4 Subject: [PATCH] amba_pl011: Insert mb() for correct FIFO handling
6 The pl011 register accessor functions use the _relaxed versions of the
7 standard readl() and writel() functions, meaning that there are no
8 automatic memory barriers. When polling a FIFO status register to check
9 for fullness, it is necessary to ensure that any outstanding writes have
10 completed; otherwise the flags are effectively stale, making it possible
11 that the next write is to a full FIFO.
13 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
15 drivers/tty/serial/amba-pl011.c | 1 +
16 1 file changed, 1 insertion(+)
18 --- a/drivers/tty/serial/amba-pl011.c
19 +++ b/drivers/tty/serial/amba-pl011.c
20 @@ -1435,6 +1435,7 @@ static bool pl011_tx_char(struct uart_am
21 return false; /* unable to transmit character */
23 pl011_write(c, uap, REG_DR);
25 uap->port.icount.tx++;