[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b744d309-dbb5-44d4-9d51-98e50970c2a2@VA3EHSMHS018.ehs.local>
Date: Wed, 20 Apr 2011 07:43:29 -0600
From: John Linn <John.Linn@...inx.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
CC: <linux-kernel@...r.kernel.org>, <linux-serial@...r.kernel.org>
Subject: RE: [PATCH] tty/serial: add support for Xilinx PS UART
> -----Original Message-----
> From: Alan Cox [mailto:alan@...rguk.ukuu.org.uk]
> Sent: Wednesday, April 20, 2011 3:25 AM
> To: John Linn
> Cc: linux-kernel@...r.kernel.org; linux-serial@...r.kernel.org
> Subject: Re: [PATCH] tty/serial: add support for Xilinx PS UART
>
> > > > + /* 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 ?
The only reason would be because we don't test it, but yes that could be
done.
>
> > > 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.
Thanks for clarifying, I'll look at that.
-- John
>
> Alan
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists