All of lore.kernel.org
 help / color / mirror / Atom feed
From: wmb@firmworks.com (Mitch Bradley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 8/9] ARM: dts: refresh dts file for arch mmp
Date: Tue, 05 Jun 2012 15:47:00 -1000	[thread overview]
Message-ID: <4FCEB694.8080904@firmworks.com> (raw)
In-Reply-To: <201206060128.28167.arnd@arndb.de>

On 6/5/2012 3:28 PM, Arnd Bergmann wrote:
> On Tuesday 05 June 2012, Chris Ball wrote:
>> Hi Haojian,
>>
>> On Fri, May 04 2012, Haojian Zhuang wrote:
>>> Append mmp2 and pxa910 dts files. Update PXA168 dts files for irq,
>>> timer, gpio components.
>>
>> The patch I'm replying to introduced a device tree for MMP2/Brownstone
>> in 3.5-rc1.  We're looking at adopting the MMP2 device tree for the OLPC
>> XO-1.75 board, and Mitch Bradley has some corrections to the device tree
>> format that we'd like to make, appended below.
>>
>> You can see all of the files Mitch mentions at:
>> http://dev.laptop.org/~wmb/mmp2-devicetree/
>>
>> Here's my proposal for what to do next:
>>   * First, you choose one of the two forms that Mitch links to.
>>     (Either "mmp2.dtsi" or "mmp2-flat.dtsi"; we have a weak preference
>>     for mmp2-flat.dtsi.)
>
> My preference would be towards mmp2.dtsi. I've recommended doing it
> that way to other people, too.

In most cases, I have found that exposing the full hierarchy is 
preferable.  For this specific SoC, which I have been working with for 
quite awhile now, I haven't found any instance where exposing the 
AXI/APB levels buys you anything.  The hierarchy just adds clutter.

That said, I don't feel strongly about it.

>
>
>> d) Moved the "intcmux" nodes down a level so they are children of the
>> top-level interrupt-controller node.  The problem with having them as
>> peers of the top-level interrupt-controller is that their "reg"
>> properties conflict.  For example:
>> intcmux4 at d4282150 { ... reg =<0x150 0x4>,<0x168 0x4>  ... }
>>
>> This is incorrect in several ways:
>>
>>     1) "@d4282150" is inconsistent with "reg =<0x150" .  The "unit
>>        address" after @ is supposed to be the same as the first component
>>        of the reg property.  d4282150 is not identical to 150.
>
> I thought the rule was that the @... part should be a translated address
> in the presence of "ranges" translation so we get a unique value in case
> we have multiple devices of the same name on the same address but on
> different buses.
>
> If we change this here, I suppose it also needs to be changed in a number
> of other places, and we have to rethink the method for unique device
> names.

My thinking was that "ranges" is inappropriate in this case (within the 
top-level interrupt controller node), and I got rid of it.  That being 
the case, this is not "in the presence of ranges".

>
>
>> The solution is to put the intcmux nodes underneath the
>> interrupt-controller node.  The interrupt-controller node now has
>> #address-cells and #size-cells properties so it can have children, but
>> it does not have a ranges property, so the address space is not passed
>> through.  The child (intcmux) reg addresses can then be interpreted
>> independently, without conflict.
>
> Right. The implication for this however is that the driver cannot
> treat the reg property as a physical address it can do ioremap on,
> but needs to interface with the driver that provides the address
> space.

Indeed.  For this driver, the intcmux subnodes are handled by the same 
driver as the top-level interrupt controller, and those subordinate 
registers are accessed via that driver's one mapping of the register block.


>
>
> 	Arnd
>

WARNING: multiple messages have this Message-ID (diff)
From: Mitch Bradley <wmb-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	Chris Ball <cjb-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v2 8/9] ARM: dts: refresh dts file for arch mmp
Date: Tue, 05 Jun 2012 15:47:00 -1000	[thread overview]
Message-ID: <4FCEB694.8080904@firmworks.com> (raw)
In-Reply-To: <201206060128.28167.arnd-r2nGTMty4D4@public.gmane.org>

On 6/5/2012 3:28 PM, Arnd Bergmann wrote:
> On Tuesday 05 June 2012, Chris Ball wrote:
>> Hi Haojian,
>>
>> On Fri, May 04 2012, Haojian Zhuang wrote:
>>> Append mmp2 and pxa910 dts files. Update PXA168 dts files for irq,
>>> timer, gpio components.
>>
>> The patch I'm replying to introduced a device tree for MMP2/Brownstone
>> in 3.5-rc1.  We're looking at adopting the MMP2 device tree for the OLPC
>> XO-1.75 board, and Mitch Bradley has some corrections to the device tree
>> format that we'd like to make, appended below.
>>
>> You can see all of the files Mitch mentions at:
>> http://dev.laptop.org/~wmb/mmp2-devicetree/
>>
>> Here's my proposal for what to do next:
>>   * First, you choose one of the two forms that Mitch links to.
>>     (Either "mmp2.dtsi" or "mmp2-flat.dtsi"; we have a weak preference
>>     for mmp2-flat.dtsi.)
>
> My preference would be towards mmp2.dtsi. I've recommended doing it
> that way to other people, too.

