public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [query] how to use "ranges" in device tree
Date: Fri, 17 Apr 2015 11:38:45 +0200	[thread overview]
Message-ID: <3074482.0e1L0iyh9V@wuerfel> (raw)
In-Reply-To: <20150417164546.3925eb7c@xhacker>

On Friday 17 April 2015 16:45:46 Jisheng Zhang wrote:
> > 
> > A nicer (but a little more complicated) way to do this would be to use
> > #address-cells=<2> in the parent bus and use that to enumerate the
> 
> In this way, we need to change all device nodes' "reg" in arch/arm/boot/dts/berlin2q.dtsi?

Correct

> And in arm64 case, we should use #address-cells=<3>?

It depends: if any of the address spaces within are 64-bit wide, yes, otherwise
you can make the virtual spaces just 2-cell wide.

> If above two answer is yes, setting "ranges = <..>" seems add complexity in my
> humble opinion. So is it better to use 1:1 mapping by "ranges;" in "/soc" node?
 
I agree, it gets a little awkward at that point. A better solution here would
be to take the PCI node out of /soc and move it to the root node. This has
the slight downside that you end up with registers being part of /soc and /pci,
but that's perfectly legal.

	Arnd

  reply	other threads:[~2015-04-17  9:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 13:59 [query] how to use "ranges" in device tree Jisheng Zhang
2015-04-16 22:59 ` Jaehoon Chung
2015-04-17  2:24   ` Jisheng Zhang
2015-04-17  3:50     ` Jisheng Zhang
2015-04-17  8:32       ` Arnd Bergmann
2015-04-17  8:45         ` Jisheng Zhang
2015-04-17  9:38           ` Arnd Bergmann [this message]
2015-04-17  8:38       ` Sebastian Hesselbarth
2015-04-17  8:51         ` Jisheng Zhang

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=3074482.0e1L0iyh9V@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox