amba_pl011: Insert mb() for correct FIFO handling
authorPhil Elwell <phil@raspberrypi.org>
Fri, 29 Sep 2017 09:32:19 +0000 (10:32 +0100)
committerpopcornmix <popcornmix@gmail.com>
Mon, 13 May 2019 23:07:53 +0000 (00:07 +0100)
commit428cd5ce5df9050b73ea7f69c75718dc512117ae
treee1d72c80d42ea8d6f96b9f60fd13bf0a14ae7290
parente64484e1029761f9ac1f2992800d68c2e16c0257
amba_pl011: Insert mb() for correct FIFO handling

The pl011 register accessor functions use the _relaxed versions of the
standard readl() and writel() functions, meaning that there are no
automatic memory barriers. When polling a FIFO status register to check
for fullness, it is necessary to ensure that any outstanding writes have
completed; otherwise the flags are effectively stale, making it possible
that the next write is to a full FIFO.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
drivers/tty/serial/amba-pl011.c