We are having issues with a Xenomai driver module for a UART chip. The UART chip is connected to our i.MX8MN SOC via ECSPI, and I have a Xenomai SPI driver for i.MX ECSPI. The stock NXP 'spi-imx' driver is configured out of the kernel.
The Xenomai SPI driver initializes successfully, and after boot there is a slave device node available in /dev/rtdm/spi1/slave1.0 When I modprobe the UART driver, its module_init routine opens the SPI device like this: fd = rtdm_open("/dev/rtdm/spi1/slave1.0", O_RDWR); which succeeds. But when the module init routine then tries to initialize the UART device through SPI, the rtdm_ioctl()/rtdm_read()/rtdm_write() calls fail. I have traced the cause to be that 'ipipe_root_p' is true. In cobalt/rtdm/fd.c, the service routines for ioctl/read/write check 'ipipe_root_p', and when true, calls the non-realtime driver ops. So, it seems that when loading a realtime driver module with modprobe, the init routine is not executing in realtime mode. Is there something special we need to do in the module init routine, in order to switch to realtime mode? Environment: - i.MX8MN eval board - MAX14830 Quad UART eval board - NXP BSP 2.3.3, kernel 5.4.70 - Xenomai 3.1.1 TIA, Niels Teledyne Confidential; Commercially Sensitive Business Data