From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 03/12] bus: mvebu-mbus: Add static window allocation to the DT binding
Date: Tue, 18 Jun 2013 23:45:26 +0200 [thread overview]
Message-ID: <201306182345.26281.arnd@arndb.de> (raw)
In-Reply-To: <20130618213454.GD2516@localhost>
On Tuesday 18 June 2013, Ezequiel Garcia wrote:
> On Tue, Jun 18, 2013 at 06:14:33PM +0200, Arnd Bergmann wrote:
> > On Tuesday 18 June 2013, Ezequiel Garcia wrote:
> > > +Required properties:
> > > +
> > > +- compatible: Should be set to one of the following:
> > > + marvell,armada370-mbus
> > > + marvell,armadaxp-mbus
> > > +
> > > +- reg: Device's register space.
> > > + Two entries are expected, see the examples below.
> > > + The first one controls the devices decoding window and
> > > + the second one controls the SDRAM decoding window.
> > > +
> > > +- address-cells: Must be '2'. The first cell for the MBus ID encoding,
> > > + the second cell for the address offset within the window.
> > > +
> > > +- size-cells: Must be '1'.
> > > +
> > > +- ranges: Must be set up to provide a proper translation for each child.
> > > + See the examples below.
> >
> > You should explain here what the policy is regarding windows set up by the
> > boot loader. Are the ranges in here required to be the ones that the boot
> > loader has preconfigured, or are they the ones that the mbus driver is supposed
> > to set up?
> >
>
> Actually, I might be confused but the kernel MBus driver is completely
> independent from the bootloader's -except in the internal register case,
> (because we don't touch that from where the bootloader left it).
Right, then state that clearly in the binding.
> What happens is that any decoding window that was setup by the bootloader,
> is wiped and completely new windows are allocated using the translations
> in the DT, as described by this binding.
>
> This was the case from the start with the old MBus driver. FWIW, I think
> it's actually the best choice that can be made: it makes the kernel
> independent of the previous setting.
>
> I know you've suggested differently in the past, but I'm not sure I
> understand what's the benefit in keeping the bootloaders configuration.
The device tree /normally/ describes things that are either wired up
in hardware or set up by the boot loader. Describing things that the
boot loader may or may not have set up and that the kernel should
set up but may ignore if it wants to is a bit fishy, but it seems
that you have decided to do it that way. You should definitely
document the fact that all ranges except the "internal-regs" are just
suggestions and cannot be relied on to be present at boot time.
A cleaner approach would be to require that all ranges here are exactly
the ones that have been configured by the boot loader, and state the
OS can either assume that they are valid or can reprogram them as
needed. That would imply that you don't actually need an mbus driver
unless you want to dynamically reassign the windows.
Please also add a property that describes the address range in which
the windows might be reassigned, i.e. everything that is not RAM.
> > > +Each child device needs at least a 'ranges' property. If the child is avaiable
> > > +(i.e. status not 'disabled'), then the MBus driver creates a decoding window
> > > +for it. For instance, in the example below the BootROM child is specified:
> > > +
> > > + soc {
> > > + compatible = "marvell,armada370-mbus", "simple-bus";
> > > + reg = <0xd0020000 0x100>, <0xd0020180 0x20>;
> > > + #address-cells = <2>;
> > > + #size-cells = <1>;
> > > +
> > > + ranges = < ... /* other entries */
> > > + 0x011d0000 0 0 0xfff00000 0x100000>;
> > > +
> > > + bootrom {
> > > + #address-cells = <1>;
> > > + #size-cells = <1>;
> > > + ranges = <0 0x011d0000 0 0x100000>;
> > > + };
> > > +
> > > + /* other children */
> > > + ...
> > > + };
> >
> > Do you really want to require the child to provide a "ranges" property?
> > I think this makes it more complicated to specify devices that belong
> > into the "internal-regs" category.
> >
>
> No, this text is actually a left-over from the previous patchset, in
> current v3 patchset MBus children are *not* required to have any ranges.
> On the otherside, although you will need one except in the most trivial
> cases like for the BootROM.
Ok.
Arnd
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Andrew Lunn <andrew@lunn.ch>, Jason Cooper <jason@lakedaemon.net>,
devicetree-discuss@lists.ozlabs.org,
Grant Likely <grant.likely@secretlab.ca>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Maen Suleiman <maen@marvell.com>,
Lior Amsalem <alior@marvell.com>,
Gregory Clement <gregory.clement@free-electrons.com>,
linux-arm-kernel@lists.infradead.org,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH v3 03/12] bus: mvebu-mbus: Add static window allocation to the DT binding
Date: Tue, 18 Jun 2013 23:45:26 +0200 [thread overview]
Message-ID: <201306182345.26281.arnd@arndb.de> (raw)
In-Reply-To: <20130618213454.GD2516@localhost>
On Tuesday 18 June 2013, Ezequiel Garcia wrote:
> On Tue, Jun 18, 2013 at 06:14:33PM +0200, Arnd Bergmann wrote:
> > On Tuesday 18 June 2013, Ezequiel Garcia wrote:
> > > +Required properties:
> > > +
> > > +- compatible: Should be set to one of the following:
> > > + marvell,armada370-mbus
> > > + marvell,armadaxp-mbus
> > > +
> > > +- reg: Device's register space.
> > > + Two entries are expected, see the examples below.
> > > + The first one controls the devices decoding window and
> > > + the second one controls the SDRAM decoding window.
> > > +
> > > +- address-cells: Must be '2'. The first cell for the MBus ID encoding,
> > > + the second cell for the address offset within the window.
> > > +
> > > +- size-cells: Must be '1'.
> > > +
> > > +- ranges: Must be set up to provide a proper translation for each child.
> > > + See the examples below.
> >
> > You should explain here what the policy is regarding windows set up by the
> > boot loader. Are the ranges in here required to be the ones that the boot
> > loader has preconfigured, or are they the ones that the mbus driver is supposed
> > to set up?
> >
>
> Actually, I might be confused but the kernel MBus driver is completely
> independent from the bootloader's -except in the internal register case,
> (because we don't touch that from where the bootloader left it).
Right, then state that clearly in the binding.
> What happens is that any decoding window that was setup by the bootloader,
> is wiped and completely new windows are allocated using the translations
> in the DT, as described by this binding.
>
> This was the case from the start with the old MBus driver. FWIW, I think
> it's actually the best choice that can be made: it makes the kernel
> independent of the previous setting.
>
> I know you've suggested differently in the past, but I'm not sure I
> understand what's the benefit in keeping the bootloaders configuration.
The device tree /normally/ describes things that are either wired up
in hardware or set up by the boot loader. Describing things that the
boot loader may or may not have set up and that the kernel should
set up but may ignore if it wants to is a bit fishy, but it seems
that you have decided to do it that way. You should definitely
document the fact that all ranges except the "internal-regs" are just
suggestions and cannot be relied on to be present at boot time.
A cleaner approach would be to require that all ranges here are exactly
the ones that have been configured by the boot loader, and state the
OS can either assume that they are valid or can reprogram them as
needed. That would imply that you don't actually need an mbus driver
unless you want to dynamically reassign the windows.
Please also add a property that describes the address range in which
the windows might be reassigned, i.e. everything that is not RAM.
> > > +Each child device needs at least a 'ranges' property. If the child is avaiable
> > > +(i.e. status not 'disabled'), then the MBus driver creates a decoding window
> > > +for it. For instance, in the example below the BootROM child is specified:
> > > +
> > > + soc {
> > > + compatible = "marvell,armada370-mbus", "simple-bus";
> > > + reg = <0xd0020000 0x100>, <0xd0020180 0x20>;
> > > + #address-cells = <2>;
> > > + #size-cells = <1>;
> > > +
> > > + ranges = < ... /* other entries */
> > > + 0x011d0000 0 0 0xfff00000 0x100000>;
> > > +
> > > + bootrom {
> > > + #address-cells = <1>;
> > > + #size-cells = <1>;
> > > + ranges = <0 0x011d0000 0 0x100000>;
> > > + };
> > > +
> > > + /* other children */
> > > + ...
> > > + };
> >
> > Do you really want to require the child to provide a "ranges" property?
> > I think this makes it more complicated to specify devices that belong
> > into the "internal-regs" category.
> >
>
> No, this text is actually a left-over from the previous patchset, in
> current v3 patchset MBus children are *not* required to have any ranges.
> On the otherside, although you will need one except in the most trivial
> cases like for the BootROM.
Ok.
Arnd
next prev parent reply other threads:[~2013-06-18 21:45 UTC|newest]
Thread overview: 136+ 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 ` 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 ` 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 ` 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 11:25 ` Ezequiel Garcia
2013-06-18 16:14 ` Arnd Bergmann
2013-06-18 16:14 ` Arnd Bergmann
2013-06-18 17:12 ` Thomas Petazzoni
2013-06-18 17:12 ` Thomas Petazzoni
2013-06-18 17:16 ` Arnd Bergmann
2013-06-18 17:16 ` Arnd Bergmann
2013-06-18 21:34 ` Ezequiel Garcia
2013-06-18 21:34 ` Ezequiel Garcia
2013-06-18 21:45 ` Arnd Bergmann [this message]
2013-06-18 21:45 ` Arnd Bergmann
2013-06-19 18:52 ` Ezequiel Garcia
2013-06-19 18:52 ` Ezequiel Garcia
2013-06-19 19:08 ` Arnd Bergmann
2013-06-19 19:08 ` Arnd Bergmann
2013-06-19 19:29 ` Ezequiel Garcia
2013-06-19 19:29 ` Ezequiel Garcia
2013-06-19 19:37 ` Jason Cooper
2013-06-19 19:37 ` Jason Cooper
2013-06-18 17:46 ` Jason Gunthorpe
2013-06-18 17:46 ` Jason Gunthorpe
2013-06-18 18:24 ` Sebastian Hesselbarth
2013-06-18 18:24 ` Sebastian Hesselbarth
2013-06-18 18:39 ` Arnd Bergmann
2013-06-18 18:39 ` Arnd Bergmann
2013-06-18 18:44 ` Sebastian Hesselbarth
2013-06-18 18:44 ` Sebastian Hesselbarth
2013-06-18 18:47 ` Jason Gunthorpe
2013-06-18 18:47 ` Jason Gunthorpe
2013-06-18 18:59 ` Sebastian Hesselbarth
2013-06-18 18:59 ` Sebastian Hesselbarth
2013-06-18 19:10 ` Jason Gunthorpe
2013-06-18 19:10 ` Jason Gunthorpe
2013-06-18 19:27 ` Sebastian Hesselbarth
2013-06-18 19:27 ` Sebastian Hesselbarth
2013-06-18 20:49 ` Ezequiel Garcia
2013-06-18 20:49 ` Ezequiel Garcia
2013-06-18 20:55 ` Jason Gunthorpe
2013-06-18 20:55 ` Jason Gunthorpe
2013-06-18 21:10 ` Ezequiel Garcia
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 ` Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 05/12] ARM: mvebu: Remove the harcoded BootROM window allocation Ezequiel Garcia
2013-06-18 11:25 ` Ezequiel Garcia
2013-06-18 17:39 ` Jason Gunthorpe
2013-06-18 17:39 ` Jason Gunthorpe
2013-06-18 19:43 ` Ezequiel Garcia
2013-06-18 19:43 ` Ezequiel Garcia
2013-06-18 19:51 ` Jason Gunthorpe
2013-06-18 19:51 ` Jason Gunthorpe
2013-06-18 20:02 ` Ezequiel Garcia
2013-06-18 20:02 ` Ezequiel Garcia
2013-06-18 20:10 ` Jason Gunthorpe
2013-06-18 20:10 ` Jason Gunthorpe
2013-06-18 20:39 ` Ezequiel Garcia
2013-06-18 20:39 ` Ezequiel Garcia
2013-06-19 10:02 ` Ezequiel Garcia
2013-06-19 10:02 ` Ezequiel Garcia
2013-06-19 16:58 ` Jason Gunthorpe
2013-06-19 16:58 ` Jason Gunthorpe
2013-06-19 17:58 ` Ezequiel Garcia
2013-06-19 17:58 ` Ezequiel Garcia
2013-06-19 18:03 ` Jason Gunthorpe
2013-06-19 18:03 ` Jason Gunthorpe
2013-06-19 18:17 ` Ezequiel Garcia
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:25 ` Ezequiel Garcia
2013-06-18 11:39 ` Jason Cooper
2013-06-18 11:39 ` Jason Cooper
2013-06-18 12:17 ` Thomas Petazzoni
2013-06-18 12:17 ` Thomas Petazzoni
2013-06-18 12:33 ` Jason Cooper
2013-06-18 12:33 ` Jason Cooper
2013-06-18 12:48 ` Ezequiel Garcia
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 ` 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 ` Ezequiel Garcia
2013-06-18 11:25 ` [PATCH v3 09/12] ARM: mvebu: Add BootROM " Ezequiel Garcia
2013-06-18 11:25 ` 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 11:25 ` Ezequiel Garcia
2013-06-18 16:16 ` Arnd Bergmann
2013-06-18 16:16 ` Arnd Bergmann
2013-06-18 22:09 ` Ezequiel Garcia
2013-06-18 22:09 ` Ezequiel Garcia
2013-06-18 22:14 ` Ezequiel Garcia
2013-06-18 22:14 ` Ezequiel Garcia
2013-06-19 12:03 ` Arnd Bergmann
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 11:25 ` Ezequiel Garcia
2013-06-18 16:29 ` Arnd Bergmann
2013-06-18 16:29 ` Arnd Bergmann
2013-06-18 17:15 ` Thomas Petazzoni
2013-06-18 17:15 ` Thomas Petazzoni
2013-06-18 17:18 ` Arnd Bergmann
2013-06-18 17:18 ` Arnd Bergmann
2013-06-18 17:21 ` Thomas Petazzoni
2013-06-18 17:21 ` Thomas Petazzoni
2013-06-18 18:22 ` Arnd Bergmann
2013-06-18 18:22 ` Arnd Bergmann
2013-06-18 19:02 ` Jason Gunthorpe
2013-06-18 19:02 ` Jason Gunthorpe
2013-06-18 21:20 ` Arnd Bergmann
2013-06-18 21:20 ` Arnd Bergmann
2013-06-18 21:40 ` Ezequiel Garcia
2013-06-18 21:40 ` Ezequiel Garcia
2013-06-19 12:06 ` Arnd Bergmann
2013-06-19 12:06 ` Arnd Bergmann
2013-06-18 21:35 ` Arnd Bergmann
2013-06-18 21:35 ` Arnd Bergmann
2013-06-19 11:12 ` Ezequiel Garcia
2013-06-19 11:12 ` Ezequiel Garcia
2013-06-19 12:11 ` Arnd Bergmann
2013-06-19 12:11 ` Arnd Bergmann
2013-06-19 16:53 ` Jason Gunthorpe
2013-06-19 16:53 ` Jason Gunthorpe
2013-06-19 18:55 ` Arnd Bergmann
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:25 ` Ezequiel Garcia
2013-06-18 11:33 ` [PATCH v3 00/12] MBus device tree binding Sebastian Hesselbarth
2013-06-18 11:33 ` Sebastian Hesselbarth
2013-06-18 13:07 ` Ezequiel Garcia
2013-06-18 13:07 ` Ezequiel Garcia
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=201306182345.26281.arnd@arndb.de \
--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 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.