RTEMS | dev/serial: Refactor the pl011 driver to be extensible (!47)

Kinsey Moore (@opticron) gitlab at rtems.org
Tue Aug 27 17:36:29 UTC 2024




Kinsey Moore commented on a discussion on bsps/shared/dev/serial/arm-pl011.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111529

 > +
 > +  /* Control: Re-enable UART */
 > +  cr |= PL011_UARTCR_UARTEN | PL011_UARTCR_TXE;
 > +
 > +  return cr;
 > +}
 > +
 > +static bool arm_pl011_set_attributes(
 > +  rtems_termios_device_context *base,
 > +  const struct termios *term
 > +)
 > +{
 > +  uint32_t ibrd, fbrd, lcrh, baud, cr;
 > +  int err;
 > +  arm_pl011_context *context = (arm_pl011_context *) base;
 > +  arm_pl011_uart *regs = arm_pl011_get_regs(base);

@gedare I would argue that anything that represents memory-mapped registers should always be marked as volatile to avoid cases where volatile needs to get applied and it's forgotten. You seem to suggest otherwise in https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111073

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_111529
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/20240827/e8c4bceb/attachment-0001.htm>


More information about the bugs mailing list