From owner-svn-src-head@FreeBSD.ORG Thu May 29 19:57:52 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 072458B1; Thu, 29 May 2014 19:57:52 +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 E8FBA2193; Thu, 29 May 2014 19:57:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4TJvp9a085911; Thu, 29 May 2014 19:57:51 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4TJvp07085910; Thu, 29 May 2014 19:57:51 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201405291957.s4TJvp07085910@svn.freebsd.org> From: Olivier Houchard Date: Thu, 29 May 2014 19:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266855 - head/sys/dev/uart 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: Thu, 29 May 2014 19:57:52 -0000 Author: cognet Date: Thu May 29 19:57:51 2014 New Revision: 266855 URL: http://svnweb.freebsd.org/changeset/base/266855 Log: In the grab function, keep the bit 6 on in the IER, on XScale, using 0 turns the UART off, which is unfortunate if one want to use it as a console. Modified: head/sys/dev/uart/uart_dev_ns8250.c Modified: head/sys/dev/uart/uart_dev_ns8250.c ============================================================================== --- head/sys/dev/uart/uart_dev_ns8250.c Thu May 29 19:48:18 2014 (r266854) +++ head/sys/dev/uart/uart_dev_ns8250.c Thu May 29 19:57:51 2014 (r266855) @@ -929,6 +929,7 @@ void ns8250_bus_grab(struct uart_softc *sc) { struct uart_bas *bas = &sc->sc_bas; + struct ns8250_softc *ns8250 = (struct ns8250_softc*)sc; /* * turn off all interrupts to enter polling mode. Leave the @@ -936,7 +937,11 @@ ns8250_bus_grab(struct uart_softc *sc) * All pending interupt signals are reset when IER is set to 0. */ uart_lock(sc->sc_hwmtx); - uart_setreg(bas, REG_IER, 0); + /* + * On XScale, bit 6 (0x40) is the UART Unit Enable, removing it + * turns the UART completely off, so make sure it is stays there. + */ + uart_setreg(bas, REG_IER, ns8250->ier & 0x40); uart_barrier(bas); uart_unlock(sc->sc_hwmtx); }