From owner-svn-src-all@FreeBSD.ORG Thu May 29 20:44:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B307B8E8; Thu, 29 May 2014 20:44:56 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "funkthat.com", Issuer "funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 76C9925CE; Thu, 29 May 2014 20:44:55 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s4TKiswP049190 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 May 2014 13:44:54 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s4TKisdI049189; Thu, 29 May 2014 13:44:54 -0700 (PDT) (envelope-from jmg) Date: Thu, 29 May 2014 13:44:54 -0700 From: John-Mark Gurney To: Olivier Houchard Subject: Re: svn commit: r266855 - head/sys/dev/uart Message-ID: <20140529204454.GB43976@funkthat.com> References: <201405291957.s4TJvp07085910@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201405291957.s4TJvp07085910@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Thu, 29 May 2014 13:44:54 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 May 2014 20:44:56 -0000 Olivier Houchard wrote this message on Thu, May 29, 2014 at 19:57 +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); > } Should this be using ns8250->ier_mask instead of 0x40? It also looks like AVILA doesn't have the hints to set this like GUMSTIX does, and maybe adding this will help? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."