All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Cano" <ccano@interfaceconcept.com>
To: linux-pci@vger.kernel.org
Subject: Question: how can I get the real PCI address of a BAR?
Date: Fri, 28 Dec 2012 10:36:17 +0100	[thread overview]
Message-ID: <50DD6811.7020301@ic.fr> (raw)

Hi,

I'm writing a driver for a DMA engine on the PCI bus. My architecture is 
a 36-bit PowerPC (MPC85xx).

In my DMA driver, I want to configure the DMA to transfer data to/from a 
PCI device.
I get the PCI address of the device BAR with the command pci_resource_start.
This address is 36-bit but the PCI BAR of the device is 32-bit: I can't 
use the 36-bit address to run the DMA.

In kernel documentations, it's advised not to directly read the BAR.

Is there a function which provides the real PCI address i.e. the one 
stored in the BAR?

Thanks.

C. Cano




             reply	other threads:[~2012-12-28 14:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28  9:36 Cédric Cano [this message]
2012-12-30 19:46 ` Question: how can I get the real PCI address of a BAR? Bjorn Helgaas
2013-01-03  8:58   ` Cédric Cano

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=50DD6811.7020301@ic.fr \
    --to=ccano@interfaceconcept.com \
    --cc=linux-pci@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.