<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2>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).</FONT></SPAN></DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2>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?</FONT></SPAN></DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2>Is there a standard
way to do this or could someone provide an example?</FONT></SPAN></DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2>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?</FONT></SPAN></DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=534003618-14122009></SPAN> </DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2>Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2>Dave
W.</FONT></SPAN></DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2></FONT></SPAN> </DIV>
<DIV> </DIV>
<DIV align=left>
<TABLE cellspacing=0 cellpadding=0 border=0>
<TBODY>
<TR>
<TD colspan=3 height=15>
<DIV style="BORDER-TOP: #00adef 1px solid"></DIV></TD></TR>
<TR>
<TD colspan=2><SPAN style="FONT-WEIGHT: bold; FONT-SIZE: 8pt; COLOR: #00adef; FONT-FAMILY: Arial">David
Wooff</SPAN></TD>
<TD align=right rowspan=6><IMG alt hspace=0 src="http://www.calrec.com/images/siglogo.gif" border=0></TD></TR></TR>
<TR>
<TD colspan=2><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">Software
Development Engineer<BR> </SPAN></TD></TR>
<TR>
<TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">Tel: </SPAN></TD>
<TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">+44 (0)1422
842159</SPAN></TD></TR>
<TR>
<TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">Fax: </SPAN></TD>
<TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">+44 (0)1422
845244</SPAN></TD></TR>
<TR>
<TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">Email: </SPAN></TD>
<TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">david.wooff@calrec.com</SPAN></TD></TR>
<TR>
<TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">Web: </SPAN></TD>
<TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial"><A style="COLOR: #000000; TEXT-DECORATION: none" href="http://www.calrec.com/">www.calrec.com</A></SPAN></TD></TR>
<TR>
<TD colspan=3 height=25><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial"><SPAN style="COLOR: #00adef">CALREC AUDIO LTD</SPAN> Nutclough Mill
Hebden Bridge W Yorks HX7 8EZ
England</SPAN></TD></TR></TBODY></TABLE></DIV>
<DIV> </DIV><!--[object_id=#calrec.com#]--><P><FONT face=Arial color=#808080 size=1>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.<BR>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. </FONT></P></BODY></HTML>