lkml.org 
[lkml]   [2008]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [newb] mmap pci
On Wed, 16 Apr 2008 07:23:29 -0400
Neal Becker <ndbecker2@gmail.com> wrote:

> We have a device - an FPGA board on PCI bus. It has a range of
> internal memory mapped to PCI. I want to expose this to user via
> mmap. Is there some example code someone could point me to?
>
> If this is not the best forum for such questions, what would be a
> better choice?

Hi,

if it's just a PCI bar, you can already memory map it without even writing a driver!
You can just use the sysfs files for this, for example
/sys/devices/pci0000:00/0000:00:02.0/resource1

There's also a way to do this via the /proc representation of the PCI device..

Greetings,
Arjan van de Ven


--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


\
 
 \ /
  Last update: 2008-04-16 15:55    [W:0.042 / U:0.636 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site