From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cEtTe-0007N9-RT for qemu-devel@nongnu.org; Thu, 08 Dec 2016 02:50:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cEtTe-0000kt-0t for qemu-devel@nongnu.org; Thu, 08 Dec 2016 02:50:50 -0500 References: From: Laurent Vivier Message-ID: <293c3354-b11b-a31f-39dc-b7264ad0bb24@redhat.com> Date: Thu, 8 Dec 2016 08:50:40 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH] cadence_uart: Check if receiver timeout counter is disabled List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrew Gacek , qemu-devel@nongnu.org, qemu-trivial@nongnu.org, "Edgar E. Iglesias\"" , Alistair Francis , qemu-arm@nongnu.org I CC: Xilinx Zynq Maintainers. Laurent On 07/12/2016 22:12, Andrew Gacek wrote: > When register Rcvr_timeout_reg0 (R_RTOR in cadence_uart.c) is set to > 0, the receiver timeout counter should be disabled. See page 1801 of > "Zynq-7000 AP SoC Technical Reference Manual". This commit adds a > such a check before setting the receive timeout interrupt. > > Signed-off-by: Andrew Gacek > --- > hw/char/cadence_uart.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c > index 0215d65..54194b1 100644 > --- a/hw/char/cadence_uart.c > +++ b/hw/char/cadence_uart.c > @@ -138,7 +138,9 @@ static void fifo_trigger_update(void *opaque) > { > CadenceUARTState *s = opaque; > > - s->r[R_CISR] |= UART_INTR_TIMEOUT; > + if (s->r[R_RTOR]) { > + s->r[R_CISR] |= UART_INTR_TIMEOUT; > + } > > uart_update_status(s); > } >