diff options
author | cognet <cognet@FreeBSD.org> | 2014-05-29 21:00:06 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2014-05-29 21:00:06 +0000 |
commit | 85b2ab2f9de4eaeb971e79499a457b056b06c505 (patch) | |
tree | 5a6c223b14e5b5bb019840fac57e850cb5074e6c | |
parent | 66cf283e7914047f59b0939c34f14466b01157b8 (diff) | |
download | FreeBSD-src-85b2ab2f9de4eaeb971e79499a457b056b06c505.zip FreeBSD-src-85b2ab2f9de4eaeb971e79499a457b056b06c505.tar.gz |
In uart_bus_grab(), use the ier_mask instead of a custom hack for XScale.
Suggested by: jmg
-rw-r--r-- | sys/dev/uart/uart_dev_ns8250.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 106f89f..773cb44 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -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); } |