Thread (18 messages) 18 messages, 5 authors, 2012-09-26
STALE5002d

Re: [PATCH 3/3] serial: pl011: allow very high baudrates

From: Linus Walleij <hidden>
Date: 2012-09-26 08:06:04
Also in: linux-arm-kernel

On Tue, Sep 25, 2012 at 8:48 PM, Linus Walleij [off-list ref] wrote:
On Fri, Sep 21, 2012 at 9:56 PM, Alan Cox [off-list ref] wrote:
quoted
Caller passes BOTHER and actual bit rate - we return BOTHER and a bit
rate

Caller does not pass BOTHER (may not be TCGETS2 aware) we snap to the
nearest Bfoo rate if within 5% otherwise we return BOTHER based rates.
OK sorry for getting this backwards, so I was under the impression that
BOTHER was an internal detail of the TTY layer, not to be or:ed on
and passed in from the outside.
OK not I got it working thusly:

/*
 * Make sure the core will not snap baudrate to something
 * "close to" requested rate by setting the BOTHER
 * (baud rate other) flag.
 */
tty->termios->c_cflag &= ~CBAUD;
tty->termios->c_cflag |= BOTHER | (BOTHER >> IBSHIFT);
tty_encode_baud_rate(tty, baud, baud);

There are no in-kernel consumers doing this wicked thing so
mailing it here for reference.

Hope I got it right now...

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help