Date: Thu, 29 May 2014 22:46:48 +0200 From: Olivier Houchard <cognet@ci0.org> To: John-Mark Gurney <jmg@funkthat.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r266855 - head/sys/dev/uart Message-ID: <20140529204648.GA6936@ci0.org> In-Reply-To: <20140529204454.GB43976@funkthat.com> References: <201405291957.s4TJvp07085910@svn.freebsd.org> <20140529204454.GB43976@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 29, 2014 at 01:44:54PM -0700, John-Mark Gurney wrote: > 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? > Hmm you're right, this is probably better, I'll just do that :) Olivier
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140529204648.GA6936>