diff options
author | cognet <cognet@FreeBSD.org> | 2014-05-29 19:57:51 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2014-05-29 19:57:51 +0000 |
commit | 0a372281edd2d6ac49eb2b883e35bc4c903d4117 (patch) | |
tree | d2af900806c382747874554b1936422d900d5c17 /sys/dev/uart | |
parent | db1eda5727266ac3a90857dd7f8528f7f63c2a1a (diff) | |
download | FreeBSD-src-0a372281edd2d6ac49eb2b883e35bc4c903d4117.zip FreeBSD-src-0a372281edd2d6ac49eb2b883e35bc4c903d4117.tar.gz |
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.
Diffstat (limited to 'sys/dev/uart')
-rw-r--r-- | sys/dev/uart/uart_dev_ns8250.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/uart/uart_dev_ns8250.c b/sys/dev/uart/uart_dev_ns8250.c index 47a61bf..106f89f 100644 --- a/sys/dev/uart/uart_dev_ns8250.c +++ b/sys/dev/uart/uart_dev_ns8250.c @@ -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); } |