summaryrefslogtreecommitdiffstats
path: root/sys/arm/samsung
diff options
context:
space:
mode:
authorbr <br@FreeBSD.org>2014-06-01 07:34:54 +0000
committerbr <br@FreeBSD.org>2014-06-01 07:34:54 +0000
commitcaf73c4db95fba430ead2b5a7be90945e30e2b37 (patch)
treee6683132ab3f6856cc58f181d8c57e4923771216 /sys/arm/samsung
parentcc47b6d9479ebc0469f422069b78a7e89bdbc128 (diff)
downloadFreeBSD-src-caf73c4db95fba430ead2b5a7be90945e30e2b37.zip
FreeBSD-src-caf73c4db95fba430ead2b5a7be90945e30e2b37.tar.gz
Do only receive chars if there are some data in the buffer.
This fixes operation on newer Exynos boards.
Diffstat (limited to 'sys/arm/samsung')
-rw-r--r--sys/arm/samsung/exynos/uart.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arm/samsung/exynos/uart.c b/sys/arm/samsung/exynos/uart.c
index eef99ff..0fd9e39 100644
--- a/sys/arm/samsung/exynos/uart.c
+++ b/sys/arm/samsung/exynos/uart.c
@@ -286,8 +286,13 @@ s3c2410_bus_setsig(struct uart_softc *sc, int sig)
static int
s3c2410_bus_receive(struct uart_softc *sc)
{
+ struct uart_bas *bas;
+
+ bas = &sc->sc_bas;
+ while (bus_space_read_4(bas->bst, bas->bsh,
+ SSCOM_UFSTAT) & UFSTAT_RXCOUNT)
+ uart_rx_put(sc, uart_getreg(&sc->sc_bas, SSCOM_URXH));
- uart_rx_put(sc, uart_getreg(&sc->sc_bas, SSCOM_URXH));
return (0);
}
OpenPOWER on IntegriCloud