RTEMS | bsps/zynq-uart: fix parity configuration handling (!1212)

Kinsey Moore (@opticron) gitlab at rtems.org
Tue May 5 23:17:54 UTC 2026




Kinsey Moore started a new discussion on bsps/shared/dev/serial/zynq-uart.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1212#note_149528

 >     */
 >    mode |= ZYNQ_UART_MODE_CHMODE(ZYNQ_UART_MODE_CHMODE_NORMAL);
 >  
 > -  /*
 > -   * Parity
 > -   */
 > -  mode |= ZYNQ_UART_MODE_PAR(ZYNQ_UART_MODE_PAR_NONE);
 > -  if (term->c_cflag & PARENB) {
 > -    if (!(term->c_cflag & PARODD)) {
 > -      mode |= ZYNQ_UART_MODE_PAR(ZYNQ_UART_MODE_PAR_ODD);
 > -    } else {
 > -      mode |= ZYNQ_UART_MODE_PAR(ZYNQ_UART_MODE_PAR_EVEN);
 > -    }
 > +  /* Clear parity bits first */
 > +  mode &= ~ZYNQ_UART_MODE_PAR_MASK;

There is no need to clear these bits. All bits except for ZYNQ_UART_MODE_CLKS are cleared on assignment above and only the CHMODE bits are added back, so the PAR bits are guaranteed clear.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1212#note_149528
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260505/36c09de7/attachment-0001.htm>


More information about the bugs mailing list