From: Arjan van de Ven <arjan@infradead.org>
To: Neal Becker <ndbecker2@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [newb] mmap pci
Date: Wed, 16 Apr 2008 06:52:17 -0700 [thread overview]
Message-ID: <20080416065217.22691d34@laptopd505.fenrus.org> (raw)
In-Reply-To: <fu4njh$4aa$1@ger.gmane.org>
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
next prev parent reply other threads:[~2008-04-16 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-16 11:23 Neal Becker
2008-04-16 13:52 ` Arjan van de Ven [this message]
2008-04-17 12:30 ` Neal Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080416065217.22691d34@laptopd505.fenrus.org \
--to=arjan@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ndbecker2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®