From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [RFC PATCH] tty: serial: uartlite: Extend time for sending chars through mdm IP Date: Mon, 30 Sep 2013 05:54:33 -0700 Message-ID: <20130930125433.GC13654@kroah.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:37645 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753070Ab3I3Mya (ORCPT ); Mon, 30 Sep 2013 08:54:30 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Michal Simek Cc: linux-kernel@vger.kernel.org, Michal Simek , linux-serial@vger.kernel.org, arnd@arndb.de, Peter Korsgaard , Grant Likely , Rob Herring , Jiri Slaby On Mon, Sep 30, 2013 at 01:50:35PM +0200, Michal Simek wrote: > From: Michal Simek > > Serial over jtag via mdm is compatible with uartlite driver > just need to extend time for reading chars because connection > is slow. > > Signed-off-by: Michal Simek > --- > drivers/tty/serial/uartlite.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c > index 5f90ef2..f55c342 100644 > --- a/drivers/tty/serial/uartlite.c > +++ b/drivers/tty/serial/uartlite.c > @@ -422,7 +422,7 @@ static void ulite_console_wait_tx(struct uart_port *port) > u8 val; > > /* Spin waiting for TX fifo to have space available */ > - for (i = 0; i < 100000; i++) { > + for (i = 0; i < 10000000; i++) { > val = uart_in32(ULITE_STATUS, port); > if ((val & ULITE_STATUS_TXFULL) == 0) > break; Ick, what happens next year when we get a faster cpu? Please make this a time delay, not a 'loop till we can count to this number', so we know exactly what is going on here. thanks, greg k-h