From: Philippe Proulx <philippe.proulx@savoirfairelinux.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>,
linux-serial@vger.kernel.org,
Mark Jackson <mpfj-list@newflow.co.uk>,
linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com
Subject: [PATCH 0/2] serial: omap: improve performance for RS-485
Date: Wed, 23 Oct 2013 18:49:57 -0400 [thread overview]
Message-ID: <cover.1382567103.git.philippe.proulx@savoirfairelinux.com> (raw)
The current RS-485 implementation for the OMAP serial driver is to not
disable THR interrupts when the driver ring buffer becomes empty until
it makes sure the TX shift register is empty, which means the UART is
not transmitting anymore and only then can the driver toggle the GPIO
output pin for RS-485 data direction.
Since the UART TX FIFO trigger level is set to 32 characters (the
comment said 16, but it's really 32), this means there's a burst of IRQs
for the transmission time of 33 characters (which means at least 34 ms
at 9600 bauds, for example) since the TX FIFO is always below its
trigger level and the THR interrupts are not disabled. The driver is
essentially polling the status bit using interrupts during this time.
This patchset makes use of the TXEMPTYCTLIT bit of the SCR register
instead, which makes it possible to get a THR interrupt only when both
the TX FIFO and the TX shift register are empty. We only use this mode
if RS-485 is enabled.
This patchset also fixes a few minor coding style warnings from
checkpatch.pl.
The patches apply to tty/tty-next.
Philippe Proulx (2):
serial: omap: improve RS-485 performance
serial: omap: fix a few checkpatch warnings
drivers/tty/serial/omap-serial.c | 67 +++++++++++++++++++++++++++-------------
1 file changed, 46 insertions(+), 21 deletions(-)
--
1.8.4.1
next reply other threads:[~2013-10-23 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-23 22:49 Philippe Proulx [this message]
2013-10-23 22:49 ` [PATCH 1/2] serial: omap: improve RS-485 performance Philippe Proulx
2013-10-23 22:49 ` [PATCH 2/2] serial: omap: fix a few checkpatch warnings Philippe Proulx
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=cover.1382567103.git.philippe.proulx@savoirfairelinux.com \
--to=philippe.proulx@savoirfairelinux.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mpfj-list@newflow.co.uk \
/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).