Index: sys/arm/at91/uart_dev_at91usart.c =================================================================== --- sys/arm/at91/uart_dev_at91usart.c (revision 259641) +++ sys/arm/at91/uart_dev_at91usart.c (working copy) @@ -72,6 +72,7 @@ uint32_t flags; #define HAS_TIMEOUT 0x1 #define USE_RTS0_WORKAROUND 0x2 +#define NEEDS_RXRDY 0x4 bus_dma_tag_t rx_tag; struct at91_usart_rx ping_pong[2]; struct at91_usart_rx *ping; @@ -490,7 +491,13 @@ WR4(&sc->sc_bas, USART_IER, USART_CSR_TIMEOUT | USART_CSR_RXBUFF | USART_CSR_ENDRX); } else { - WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); + /* + * Defer turning on the RXRDY bit until we're opened. This is to make the + * mountroot prompt work before we've opened the console. This is a workaround + * for not being able to change the UART interface for the 10.0 release. + */ + atsc->flags |= NEEDS_RXRDY; + /* WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); */ } WR4(&sc->sc_bas, USART_IER, USART_CSR_RXBRK | USART_DCE_CHANGE_BITS); @@ -612,6 +619,12 @@ uart_lock(sc->sc_hwmtx); csr = RD4(&sc->sc_bas, USART_CSR); + /* Kludge -- Enable the RXRDY we deferred in attach */ + if (sc->sc_opened && (atsc->flags & NEEDS_RXRDY)) { + WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); + atsc->flags &= ~NEEDS_RXRDY; + } + if (csr & USART_CSR_OVRE) { WR4(&sc->sc_bas, USART_CR, USART_CR_RSTSTA); ipend |= SER_INT_OVERRUN;