Results 1 to 3 of 3
Hi,
I have to develop a driver for a custom FPGA we are developing. I'm cross compiling for an ARM processor (AT91SAM9G20 using uCLinux 2.6.30), but I think my question ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-15-2009 #1Just Joined!
- Join Date
- Dec 2009
- Posts
- 4
Interfacing to custom driver module
Hi,
I have to develop a driver for a custom FPGA we are developing. I'm cross compiling for an ARM processor (AT91SAM9G20 using uCLinux 2.6.30), but I think my question applies to Linux drivers generally.
I can compile and run a simple driver module (built-in to the kernel tree) which does nothing more than to printk a message. Now I want to write some interface routines to allow my application to communicate with the FPGA. I have to initially load the FPGA and then read and write to registers.
Where do I put these interface routines? In the driver module itself? And, how do I compile the module to allow the application to link to the interface routines.
Am I looking at this in the wrong way altogether?
I have done some background reading (mainly the first half of Linux Device Drivers by Corbet).
Thanks.
- 12-16-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 10,144
More kernel module interfacing is via ioctl calls, though you can also implement standard I/O functions such as read(), write(), open(), etc. As I have mentioned many times in the past, there is adequate documentation how to do this at:
The Linux Documentation Project
The Linux Kernel Archives
There are also some free downloadable, but normally commercial, books on the subject of Linux kernel module development. O'Reilly has some that are quite useful.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 12-16-2009 #3Just Joined!
- Join Date
- Dec 2009
- Posts
- 4
OK, thanks.
Yes, I've been reading Linux Device Drivers and things are gradually beginning to make some sense. As for documentation, fair enough, but it's not always obvious to newbies where the documents are to be found and not always obvious what search terms to use, which is why people like you are really useful to have around


Reply With Quote
