linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 00/12] MBus device tree binding
Date: Tue, 18 Jun 2013 10:07:51 -0300	[thread overview]
Message-ID: <20130618130750.GB25416@localhost> (raw)
In-Reply-To: <51C04591.3010206@gmail.com>

Hi Sebastian,

On Tue, Jun 18, 2013 at 01:33:37PM +0200, Sebastian Hesselbarth wrote:
> On 06/18/13 13:25, Ezequiel Garcia wrote:
> > In the example below there's an extract of a device tree showing how
> > the internal-regs and pcie nodes can be represented:
> >
> > 	#define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16))
> >
> > 	soc {
> > 		compatible = "marvell,armadaxp-mbus";
> > 		reg = <0 0xd0020000 0 0x100>, <0 0xd0020180 0 0x20>;
> >
> > 		ranges = <0xffff0001 0 0 0xd0000000 0x100000   /* internal-regs */
> > 			  0xffff0000 0 0 0xe0000000 0x8100000  /* pcie */
> > 			  MBUS_ID(0x01, 0x1d) 0 0 0xfff00000 0x100000
> > 			  MBUS_ID(0x01, 0x2f) 0 0 0xf0000000 0x8000000>;
> 
> Ezequiel,
> 
> you should update PCIE above (and possibly anywhere else) too.
> 

Right. I've just checked and I only forgot to update the PCIe first-cell
(0xffff0000 -> 0xffff0002) in this cover-letter. The device tree files 
and the documentation look correct.

Sorry for the confusion!

> > 		pcie-controller {
> > 			compatible = "marvell,armada-xp-pcie";
> > 			status = "okay";
> > 			device_type = "pci";
> >
> > 			#address-cells = <3>;
> > 			#size-cells = <2>;
> >
> > 			ranges =
> > 			       <0x82000000 0 0x40000 0xffff0001 0x40000 0 0x00002000   /* Port 0.0 registers */
> > 				0x82000000 0 0x42000 0xffff0001 0x42000 0 0x00002000   /* Port 2.0 registers */
> > 				0x82000000 0 0x44000 0xffff0001 0x44000 0 0x00002000   /* Port 0.1 registers */
> > 				0x82000000 0 0x48000 0xffff0001 0x48000 0 0x00002000   /* Port 0.2 registers */
> > 				0x82000000 0 0x4c000 0xffff0001 0x4c000 0 0x00002000   /* Port 0.3 registers */
> > 				0x82000000 0 0x80000 0xffff0001 0x80000 0 0x00002000   /* Port 1.0 registers */
> > 				0x82000000 0 0x82000 0xffff0001 0x82000 0 0x00002000   /* Port 3.0 registers */
> > 				0x82000000 0 0xe0000000 0xffff0000 0 0 0x08000000   /* non-prefetchable memory */
> > 				0x81000000 0 0 0xffff0000 0x8000000 0 0x00100000>; /* downstream I/O */
> 
> Here for example.
> 
> > Changes from v2:
> >   * Replaced the PCIe mapping with 0xffff0002, to avoid using a representation
> >     that might correspond to a possible window id.
> 
> Out of curiosity, how will these fake mappings play with LPAE? If you
> extend possible address space to >32b the lower bits may belong to valid
> addresses.
> Maybe you can (already do?) ignore that because of the 32b address
> restriction for internal registers IIRC Thomas mentioned?
> 

That's a tricky question. The best explanation I can give you is that
these fake mappings belong to the MBus children address space, which is
different from the physical address space where LPAE comes into play.

This MBus children address space consists of two 32-bit cells:

IIAA00CC 00oooooo

The first one encodes the target ID and attribute in its upper 16 bits,
and custom values for the fake mappings in the lower 8 bits.
The second one encodes the offset into the MBus decoding window, and
this window can be as large as 4 GiB.

The address space I've just described is not the physical 64-bit address
space; it's the one where MBus children sit.

I hope I understood you're question, and I hope any of the above makes
sense!

-- 
Ezequiel Garc?a, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com

      reply	other threads:[~2013-06-18 13:07 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 11:25 [PATCH v3 00/12] MBus device tree binding Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 01/12] bus: mvebu-mbus: Factor out initialization details Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 02/12] bus: mvebu-mbus: Introduce device tree binding Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 03/12] bus: mvebu-mbus: Add static window allocation to the DT binding Ezequiel Garcia
