All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: linux-kernel@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org,
	Rob Herring <rob.herring@calxeda.com>
Subject: Re: [PATCH] of: When constructing the bus id consider assigned-addresses as well
Date: Fri, 30 Nov 2012 09:48:05 +0000	[thread overview]
Message-ID: <20121130094806.0D6D73E070C@localhost> (raw)
In-Reply-To: <20121129193829.GA10145@obsidianresearch.com>

On Thu, 29 Nov 2012 12:38:29 -0700, Jason Gunthorpe <jgunthorpe@obsidianresearch.com> wrote:
> On Thu, Nov 29, 2012 at 04:26:48PM +0000, Grant Likely wrote:
> 
> > Hmmm. okay that makes sense, but something still isn't quite right. So
> > of_translate_address should take care of drilling down through the bus
> > layers, and when it gets to the PCI node it /should/ use
> > of_bus_pci_translate to handle traversing down to the parent node (which
> > uses the 'assigned-addresses' for the pci node.
> 
> The address translation machinery requires PCI format addresses (ie
> address-cells=3) for all nodes below a PCI bus. Part of this
> requirement is that 'assigned-addresses' is used for resources, *not*
> 'reg'.
> 
> If you attempt to stick a 'reg' in a block nested below a
> 'device_type="pci"' the kernel throws lots of error messsages and
> generates bad address mappings.

Have you added the appropriate #address-cells and #size-cells to the pci
device node to go back to a non-pci addressing mode? assigned-addresses
only makes sense in the pci-device node itself. reg should work for all
nodes below that, and if it doesn't then it is a bug that we need to
fix.

g.

  reply	other threads:[~2012-11-30  9:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 21:02 [PATCH] of: When constructing the bus id consider assigned-addresses as well Jason Gunthorpe
2012-11-26 14:03 ` Grant Likely
2012-11-26 18:20   ` Jason Gunthorpe
2012-11-29 16:26     ` Grant Likely
2012-11-29 19:38       ` Jason Gunthorpe
2012-11-30  9:48         ` Grant Likely [this message]
2012-12-01  0:49           ` Jason Gunthorpe
2012-12-03 14:27             ` Grant Likely

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=20121130094806.0D6D73E070C@localhost \
    --to=grant.likely@secretlab.ca \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.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 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.