Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using xilinx_axidma driver in Petalinux 2022 and Linux Kernel Version 5.15.19 #144

Open
SuryaDurairaj opened this issue Nov 17, 2022 · 1 comment

Comments

@SuryaDurairaj
Copy link

Hi,
I am trying to use the xilinx_axidma driver in Latest Petalinux 2022 version and Linux kernel version 5.15.19 ,
since the driver was tested with 4.x kernel version I am getting the below errors when I compile the driver in Linux kernel version 5.x , do you have driver files with support for kernel version 5.x r can you suggest the changes I need to make for this to work.

make -C /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source M=/home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0
| make[1]: Entering directory '/home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source'
| make[2]: Entering directory '/home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-build-artifacts'
| CC [M] /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axi_dma.o
| CC [M] /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.o
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c: In function 'axidma_mmap':
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c:277:5: error: too few arguments to function 'of_dma_configure'
| 277 | of_dma_configure(dev->device, NULL);
| | ^~~~~~~~~~~~~~~~
| In file included from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c:24:
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/of_device.h:53:19: note: declared here
| 53 | static inline int of_dma_configure(struct device *dev,
| | ^~~~~~~~~~~~~~~~
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c: In function 'axidma_access_ok':
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c:329:56: error: macro "access_ok" passed 3 arguments, but takes just 2
| 329 | if (!readonly && !access_ok(VERIFY_WRITE, arg, size)) {
| | ^
| In file included from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/uaccess.h:11,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/sched/task.h:11,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/sched/signal.h:9,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/rcuwait.h:6,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/percpu-rwsem.h:7,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/fs.h:33,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c:19:
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/arch/arm/include/asm/uaccess.h:252: note: macro "access_ok" defined here
| 252 | #define access_ok(addr, size) (__range_ok(addr, size) == 0)
| |
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c:329:23: error: 'access_ok' undeclared (first use in this function)
| 329 | if (!readonly && !access_ok(VERIFY_WRITE, arg, size)) {
| | ^~~~~~~~~
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c:329:23: note: each undeclared identifier is reported only once for each function it appears in
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c:333:49: error: macro "access_ok" passed 3 arguments, but takes just 2
| 333 | } else if (!access_ok(VERIFY_READ, arg, size)) {
| | ^
| In file included from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/uaccess.h:11,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/sched/task.h:11,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/sched/signal.h:9,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/rcuwait.h:6,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/percpu-rwsem.h:7,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/include/linux/fs.h:33,
| from /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axidma_chrdev.c:19:
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work-shared/zynq-generic/kernel-source/arch/arm/include/asm/uaccess.h:252: note: macro "access_ok" defined here
| 252 | #define access_ok(addr, size) (__range_ok(addr, size) == 0)
| |
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axi_dma.c:97:34: error: array type has incomplete element type 'struct of_device_id'
| 97 | static const struct of_device_id axidma_compatible_of_ids[] = {
| | ^~~~~~~~~~~~~~~~~~~~~~~~
| /home/surya/petalinux/petalinux-project/LinuxProject/build/tmp/work/zynq_generic-xilinx-linux-gnueabi/xilinx-axidma/1.0-r0/axi_dma.c:97:34: warning: 'axidma_compatible_of_ids' defined but not used [-Wunused-variable]

@huangq256
Copy link

you can follow pull request#139 https://github.com/bperez77/xilinx_axidma/pull/139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants