Interfacing a user program to a custom driver
David.Wooff at calrec.com
Mon Dec 14 13:44:24 EST 2009
I am in the process of creating a driver to interface to a custom FPGA
on an in house AT91SAM9G20 board (based on the dev kit).
So far, I have created a driver module which at the moment doesn't do an
awful lot other than request the I/O memory region associated with the
chip select we are going to use. This has been compiled into the kernel
source tree and initialises by simply printing a message to say it has
acquired the I/O memory region.
Now I want to write a user program to access the FPGA in order to test
the interface. My question is: how do I compile this and what does it
actually link against i.e. do I simply add my driver module to the list
of objects in the makefile for my user program?
Is there a standard way to do this or could someone provide an example?
Also, I guess I am a bit confused as to where the boundary between the
user space and the kernel space actually is. I mean, if the interface
functions for the driver are in the driver module, then what stops the
application program from simply accessing the FPGA directly?
I have read "Linux Device Drivers" but it uses a char driver as the main
example so it doesn't help much in my case.
David Wooff <http://www.calrec.com/images/siglogo.gif>
Software Development Engineer
Tel: +44 (0)1422 842159
Fax: +44 (0)1422 845244
Email: david.wooff at calrec.com
Web: www.calrec.com <http://www.calrec.com/>
CALREC AUDIO LTD Nutclough Mill Hebden Bridge W Yorks HX7 8EZ
This electronic transmission is strictly confidential and intended solely for the addressee(s). If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this email. If you have received this email in error please notify the sender as soon as possible. Any views expressed within this email may not necessarily be the views held by Calrec Audio Ltd. Calrec Audio Ltd have taken measures to ensure this email is free from computer viruses, however it is recommended that you also employ anti-virus measures on your computer systems.
Calrec Audio Ltd. Registered in England. Registration number: 02392336. WEEE registration number: WEE/JE0051TQ/PRO. Registered address: Nutclough Mill, Hebden Bridge, West Yorks, HX7 8EZ.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the linux-arm