02-21-2021 09:23 AM
I have been trying to get the AR65444 device driver for the XDMA IP working on a raspberry pi. (The new compute module 4 has a one lane PCI port available). AR65444 does say the code is only supported on x86. Some of the DMA example code works, but the register access using /dev/xdma0_control and /dev/xdma0_user was not accessing the correct memory region.
I have a candidate solution. The memory mapping is implemented in cdev_ctrl.c, function bridge_mmap() (around line 196) and it has 4 local variables
unsigned long off;
unsigned long phys;
unsigned long psize;
unsigned long psize;
on a raspberry pi, "unsigned long" is 32 bits. pci_resource_start() returns a 64 bit number, and that was being stored into phys. It those 4 local variables are resized to uint64_t, the access to the DMA registers and the axi4-lite bus works as expected.
I am posting this in the hope it is useful to someone. It was suggested that I should use a pull request, but I don't yet know how to do that!
02-25-2021 09:56 PM
Are you looking for XDMA driver support for ARM core?
It is not supported.
Regards
Praveen
02-26-2021 12:29 AM
No, I'm not looking for support. I'm aware that it isn't supported. My first post tells you the fix that it needed for the driver to work on at least one ARM implementation. I have posted it because it might help someone else.