From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
linux-serial@vger.kernel.org, torvalds@linux-foundation.org,
kernel@pengutronix.de
Subject: Re: Wrong GIT author ? also bugs: serial: Add uart driver for i.MX23/28
Date: Tue, 29 Mar 2011 10:33:35 +0100 [thread overview]
Message-ID: <20110329103335.7a5ff37d@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <20110329091456.GI30938@pengutronix.de>
> I don't understand how to do this and didn't find something like that in
> other drivers. (I checked amba-pl011.c and imx.c.) Also
> Documentation/serial/driver doesn't describe this. (It is also silent
> about CMSPAR and doesn't even advise to clear unsupported bits.)
> Can you be a bit more verbose here?
8250.c is the best place to look.
Basically on return from your routine the _hardware_ bits of the termios
struct should be the ones set.
So eg if you only supported 8bit characters you'd wipe the CSx bits and
set CS8.
For the speed there is a helper so you probably want
/* Don't rewrite B0 */
if (tty_termios_baud_rate(termios))
tty_termios_encode_baud_rate(termios, baud, baud);
> @@ -286,6 +283,9 @@ static void mxs_auart_settermios(struct uart_port *u,
> {
> u32 bm, ctrl, ctrl2, div;
> unsigned int cflag, baud;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&u->lock, flags);
Termios you don't need the lock - just the IRQ handler and you still
really want the tty_port_tty_get()/tty_kref_put() if that wasn't already
dealt with.
(You may not need it but its easier to put in than prove with the serial
layer at the moment)
next prev parent reply other threads:[~2011-03-29 9:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201103180302.p2I326tA020159@hera.kernel.org>
2011-03-18 11:29 ` Wrong GIT author ? also bugs: serial: Add uart driver for i.MX23/28 Alan Cox
2011-03-18 13:39 ` Sascha Hauer
2011-03-18 13:49 ` Alan Cox
2011-03-29 9:14 ` Uwe Kleine-König
2011-03-29 9:33 ` Alan Cox [this message]
2011-04-12 7:28 ` Uwe Kleine-König
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=20110329103335.7a5ff37d@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=u.kleine-koenig@pengutronix.de \
/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