diff options
author | ian <ian@FreeBSD.org> | 2015-05-23 19:50:14 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2015-05-23 19:50:14 +0000 |
commit | e9db1ba7b7e7a1a2d2104b4bef2aba479f2c86a4 (patch) | |
tree | af3dbf5311a14d569f3e97992aafc69a59c85d0b | |
parent | 5ba1e43ae8e1813da545e99ca49d014da8258d59 (diff) | |
download | FreeBSD-src-e9db1ba7b7e7a1a2d2104b4bef2aba479f2c86a4.zip FreeBSD-src-e9db1ba7b7e7a1a2d2104b4bef2aba479f2c86a4.tar.gz |
MFC r266942, r266944:
Do only receive chars if there are some data in the buffer.
This fixes operation on newer Exynos boards.
Rename exynos uart driver filenames.
-rw-r--r-- | sys/arm/samsung/exynos/exynos_uart.c (renamed from sys/arm/samsung/exynos/uart.c) | 9 | ||||
-rw-r--r-- | sys/arm/samsung/exynos/exynos_uart.h (renamed from sys/arm/samsung/exynos/uart.h) | 0 | ||||
-rw-r--r-- | sys/arm/samsung/exynos/files.exynos5 | 2 |
3 files changed, 8 insertions, 3 deletions
diff --git a/sys/arm/samsung/exynos/uart.c b/sys/arm/samsung/exynos/exynos_uart.c index eef99ff..78bc085 100644 --- a/sys/arm/samsung/exynos/uart.c +++ b/sys/arm/samsung/exynos/exynos_uart.c @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #include <dev/uart/uart_cpu.h> #include <dev/uart/uart_bus.h> -#include <arm/samsung/exynos/uart.h> +#include <arm/samsung/exynos/exynos_uart.h> #include "uart_if.h" @@ -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); } diff --git a/sys/arm/samsung/exynos/uart.h b/sys/arm/samsung/exynos/exynos_uart.h index 06afeff1..06afeff1 100644 --- a/sys/arm/samsung/exynos/uart.h +++ b/sys/arm/samsung/exynos/exynos_uart.h diff --git a/sys/arm/samsung/exynos/files.exynos5 b/sys/arm/samsung/exynos/files.exynos5 index 134590e..da347e4 100644 --- a/sys/arm/samsung/exynos/files.exynos5 +++ b/sys/arm/samsung/exynos/files.exynos5 @@ -19,7 +19,7 @@ arm/samsung/exynos/exynos5_common.c standard arm/samsung/exynos/exynos5_machdep.c standard arm/samsung/exynos/exynos5_combiner.c standard arm/samsung/exynos/exynos5_pad.c optional gpio -arm/samsung/exynos/uart.c optional uart +arm/samsung/exynos/exynos_uart.c optional uart arm/samsung/exynos/exynos5_ehci.c optional ehci arm/samsung/exynos/exynos5_fimd.c optional vt arm/samsung/exynos/exynos5_i2c.c optional iicbus |