[PATCH v3 0/1] Enable baud rate selection for zynq uart

Joel Sherrill joel at rtems.org
Fri Mar 5 17:53:57 UTC 2021

On Fri, Mar 5, 2021 at 11:42 AM Jan Sommer <jan.sommer at dlr.de> wrote:

> v3:
> - Make sure the baud registers are not modified for baud rate B0

B0 is an odd bird. It indicates hang up. From

If the output baud rate stored in the *termios* structure pointed to by
*termios_p* is the zero baud rate, B0, the modem control lines shall no
longer be asserted. Normally, this shall disconnect the line.

If the input baud rate stored in the *termios* structure pointed to by
*termios_p* is 0, the input baud rate given to the hardware is the same as
the output baud rate stored in the *termios* structure.

Since we don't likely have any BSPs which have real modem control
lines on the serial ports, that usually means to ignore it so you don't
end up with a divide by 0 on the baud rate divisor calculations.

I'm not saying anything negative about your patches. Just that B0 is
a weird corner of POSIX and computing history.

> v2:
> - Use rtems_baud_to_number instead of duplicating baud table
> This patch allows to set the baud rate of the zynq-uart using the termios
> API.
> I could change the baud rate successfully on hardware using the termios
> application.
> Best regards,
>     Jan
> Jan Sommer (1):
>   bsps/shared: Allow setting baud rate for zynq uart
>  bsps/shared/dev/serial/zynq-uart.c | 21 ++++++++++++++++-----
>  1 file changed, 16 insertions(+), 5 deletions(-)
> --
> 2.17.1
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210305/6ea28ed0/attachment.html>

More information about the devel mailing list