I am working on a Zynq-7000 working with Yocto and trying to expose a DMA controller (AXI DMA IP block operating in an FPGA matrix) in a Linux user space.
In the simple case, the DMA controller has a memory capacity of 0x60 bytes and usually a start address of 0x40400000. In this range are registers for reading and writing control, where:
- 0x40400000 → 0x4040002F memory read control.
- 0x40400030 → 0x4040005F memory write control.
The DMA controller has two interrupts: one for reading and writing.
Attempt 1:
I managed to use uio-pdrv-genirq to expose this memory in user space, but I can only enable one interrupt. Even if I add a second interrupt to the device tree, the driver simply ignores it (which is also seen from reading the driver code).
Even if I could register a second interrupt by changing the driver, AFAICT would not be able to tell from the user space that the interrupt was triggered, so access must still be serialized.
Attempt 2:
To get around this, I tried adding two devices to the device tree. One device for managing readings with its own interruption and one device for managing readings with its own interruption. I installed them compatible with the uio-pdrv-genirq driver. Then I set the memory spaces:
- : 0x40400000; : 0x30; .
- : 0x40400030; : 0x30; .
, .
mmap , , 0x1000 ( ).
, (, , ) , ?