Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Jun 2014 07:34:54 +0000 (UTC)
From:      Ruslan Bukin <br@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r266942 - head/sys/arm/samsung/exynos
Message-ID:  <201406010734.s517YsQU004035@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: br
Date: Sun Jun  1 07:34:54 2014
New Revision: 266942
URL: http://svnweb.freebsd.org/changeset/base/266942

Log:
  Do only receive chars if there are some data in the buffer.
  This fixes operation on newer Exynos boards.

Modified:
  head/sys/arm/samsung/exynos/uart.c

Modified: head/sys/arm/samsung/exynos/uart.c
==============================================================================
--- head/sys/arm/samsung/exynos/uart.c	Sun Jun  1 07:28:24 2014	(r266941)
+++ head/sys/arm/samsung/exynos/uart.c	Sun Jun  1 07:34:54 2014	(r266942)
@@ -286,8 +286,13 @@ s3c2410_bus_setsig(struct uart_softc *sc
 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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406010734.s517YsQU004035>