From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: John Linn <John.Linn@xilinx.com>
Cc: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [PATCH] tty/serial: add support for Xilinx PS UART
Date: Wed, 20 Apr 2011 10:25:01 +0100 [thread overview]
Message-ID: <20110420102501.1e395f14@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <551928f1-72b8-432e-879e-8721b5c87414@VA3EHSMHS017.ehs.local>
> > > + /* Min baud rate = 6bps and Max Baud Rate is 10Mbps for 100Mhz
> > clk */
> > > + baud = uart_get_baud_rate(port, termios, old, 0, 460800);
> > > + xuartps_set_baud_rate(port, baud);
> >
> > So why pass 460800 ?
>
> Seems like 115200 is better number.
Well if it can do 10Mbit why not pass 10Mbit as the upper limit ?
> > And set the baud rate (see 8250.c for an example). Note that the
> helper
> > functions know about mapping slight errors so if you are asked for
> 9600
> > and the hardware does 9575 it will report B9600 as you'd expect not do
> > something crazy.
> >
>
> Sorry I didn't follow what you meant above. The h/w is a bit different
> with it's
> baud rate settings due to 2 different dividers.
After you've worked out what baud rate you actually set do
/* Don't rewrite B0 */
if (tty_termios_baud_rate(termios))
tty_termios_encode_baud_rate(termios, baud, baud);
which will ensure that the termios reflects the actual rate.
Alan
next prev parent reply other threads:[~2011-04-20 9:24 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-19 20:14 [PATCH] tty/serial: add support for Xilinx PS UART John Linn
2011-04-19 21:15 ` Alan Cox
2011-04-19 21:51 ` John Linn
2011-04-20 9:25 ` Alan Cox [this message]
2011-04-20 13:43 ` John Linn
2011-04-19 22:22 ` John Linn
2011-04-19 23:21 ` Greg KH
2011-04-19 23:39 ` John Linn
2011-04-19 23:42 ` Greg KH
2011-04-19 23:47 ` John Linn
2011-04-20 9:39 ` Alan Cox
2011-04-20 15:19 ` John Linn
2011-04-20 15:35 ` Alan Cox
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=20110420102501.1e395f14@lxorguk.ukuu.org.uk \
--to=alan@lxorguk.ukuu.org.uk \
--cc=John.Linn@xilinx.com \
--cc=linux-kernel@vger.kernel.org \
--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