cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
laurencebarker
Participant
Participant
349 Views
Registered: ‎05-27-2018

XDMA Device driver (AR65444) fix for ARM

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!

 

2 Replies
pvenugo
Moderator
Moderator
267 Views
Registered: ‎07-31-2012

@laurencebarker ,

Are you looking for XDMA driver support for ARM core?

It is not supported.

 

Regards

Praveen


-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
laurencebarker
Participant
Participant
250 Views
Registered: ‎05-27-2018

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.