[PATCH v3 0/1] Enable baud rate selection for zynq uart
Jan.Sommer at dlr.de
Jan.Sommer at dlr.de
Fri Mar 5 18:00:42 UTC 2021
Thanks. To be honest, I wasn’t really sure what to do with B0 since there aren’t any modem control lines.
I just grepped for B0 and looked what other BSPs are doing and they do nothing, so I copied that to have at least common behavior among RTEMS.
From: Joel Sherrill <joel at rtems.org>
Sent: Friday, March 5, 2021 6:54 PM
To: Sommer, Jan <Jan.Sommer at dlr.de>
Cc: rtems-devel at rtems.org <devel at rtems.org>
Subject: Re: [PATCH v3 0/1] Enable baud rate selection for zynq uart
On Fri, Mar 5, 2021 at 11:42 AM Jan Sommer <jan.sommer at dlr.de<mailto:jan.sommer at dlr.de>> wrote:
- Make sure the baud registers are not modified for baud rate B0
B0 is an odd bird. It indicates hang up. From https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/functions/tcsetattr.html:
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.
- 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.
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(-)
devel mailing list
devel at rtems.org<mailto:devel at rtems.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel