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

Kinsey Moore (@opticron) gitlab at rtems.org
Fri Jul 5 21:32:15 UTC 2024




Kinsey Moore commented on a discussion on bsps/arm/raspberrypi/include/bsp/raspberrypi-pl011.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_108736

 > +#include <dev/serial/arm-pl011-regs.h>
 > +#include <dev/serial/arm-pl011.h>
 > +#include <rtems/termiostypes.h>
 > +
 > +typedef struct {
 > +  pl011_base PL011;
 > +  uint32_t reserved_4c[14];
 > +  uint32_t uartitcr;
 > +  uint32_t uartitip;
 > +  uint32_t uartitop;
 > +  uint32_t uarttdr;
 > +} raspberrypi_uart;
 > +
 > +typedef struct {
 > +  arm_pl011_context pl011_ctx;
 > +} raspberrypi_pl011_context;

Does this mean the current patch is incomplete? The issue I'm bringing up is that the `raspberrypi_pl011_context` structure only exists to provide an accessor for the `arm_pl011_context`. That part of this patch is essentially a no-op as the outer context is never used or passed to any other function.

BSPs that use the base implementation don't need the wrapper struct at all and can just use the base struct directly.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/47#note_108736
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/20240705/594a4d76/attachment-0001.htm>


More information about the bugs mailing list