From: neilb@suse.de (NeilBrown)
To: linux-arm-kernel@lists.infradead.org
Subject: patch "tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA" added to tty tree
Date: Sat, 4 Feb 2012 13:31:01 +1100 [thread overview]
Message-ID: <20120204133101.1ab3500f@notabene.brown> (raw)
In-Reply-To: <EF62F09C0797D947AD4180A1043C0DF73492FFC3@DLEE10.ent.ti.com>
On Sat, 4 Feb 2012 00:23:09 +0000 "Woodruff, Richard" <r-woodruff2@ti.com>
wrote:
>
> > From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> > owner at vger.kernel.org] On Behalf Of NeilBrown
>
> > > Not sure if it's the same problem but with 3530 on 3.2 with
> > > sleep_timeout set, I usually get first char dropped (as expected) but
> > > sometimes I get corrupted char instead too. Corrupt char seems to
> > > almost always happen if I set cpufreq to powersave, on performace it's
> > > almost always ok, so maybe it's some timing problem,
> >
> > I see that too - I'm glad someone else does :-)
>
> When you have aggressive PM working at the SOC level you many times lost a character on UART every since OMAP2. A strange but true statement is it is nice to see it losing a character on mainline as it as in indication that PM is likely working.
>
> If you just hook up simple RX and TX lines and not other flow control it is very likely especially with older OMAPs you can lose the 'wake' character on debug console. The UART operates on a derived clock from a 96MHz DPLL which was probably stopped. When the wakeup event hits the IO ring many internals may need to repower and its source DPLL needs to relock. This all can take a while and you can lose the start bit at high baud rate. If you use flow control you might be able to get ahead of it.
So... if flow control is available, then when we idle the uart we should set
the trigger so that RTS is de-asserted as soon as one character arrives.
That would minimise the number of corrupt character we receive and ensure we
resync as early as possible (I have seen 2 corrupt characters when CR,NL
arrive back-to-back. Neither get through correctly).
Actually ... could we make the off-mode setting of the RTS pin be "ready to
send", but as soon as we wake up, it is reset to "don't send now" until
everything is properly awake and configured? That should ensure only one
byte is lost.
> Outside of debug console, this loss has not been huge. Protocols like irda would retransmit their magic wake packets. You can move between DMA and interrupt modes with activity. So far there has been a work around per attached device.
What about bluetooth? HCI/UART doesn't seem to have a lot of error
handling. Maybe it has enough though.
(I have bluetooth on UART1 ... of course we might not have the same problems
on UART1 .. I haven't played with bluetooth much yet).
Thanks for the insights,
NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120204/51a0d25d/attachment-0001.sig>
next prev parent reply other threads:[~2012-02-04 2:31 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <13274430881471@kroah.org>
2012-01-26 3:02 ` patch "tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA" added to tty tree Paul Walmsley
2012-01-26 4:21 ` Greg KH
2012-01-26 4:31 ` Paul Walmsley
2012-01-26 19:16 ` Greg KH
2012-01-26 19:34 ` Paul Walmsley
2012-02-02 20:03 ` Paul Walmsley
2012-02-02 20:22 ` Greg KH
2012-02-03 4:07 ` NeilBrown
2012-02-03 5:45 ` Paul Walmsley
2012-02-03 9:54 ` NeilBrown
2012-02-03 11:42 ` Grazvydas Ignotas
2012-02-03 12:11 ` NeilBrown
2012-02-03 19:49 ` Paul Walmsley
2012-02-03 20:34 ` Paul Walmsley
2012-02-03 21:42 ` Paul Walmsley
2012-02-03 22:10 ` NeilBrown
2012-02-03 22:30 ` Paul Walmsley
2012-02-04 0:23 ` Woodruff, Richard
2012-02-04 0:59 ` Paul Walmsley
2012-02-04 1:46 ` Woodruff, Richard
2012-02-04 2:39 ` Paul Walmsley
2012-02-04 2:31 ` NeilBrown [this message]
2012-02-07 1:00 ` Woodruff, Richard
2012-02-03 19:42 ` Paul Walmsley
2012-02-03 20:44 ` NeilBrown
2012-02-03 21:04 ` Paul Walmsley
2012-02-04 16:00 ` Grazvydas Ignotas
2012-02-04 16:31 ` Paul Walmsley
2012-02-04 16:57 ` Russell King - ARM Linux
2012-02-04 17:32 ` Paul Walmsley
2012-02-04 17:55 ` Russell King - ARM Linux
2012-02-04 19:37 ` Paul Walmsley
2012-02-05 12:16 ` Russell King - ARM Linux
2012-02-08 15:50 ` Paul Walmsley
2012-02-04 16:39 ` Russell King - ARM Linux
2012-02-04 16:49 ` Paul Walmsley
2012-02-04 16:55 ` Paul Walmsley
2012-02-04 17:01 ` Russell King - ARM Linux
2012-02-04 17:22 ` Paul Walmsley
2012-02-04 17:47 ` Russell King - ARM Linux
2012-02-04 18:59 ` Tony Lindgren
2012-02-04 19:24 ` Paul Walmsley
2012-02-04 20:07 ` Russell King - ARM Linux
2012-02-05 15:37 ` Woodruff, Richard
2012-02-05 16:03 ` Russell King - ARM Linux
2012-02-05 17:57 ` Woodruff, Richard
2012-02-06 23:58 ` NeilBrown
2012-02-07 1:13 ` Woodruff, Richard
2012-02-03 19:34 ` Paul Walmsley
2012-02-03 20:10 ` Paul Walmsley
2012-02-03 21:59 ` NeilBrown
2012-02-03 23:02 ` Paul Walmsley
2012-02-04 0:01 ` NeilBrown
2012-02-04 2:06 ` Paul Walmsley
2012-02-04 2:12 ` Paul Walmsley
2012-02-04 3:09 ` NeilBrown
2012-02-04 3:16 ` Paul Walmsley
2012-02-04 3:43 ` NeilBrown
2012-02-04 3:56 ` Paul Walmsley
2012-02-04 4:17 ` NeilBrown
2012-02-03 6:56 ` Govindraj
2012-02-03 12:07 ` NeilBrown
2012-02-03 12:20 ` Russell King - ARM Linux
2012-02-03 19:54 ` Paul Walmsley
2012-02-03 12:12 ` Felipe Contreras
2012-02-02 21:02 ` Greg KH
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=20120204133101.1ab3500f@notabene.brown \
--to=neilb@suse.de \
--cc=linux-arm-kernel@lists.infradead.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).