How-to
How-to
Draft v3.0
Alex He ([email protected])
The design show how to implement the UIO module in project.
Git: https://gitenterprise.xilinx.com/AlexHe/UIO_Linux_Demo
Prerequisites
- Vivado 2017.2
- Petalinux 2017.2
- ZCU102 EVB final v1.0
STEP
Address Map
Test
Boot to kernel with uio_pdrv_genirq.ko auto loaded. The /dev/uiox has been created.
Switch each DIP0(SW13.8) and DIP2(SW13.6) one time to trigger the interrupts.
Refer to https://01.org/linuxgraphics/gfx-docs/drm/driver-api/uio-howto.html
So do the enable IRQ by “echo 0x1 > /dev/uioX” (write system call which trigger the irqcontrol) after each time the interrupt
triggered by the DIP switch. The two DIP UIO is /dev/uio1 and /dev/uio2 in kernel.
pin-uio-test.c pin-uio-test
gpio-uio-test.c gpio-uio-test
This test application mmap out the registers from hardware to user space. Then enable all the IRQ bits in GIER and IP_IER
registers and dump out all the registers’ values. Please refer to pg144-axi-gpio.pdf for the IP.
Reference
https://01.org/linuxgraphics/gfx-docs/drm/driver-api/uio-howto.html
[Xilinx]
http://www.wiki.xilinx.com/GIC
https://github.com/wowotechX/u-boot/tree/x_integration/doc/uImage.FIT
http://www.wiki.xilinx.com/U-Boot+Images
PG144 - axi-gpio
Questions: