Date: Tue, 18 Jun 2013 19:00:00 GMT From: Luiz Otavio O Souza <loos.br@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: arm/179688: [patch] [rpi] serial console eats some characters at moutroot prompt Message-ID: <201306181900.r5IJ004T073335@oldred.freebsd.org> Resent-Message-ID: <201306181910.r5IJA0Xu060898@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 179688 >Category: arm >Synopsis: [patch] [rpi] serial console eats some characters at moutroot prompt >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-arm >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 18 19:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Luiz Otavio O Souza >Release: -head r251700 >Organization: >Environment: FreeBSD raspberry-pi 10.0-CURRENT FreeBSD 10.0-CURRENT #11 r251700M: Tue Jun 18 13:06:54 BRT 2013 root@devel:/data/rpi/rpi/obj/arm.armv6/data/rpi/rpi/src/sys/RPI-B arm >Description: While at mountroot prompt the rpi uart driver eats some characters, making very hard to type something right. ray@ suggested to not enable the uart interrupts in uart_bus_attach() routine for the console device and that seems to also works fine for rpi. >How-To-Repeat: Boot a kernel from BOOTP (or boot a kernel from SD card without a valid root partition) and try to type at mountroot prompt. You need to keep the keys pressed for a while to see some output. >Fix: Apply the attached patch. It is a copy from the workaround used on uart_dev_imx.c. Patch attached with submission follows: Index: dev/uart/uart_dev_pl011.c =================================================================== --- dev/uart/uart_dev_pl011.c (revision 251700) +++ dev/uart/uart_dev_pl011.c (working copy) @@ -273,8 +273,13 @@ struct uart_bas *bas; bas = &sc->sc_bas; - /* Enable RX & TX interrupts */ - __uart_setreg(bas, UART_IMSC, (UART_RXREADY | UART_TXEMPTY)); + /* XXX workaround to have working console on manut prompt */ + if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE){ + /* Don't enable interrupts */ + } else { + /* Enable RX & TX interrupts */ + __uart_setreg(bas, UART_IMSC, (UART_RXREADY | UART_TXEMPTY)); + } /* Clear RX & TX interrupts */ __uart_setreg(bas, UART_ICR, IMSC_MASK_ALL); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306181900.r5IJ004T073335>