From owner-svn-src-head@FreeBSD.ORG Sun Jun 1 07:34:54 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0F49DEA; Sun, 1 Jun 2014 07:34:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE633204D; Sun, 1 Jun 2014 07:34:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s517YsGS004036; Sun, 1 Jun 2014 07:34:54 GMT (envelope-from br@svn.freebsd.org) Received: (from br@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s517YsQU004035; Sun, 1 Jun 2014 07:34:54 GMT (envelope-from br@svn.freebsd.org) Message-Id: <201406010734.s517YsQU004035@svn.freebsd.org> From: Ruslan Bukin Date: Sun, 1 Jun 2014 07:34:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266942 - head/sys/arm/samsung/exynos X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jun 2014 07:34:54 -0000 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); }