All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Michal Simek <michal.simek@xilinx.com>,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	arnd@arndb.de, Peter Korsgaard <jacmet@sunsite.dk>,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	Jiri Slaby <jslaby@suse.cz>
Subject: Re: [RFC PATCH] tty: serial: uartlite: Extend time for sending chars through mdm IP
Date: Mon, 30 Sep 2013 16:28:02 +0200	[thread overview]
Message-ID: <52498A72.3080609@monstr.eu> (raw)
In-Reply-To: <20130930125433.GC13654@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 1703 bytes --]

On 09/30/2013 02:54 PM, Greg Kroah-Hartman wrote:
> On Mon, Sep 30, 2013 at 01:50:35PM +0200, Michal Simek wrote:
>> From: Michal Simek <monstr@monstr.eu>
>>
>> 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 <michal.simek@xilinx.com>
>> ---
>>  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?

I will start to celebrate because 150MHz is not enough. :-)

> 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.

But seriously, I will look at this change and will try to find out
the slowest and the fastest hw to test this.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

      reply	other threads:[~2013-09-30 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30 11:50 [RFC PATCH] tty: serial: uartlite: Extend time for sending chars through mdm IP Michal Simek
2013-09-30 12:54 ` Greg Kroah-Hartman
2013-09-30 14:28   ` Michal Simek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52498A72.3080609@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=arnd@arndb.de \
    --cc=grant.likely@secretlab.ca \
    --cc=gregkh@linuxfoundation.org \
    --cc=jacmet@sunsite.dk \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=rob.herring@calxeda.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.