Re: [PATCH] tty/serial: add support for Xilinx PS UART

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > > +	/* 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
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux