From: Sanka Piyaratna <sanka@solinnov.com.au>
To: linux-kernel@vger.kernel.org
Subject: Custom PCIe Device Driver
Date: Sat, 26 Jan 2008 23:40:23 +1030 [thread overview]
Message-ID: <479B313F.7050406@solinnov.com.au> (raw)
Hi Everyone,
I am currently developing a custom PCIe device and the Linux kernel
driver for this. I am able to use the device as a character device with
PIO and now I am working on getting the DMA to work. I have implemented
2 BARs (BAR0 - mem and BAR5 - mem) in the PCIe device. I have
implemented the DMA in my custom device firmware to transfer a block of
memory via the PCIe bus and now trying to get this to work with the
device driver.
As I understand it, I can get hold of the PCI bus to become the bus
master and then initiate the DMA transfer from my device. However, I
don't understand how I can specify within my kernel driver how to
specify which BAR to use.
Does this mean when I initiate a transfer from the hardware, the memory
get transferred into the location allocated by by pci_map_single()
function regardless of which BAR the memory comes from? or do I need to
specify the BAR using a mask?
Would some one be able to point me to an example code please?
Thanks and Regards,
Sanka
next reply other threads:[~2008-01-26 13:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-26 13:10 Sanka Piyaratna [this message]
[not found] <fa.lEecbnbm5VCSz+Y6rXCe4LJLkqw@ifi.uio.no>
2008-01-27 1:46 ` Custom PCIe Device Driver Robert Hancock
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=479B313F.7050406@solinnov.com.au \
--to=sanka@solinnov.com.au \
--cc=linux-kernel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.