BeagleBone PRU DMA Summary
I had a chance to take part in GSoC 2017 for with a project for BeagleBoard.org foundation called "BeagleBone PRU DMA", whose purpose was to enable developers targeting BeagleBone/PRU platform usage of DMA transfers performed by the EDMA controller which is a part of BBB's SoC.
The project consists of 3 main parts, which all are developed in one GitHub repository under following link:
1st part is pru-dma library which is intended to be used in the code targetted for the PRU. It provides basic functionality enabling users configure and trigger DMA transfers from PRU. The library is located in the 'firmware' directory in the project repository.
2nd part is pru-dma kernel driver, which handles linux side part of DMA transfers - allocating and mapping buffers, presenting the configuration to PRU via firmware resource table, interrupt communication with PRU to provide synchronization.
Kernel driver was initially developed as a stand-alone out-of-tree driver, but when I integrated it with remoteproc framework I was forced to move it to kernel tree. To use it, kernel must be recomiled with patches which I provided in kernel-patch directory. Usage instructions are provided in the documentation.
3rd part are example applications.
I created 3 example applications making use of the pru-dma framework, which all consist of firmware part and kernel module. Each application is described in it's own directory. They are available in the 'examples' directory.
Documentation including build instructions and API description is available in the 'Documentation' directory.
The project was challenging for me and gave me an opportunity to learn about the BeagleBoard platform and it's intricacies. I also had a chance to better understand various parts of Linux kernel.
I think that main goals that were behind this project were met, but there are still areas for improvement. I think that user API could have richer functionality, and better examples could be provided for the project.
I intend to support this project in the future, taking care of the shortcommings and implementing additional features.
I would like to thank the mentors, BeagleBone.org foundation and Google for this great opportunity.