<!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>&nbsp;</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.&nbsp; This&nbsp;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>&nbsp;</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.&nbsp; My 
question is: how do I compile this and what does&nbsp;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>&nbsp;</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>&nbsp;</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.&nbsp; 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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=534003618-14122009><FONT face=Arial size=2></FONT></SPAN>&nbsp;</DIV>
<DIV>&nbsp;</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>&nbsp;</SPAN></TD></TR>
  <TR>
    <TD><SPAN style="FONT-SIZE: 7pt; FONT-FAMILY: Arial">Tel:&nbsp;</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:&nbsp;</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:&nbsp;</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:&nbsp;</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>&nbsp; Nutclough Mill&nbsp; 
      Hebden Bridge&nbsp; W Yorks&nbsp; HX7 8EZ&nbsp; 
  England</SPAN></TD></TR></TBODY></TABLE></DIV>
<DIV>&nbsp;</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).&nbsp;If you are not the intended addressee, you must not disclose, copy or take any action in reliance of this email.&nbsp; If you have received this email in error please notify the sender as soon as possible.&nbsp;Any views expressed within this email may not necessarily be the views held by Calrec Audio Ltd.&nbsp; Calrec Audio Ltd have taken measures to ensure this email is free&nbsp;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:&nbsp;02392336. WEEE registration number: WEE/JE0051TQ/PRO. Registered address:&nbsp;Nutclough Mill, Hebden Bridge, West Yorks, HX7 8EZ. </FONT></P></BODY></HTML>