cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
suhas99hv
Participant
Participant
458 Views
Registered: ‎06-17-2020

PetaLinux device driver for a custom AXI peripheral

Jump to solution

I am using the ZYNQ ZCU102 SOC. I have a custom AXI peripheral on the PL and petalinux running on the PS. I am able to interact with the IP using the mmap system call(after opening /dev/mem). My task is to replace the call to mmap with a call to a custom device driver which would achieve the tasks of reading from and writing to the AXI peripheral. I have quite a few queries in this regard.

 

1) What is the method to initialize a pointer to a given physical address(the address of the slave port on the AXI peripheral) in the kernel mode?(since only virtual addresses are seen by the processor)

 

2) Is it necessary for the driver to implement the AXI protocol(since the slave interface it is interacting with expects communication as per the AXI protocol)? If so how is this achieved?

And is the existing driver implementing the AXI protocol?

 

3) Do I need to register a new device under /dev, say /dev/my_device, as /dev/mem is not going to be used now?

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
stephenm
Xilinx Employee
Xilinx Employee
321 Views
Registered: ‎09-12-2007

You should look at one of the more trivial drivers here as a reference:

https://github.com/Xilinx/linux-xlnx/blob/master/drivers/gpio/gpio-xilinx.c

 

View solution in original post

0 Kudos
1 Reply
stephenm
Xilinx Employee
Xilinx Employee
322 Views
Registered: ‎09-12-2007

You should look at one of the more trivial drivers here as a reference:

https://github.com/Xilinx/linux-xlnx/blob/master/drivers/gpio/gpio-xilinx.c

 

View solution in original post

0 Kudos