All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Korsgaard <jacmet@sunsite.dk>
To: monstr@monstr.eu
Cc: Grant Likely <grant.likely@secretlab.ca>, linux-serial@vger.kernel.org
Subject: Re: Uartlite - ulite_transmit
Date: Thu, 06 Jan 2011 10:49:37 +0100	[thread overview]
Message-ID: <87mxnegy4u.fsf@macbook.be.48ers.dk> (raw)
In-Reply-To: <4D25871D.2000408@monstr.eu> (Michal Simek's message of "Thu, 06 Jan 2011 10:10:53 +0100")

>>>>> "Michal" == Michal Simek <monstr@monstr.eu> writes:

Hi,

 >> But I still don't understand why you would want to burn CPU spinning
 >> when you know the UART will be busy for a while. Leaving it alone
 >> until it generates the TX fifo empty interrupt seems more logical to
 >> me.

 Michal> I didn't know when tx fifo was full and then empty interrupt is
 Michal> generated. I have added some debug things to driver and I am going to
 Michal> look into.

 Michal> I just changed return value and I have got correct output and
 Michal> then I sent this email to check if is correct or not.

According to the spec, you should get an interrupt when RX !empty or TX
empty.

We wouldn't ever be able to send more bytes than fits in the TX fifo if
it didn't.

 >> Yeah, that loop should probably be time based (and perhaps calculated
 >> from baud rate).

 Michal> It is hard to say if you can find out any accurate number of loops
 Michal> which is baud rate dependent.

Not loops, microseconds (or rather jiffies).

-- 
Bye, Peter Korsgaard

  reply	other threads:[~2011-01-06  9:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4D2465E0.2000707@monstr.eu>
2011-01-05 12:39 ` Uartlite - ulite_transmit Michal Simek
2011-01-06  7:56   ` Peter Korsgaard
2011-01-06  8:29     ` Michal Simek
2011-01-06  9:02       ` Peter Korsgaard
2011-01-06  9:10         ` Michal Simek
2011-01-06  9:49           ` Peter Korsgaard [this message]
2011-01-07  7:48             ` Michal Simek
2011-01-07  9:06               ` Michal Simek
     [not found]                 ` <4D2D78F3.2040903@monstr.eu>
     [not found]                   ` <87aaj6zays.fsf@macbook.be.48ers.dk>
     [not found]                     ` <4D2D8113.1020504@monstr.eu>
     [not found]                       ` <8739oyza2n.fsf@macbook.be.48ers.dk>
2011-01-16  9:08                         ` Michal Simek
2011-01-16  9:08                           ` Michal Simek
2011-01-16 21:02                           ` Peter Korsgaard
2011-01-17  6:35                             ` Michal Simek
2011-01-17 15:17                             ` Michal Simek
2011-01-19 15:27                               ` Peter Korsgaard
2011-01-20  8:04                                 ` Michal Simek
2011-01-20  8:06                                   ` Peter Korsgaard
2011-01-20  8:08                                     ` Michal Simek
2011-01-12  9:40               ` Peter Korsgaard

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=87mxnegy4u.fsf@macbook.be.48ers.dk \
    --to=jacmet@sunsite.dk \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-serial@vger.kernel.org \
    --cc=monstr@monstr.eu \
    /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.