2013-06-18 16:14   ` Arnd Bergmann
2013-06-18 17:12     ` Thomas Petazzoni
2013-06-18 17:16       ` Arnd Bergmann
2013-06-18 21:34     ` Ezequiel Garcia
2013-06-18 21:45       ` Arnd Bergmann
2013-06-19 18:52         ` Ezequiel Garcia
2013-06-19 19:08           ` Arnd Bergmann
2013-06-19 19:29             ` Ezequiel Garcia
2013-06-19 19:37               ` Jason Cooper
2013-06-18 17:46   ` Jason Gunthorpe
2013-06-18 18:24     ` Sebastian Hesselbarth
2013-06-18 18:39       ` Arnd Bergmann
2013-06-18 18:44         ` Sebastian Hesselbarth
2013-06-18 18:47           ` Jason Gunthorpe
2013-06-18 18:59             ` Sebastian Hesselbarth
2013-06-18 19:10               ` Jason Gunthorpe
2013-06-18 19:27                 ` Sebastian Hesselbarth
2013-06-18 20:49                   ` Ezequiel Garcia
2013-06-18 20:55                     ` Jason Gunthorpe
2013-06-18 21:10                       ` Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 04/12] ARM: mvebu: Initialize MBus using " Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation Ezequiel Garcia
2013-06-18 17:39   ` Jason Gunthorpe
2013-06-18 19:43     ` Ezequiel Garcia
2013-06-18 19:51       ` Jason Gunthorpe
2013-06-18 20:02         ` Ezequiel Garcia
2013-06-18 20:10           ` Jason Gunthorpe
2013-06-18 20:39             ` Ezequiel Garcia
2013-06-19 10:02     ` Ezequiel Garcia
2013-06-19 16:58       ` Jason Gunthorpe
2013-06-19 17:58         ` Ezequiel Garcia
2013-06-19 18:03           ` Jason Gunthorpe
2013-06-19 18:17             ` Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 06/12] memory: mvebu-devbus: Remove address decoding window workaround Ezequiel Garcia
2013-06-18 11:39   ` Jason Cooper
2013-06-18 12:17     ` Thomas Petazzoni
2013-06-18 12:33       ` Jason Cooper
2013-06-18 12:48         ` Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 07/12] ARM: mvebu: Use the preprocessor on Armada 370/XP device tree files Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 08/12] ARM: mvebu: Add MBus to Armada 370/XP device tree Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 09/12] ARM: mvebu: Add BootROM " Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 10/12] ARM: mvebu: Relocate Armada 370/XP DeviceBus device tree nodes Ezequiel Garcia
2013-06-18 16:16   ` Arnd Bergmann
2013-06-18 22:09     ` Ezequiel Garcia
2013-06-18 22:14       ` Ezequiel Garcia
2013-06-19 12:03       ` Arnd Bergmann
2013-06-18 11:25 ` [PATCH v3 11/12] ARM: mvebu: Relocate Armada 370 PCIe " Ezequiel Garcia
2013-06-18 16:29   ` Arnd Bergmann
2013-06-18 17:15     ` Thomas Petazzoni
2013-06-18 17:18       ` Arnd Bergmann
2013-06-18 17:21         ` Thomas Petazzoni
2013-06-18 18:22           ` Arnd Bergmann
2013-06-18 19:02             ` Jason Gunthorpe
2013-06-18 21:20               ` Arnd Bergmann
2013-06-18 21:40                 ` Ezequiel Garcia
2013-06-19 12:06                   ` Arnd Bergmann
2013-06-18 21:35   ` Arnd Bergmann
2013-06-19 11:12     ` Ezequiel Garcia
2013-06-19 12:11       ` Arnd Bergmann
2013-06-19 16:53         ` Jason Gunthorpe
2013-06-19 18:55           ` Arnd Bergmann
2013-06-18 11:25 ` [PATCH v3 12/12] ARM: mvebu: Relocate Armada XP " Ezequiel Garcia
2013-06-18 11:33 ` [PATCH v3 00/12] MBus device tree binding Sebastian Hesselbarth
2013-06-18 13:07   ` Ezequiel Garcia [this message]

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=20130618130750.GB25416@localhost \
    --to=ezequiel.garcia@free-electrons.com \
    --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;
as well as URLs for NNTP newsgroup(s).