Date: Thu, 29 May 2014 21:00:06 +0000 (UTC) From: Olivier Houchard <cognet@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266858 - head/sys/dev/uart Message-ID: <201405292100.s4TL06Ij015713@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cognet Date: Thu May 29 21:00:06 2014 New Revision: 266858 URL: http://svnweb.freebsd.org/changeset/base/266858 Log: In uart_bus_grab(), use the ier_mask instead of a custom hack for XScale. Suggested by: jmg 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 20:53:53 2014 (r266857) +++ head/sys/dev/uart/uart_dev_ns8250.c Thu May 29 21:00:06 2014 (r266858) @@ -930,6 +930,7 @@ ns8250_bus_grab(struct uart_softc *sc) { struct uart_bas *bas = &sc->sc_bas; struct ns8250_softc *ns8250 = (struct ns8250_softc*)sc; + u_char ier; /* * turn off all interrupts to enter polling mode. Leave the @@ -937,11 +938,8 @@ ns8250_bus_grab(struct uart_softc *sc) * All pending interupt signals are reset when IER is set to 0. */ uart_lock(sc->sc_hwmtx); - /* - * 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); + ier = uart_getreg(bas, REG_IER); + uart_setreg(bas, REG_IER, ier & ns8250->ier_mask); uart_barrier(bas); uart_unlock(sc->sc_hwmtx); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405292100.s4TL06Ij015713>