In most cases, I have found that exposing the full hierarchy is 
preferable.  For this specific SoC, which I have been working with for 
quite awhile now, I haven't found any instance where exposing the 
AXI/APB levels buys you anything.  The hierarchy just adds clutter.

That said, I don't feel strongly about it.

>
>
>> d) Moved the "intcmux" nodes down a level so they are children of the
>> top-level interrupt-controller node.  The problem with having them as
>> peers of the top-level interrupt-controller is that their "reg"
>> properties conflict.  For example:
>> intcmux4@d4282150 { ... reg =<0x150 0x4>,<0x168 0x4>  ... }
>>
>> This is incorrect in several ways:
>>
>>     1) "@d4282150" is inconsistent with "reg =<0x150" .  The "unit
>>        address" after @ is supposed to be the same as the first component
>>        of the reg property.  d4282150 is not identical to 150.
>
> I thought the rule was that the @... part should be a translated address
> in the presence of "ranges" translation so we get a unique value in case
> we have multiple devices of the same name on the same address but on
> different buses.
>
> If we change this here, I suppose it also needs to be changed in a number
> of other places, and we have to rethink the method for unique device
> names.

My thinking was that "ranges" is inappropriate in this case (within the 
top-level interrupt controller node), and I got rid of it.  That being 
the case, this is not "in the presence of ranges".

>
>
>> The solution is to put the intcmux nodes underneath the
>> interrupt-controller node.  The interrupt-controller node now has
>> #address-cells and #size-cells properties so it can have children, but
>> it does not have a ranges property, so the address space is not passed
>> through.  The child (intcmux) reg addresses can then be interpreted
>> independently, without conflict.
>
> Right. The implication for this however is that the driver cannot
> treat the reg property as a physical address it can do ioremap on,
> but needs to interface with the driver that provides the address
> space.

Indeed.  For this driver, the intcmux subnodes are handled by the same 
driver as the top-level interrupt controller, and those subordinate 
registers are accessed via that driver's one mapping of the register block.


>
>
> 	Arnd
>

  reply	other threads:[~2012-06-06  1:47 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 12:30 [PATCH v2 0/9] support dt for mmp2 Haojian Zhuang
2012-05-04 12:30 ` Haojian Zhuang
2012-05-04 12:30 ` [PATCH v2 1/9] ARM: mmp: fix build issue on mmp with device tree Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-05-04 12:30 ` [PATCH v2 2/9] ARM: mmp: append CONFIG_MACH_MMP2_DT Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-05-04 12:30 ` [PATCH v2 3/9] ARM: mmp: support DT in irq Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-05-08 17:56   ` Grant Likely
2012-05-08 17:56     ` Grant Likely
2012-05-04 12:30 ` [PATCH v2 4/9] ARM: mmp: support DT in timer Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-05-04 12:30 ` [PATCH v2 5/9] gpio: pxa: parse gpio from DTS file Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-05-08 19:40   ` Grant Likely
2012-05-08 19:40     ` Grant Likely
2012-05-04 12:30 ` [PATCH v2 6/9] ARM: mmp: support mmp2 with device tree Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-05-04 12:30 ` [PATCH v2 7/9] ARM: mmp: support pxa910 " Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-05-04 12:30 ` [PATCH v2 8/9] ARM: dts: refresh dts file for arch mmp Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-06-05  0:08   ` Chris Ball
2012-06-05  0:08     ` Chris Ball
2012-06-05  2:03     ` Haojian Zhuang
2012-06-05  2:03       ` Haojian Zhuang
2012-06-06  1:28     ` Arnd Bergmann
2012-06-06  1:28       ` Arnd Bergmann
2012-06-06  1:47       ` Mitch Bradley [this message]
2012-06-06  1:47         ` Mitch Bradley
2012-06-06  2:35         ` Haojian Zhuang
2012-06-06  2:35           ` Haojian Zhuang
2012-06-06  5:22           ` Mitch Bradley
2012-06-06  5:22             ` Mitch Bradley
2012-06-06  5:25             ` Haojian Zhuang
2012-06-06  5:25               ` Haojian Zhuang
2012-06-06 16:22               ` Mitch Bradley
2012-06-06 16:22                 ` Mitch Bradley
2012-06-06  3:05         ` Arnd Bergmann
2012-06-06  3:05           ` Arnd Bergmann
2012-05-04 12:30 ` [PATCH v2 9/9] Documentation: update docs for mmp dt Haojian Zhuang
2012-05-04 12:30   ` Haojian Zhuang
2012-05-04 14:27 ` [PATCH v2 0/9] support dt for mmp2 Arnd Bergmann
2012-05-04 14:27   ` Arnd Bergmann
2012-05-17 23:57 ` Rob Herring
2012-05-17 23:57   ` Rob Herring
2012-05-18  2:15   ` Haojian Zhuang
2012-05-18  2:15     ` Haojian Zhuang

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=4FCEB694.8080904@firmworks.com \
    --to=wmb@firmworks.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 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.