When I currently boot the allwinner,sun5i-r8 board with an UART cable connected for console but no terminal attached, the boot hangs as soon the driver switches from the console output routines to interrupts.
I figured out that this is caused because at one place we set the FIFO RX interupt trigger to RXT2 (trigger on 1/2 full) instead of RXT0 (trigger on 1 char). I guess it's a typo since everywhere else in the driver it gets set to RXT0. When setting it to RXT0 (which is the reset value) the boot doesn't hang anymore also when an UART cable is connected without a terminal attached. ok? Index: sxiuart.c =================================================================== RCS file: /cvs/src/sys/arch/armv7/sunxi/sxiuart.c,v retrieving revision 1.12 diff -u -p -r1.12 sxiuart.c --- sxiuart.c 12 Aug 2016 16:09:37 -0000 1.12 +++ sxiuart.c 13 Aug 2016 20:34:48 -0000 @@ -660,7 +660,7 @@ sxiuartopen(dev_t dev, int flag, int mod iot = sc->sc_iot; ioh = sc->sc_ioh; - bus_space_write_1(iot, ioh, SXIUART_FCR, FIFOE | FIFO_RXT2); + bus_space_write_1(iot, ioh, SXIUART_FCR, FIFOE | FIFO_RXT0); delay(100); while (ISSET(bus_space_read_1(iot, ioh, SXIUART_LSR), LSR_RXRDY))