Interfacing a user program to a custom driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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.
 
Regards,
Dave W.
 
 
 
David Wooff
Software Development Engineer
 
Tel:  +44 (0)1422 842159
Fax:  +44 (0)1422 845244
Email:  david.wooff@xxxxxxxxxx
Web:  www.calrec.com
CALREC AUDIO LTD  Nutclough Mill  Hebden Bridge  W Yorks  HX7 8EZ  England
 

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.

_______________________________________________
linux-arm mailing list
linux-arm@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-arm

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter