From: Michal Simek <monstr@monstr.eu>
To: Peter Korsgaard <jacmet@sunsite.dk>
Cc: Grant Likely <grant.likely@secretlab.ca>, linux-serial@vger.kernel.org
Subject: Re: Uartlite - ulite_transmit
Date: Thu, 06 Jan 2011 09:29:21 +0100 [thread overview]
Message-ID: <4D257D61.2060400@monstr.eu> (raw)
In-Reply-To: <87vd22h3dq.fsf@macbook.be.48ers.dk>
Peter Korsgaard wrote:
>>>>>> "Michal" == Michal Simek <monstr@monstr.eu> writes:
>
> Michal> Hi Peter, [cc: Grant]
> Michal> I have found one thing which I would like to check with you.
> Michal> It is about mdm console which is uartlite compatible but it is slow.
> Michal> The problem which I think it is there is in ulite_transmit function if
> Michal> TXFULL is reported then it was returned 0. ulite_transmit is called from
> Michal> do-while loop in ulite_isr (shown below).
>
> Michal> do {
> Michal> int stat = readb(port->membase + ULITE_STATUS);
> Michal> busy = ulite_receive(port, stat);
> Michal> busy |= ulite_transmit(port, stat);
> Michal> } while (busy);
>
> Michal> If tx is full then loop ends but there could be a lot of characters
> Michal> which need to be send that's why will be good to wait a little bit. I
> Michal> think it could be done by returning 1 in that case.
>
> Michal> What do you think? Patch is below.
>
> That would make us spin in the interrupt for potentially quite a while,
> E.G. until all data is transferred to the TX fifo.
yep. That's truth but shouldn't be a problem for standard systems. Maybe
worth to count how many times is tx fifo full on standard systems.
>
> What kind of problem are you trying to fix in the first place? You
> should get an interrupt when the TX fifo empties, which fill completely
> fill up the fifo again and so on - That should work just fine even with
> a low baud rate.
I am trying to solve the problem for xilinx mdm IP (compatible with
uartlite) where there are some missing characters on serial console.
Maybe there is something wrong in different place but there are
definitely missing characters.
Just for the record: I also have to extend for loop in
ulite_console_wait_tx to get all chars for console.
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
next prev parent reply other threads:[~2011-01-06 8:29 UTC|newest]
Thread overview: 17+ 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 [this message]
2011-01-06 9:02 ` Peter Korsgaard
2011-01-06 9:10 ` Michal Simek
2011-01-06 9:49 ` Peter Korsgaard
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 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=4D257D61.2060400@monstr.eu \
--to=monstr@monstr.eu \
--cc=grant.likely@secretlab.ca \
--cc=jacmet@sunsite.dk \
--cc=linux-serial@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).