11-17-2009 02:49 AM
I'm working with open source Embedded Linux from Xilinx Wikidot. I'm using xapp1129 project as my reference design. I have already been able to load this project over my board (ML507). Now I want to write a user application to control the pcore (locallink example core) through the given driver.
Could anyone tell me how to use a Linux driver? It would be nice if someone could show me a simple code example.
P.S. I have been reading about the GPIO driver and the user application from Wikidot but I get confused since the user application doesn't use the GPIO functions that appears in xilinx_GPIO.c located in the Linux tree.
11-17-2009 09:05 AM
11-17-2009 02:41 PM
Linux drivers are accessed by user applications through the file system. Special files in the /dev directory are opened/accessed by the application. Ordiary file IO operations (open, close, read, write) result in the driver code being called.
Linux Device Drivers, Corebet, Rubini, Kroah-Hartman, O'Reilly Press
Linux Kernel Development, Robert Love, Novell Press
11-18-2009 01:32 AM
11-18-2009 07:18 AM
For example, here is a driver for some xilinx-specific hardware - it's one of the more generic examples of a device-tree character driver out there.