I am using Angstrom running on DE1-SoC with kernel 3.10. I am trying to do a kernel module to perform data transfers from application on user space to a FPGA memory. I understand that:
I can use character device driver API and copy_from_user() to copy the buffer from the app to the module.
I can use platform device API to find address and properties of PL330 in device tree.
I can use DMA-engine API or PL330.c to communicate with the PL330 DMAC and perform the transfers.
Up to now the device driver API is working nicely. There are plenty examples on that. Regarding the platform device I cannot do the binding with PL330. I can see the device entry for the DMAC. Doing cat /prc/device-tree/sopc@/dma@ffe01000/compatible it gives “arm,pl330-14.1arm,pl330arm,primecell” as answer. Its like if the 3 strings in dts are compressed to only one. Regarding the control of the DMAC I can only find Altera examples on DMA-engine for DMACs in the FPGA. I have found for Zynq examples using DMA-engine and directly pl330.h. None of the 4 or 5 I tried compile because some file is always different missing macros or functions.
I would appreciate any help on these questions:
Is there any Altera example on binding PL330 or using DMA-engine???
Which are the restrictions regarding the OS? Should I switch on DMA options when compiling OS? How can I find wich files to use (DMA-engine or pl330.h).