<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div><div>I have started this mail thread for discussions regarding the addition of DMA in the RTEMS Mailine for RPI and subsequently being used by other peripherals including SPI and I2C <br><br>The present implementation of the SPI uses the libi2c API and the present I2C implementation used the Linux I2C userspace API. <br><br></div>For adding DMA to RTEMS Mailine I'm presently thinking of providing the following API interface <br>int bcm_dma_allocate(int req_ch);<br>int bcm_dma_free(int ch);<br>int bcm_dma_setup_intr(int ch, void (*func)(int, void *), void *arg);<br>int bcm_dma_setup_src(int ch, int dreq, int inc_addr, int width);<br>int bcm_dma_setup_dst(int ch, int dreq, int inc_addr, int width);<br>int bcm_dma_start(int ch, vm_paddr_t src, vm_paddr_t dst, int len);<br>uint32_t bcm_dma_length(int ch);<br><br></div>following the DMA driver in FreeBSD. From browsing the code, the major change will be to useĀ  <i>BCM2835_REG </i>instead of the <i>bus</i> functions. This API can then be used in both SPI and I2C.<br><br></div>Is this an acceptable solution ? <br><br></div><div>This deliverable has to be tested on a peripherals for both SPI and I2C. It would be great if people could comment if they have some peripherals in mind. <br></div><div><br></div><div>For the SD card, I have uploaded the code that I have ported to github. However, I'm facing the similar issue as deval, not able to view the logs even after adding, rtems_bsd_setlogpriority("debug") in the init function.<br><br></div>Thanks <br></div>Mudit <br></div>