Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1360057 > unrolled thread
| Started by | Rob Herring <robh@kernel.org> |
|---|---|
| First post | 2016-03-17 18:10 +0100 |
| Last post | 2016-03-25 08:00 +0100 |
| Articles | 6 — 5 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [v6, 3/5] dt: move guts devicetree doc out of powerpc directory Rob Herring <robh@kernel.org> - 2016-03-17 18:10 +0100
Re: [v6, 3/5] dt: move guts devicetree doc out of powerpc directory Arnd Bergmann <arnd@arndb.de> - 2016-03-17 18:20 +0100
Re: [v6, 3/5] dt: move guts devicetree doc out of powerpc directory Rob Herring <robh@kernel.org> - 2016-03-17 19:00 +0100
Re: [v6, 3/5] dt: move guts devicetree doc out of powerpc directory Leo Li <pku.leo@gmail.com> - 2016-03-17 22:40 +0100
Re: [v6, 3/5] dt: move guts devicetree doc out of powerpc directory Scott Wood <scott.wood@nxp.com> - 2016-03-18 19:20 +0100
RE: [v6, 3/5] dt: move guts devicetree doc out of powerpc directory Yangbo Lu <yangbo.lu@nxp.com> - 2016-03-25 08:00 +0100
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2016-03-17 18:10 +0100 |
| Subject | Re: [v6, 3/5] dt: move guts devicetree doc out of powerpc directory |
| Message-ID | <rdJAT-1Mf-29@gated-at.bofh.it> |
On Wed, Mar 09, 2016 at 06:08:49PM +0800, Yangbo Lu wrote:
> Move guts devicetree doc to Documentation/devicetree/bindings/soc/fsl/
> since it's used by not only PowerPC but also ARM. And add a specification
> for 'little-endian' property.
>
> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> ---
> Changes for v2:
> - None
> Changes for v3:
> - None
> Changes for v4:
> - Added this patch
> Changes for v5:
> - Modified the description for little-endian property
> Changes for v6:
> - None
> ---
> Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt | 3 +++
> 1 file changed, 3 insertions(+)
> rename Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt (91%)
>
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/soc/fsl/guts.txt
> similarity index 91%
> rename from Documentation/devicetree/bindings/powerpc/fsl/guts.txt
> rename to Documentation/devicetree/bindings/soc/fsl/guts.txt
> index b71b203..07adca9 100644
> --- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
> +++ b/Documentation/devicetree/bindings/soc/fsl/guts.txt
> @@ -25,6 +25,9 @@ Recommended properties:
> - fsl,liodn-bits : Indicates the number of defined bits in the LIODN
> registers, for those SOCs that have a PAMU device.
>
> + - little-endian : Indicates that the global utilities block is little
> + endian. The default is big endian.
The default is "the native endianness of the system". So absence on an
ARM system would be LE. This property is valid for any simple-bus
device, so it isn't really required to document per device. You can, but
your description had better match the documented behaviour.
Rob
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-03-17 18:20 +0100 |
| Message-ID | <rdJKy-1PB-7@gated-at.bofh.it> |
| In reply to | #1360057 |
On Thursday 17 March 2016 12:06:40 Rob Herring wrote: > > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/soc/fsl/guts.txt > > similarity index 91% > > rename from Documentation/devicetree/bindings/powerpc/fsl/guts.txt > > rename to Documentation/devicetree/bindings/soc/fsl/guts.txt > > index b71b203..07adca9 100644 > > --- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt > > +++ b/Documentation/devicetree/bindings/soc/fsl/guts.txt > > @@ -25,6 +25,9 @@ Recommended properties: > > - fsl,liodn-bits : Indicates the number of defined bits in the LIODN > > registers, for those SOCs that have a PAMU device. > > > > + - little-endian : Indicates that the global utilities block is little > > + endian. The default is big endian. > > The default is "the native endianness of the system". This may be what is currently documented, but not what we are doing in practice, as there is no "native endianess" for either PowerPC or ARM -- both allow running big-endian or little-endian kernels and the device registers are fixed. I think the property here is fine. Arnd
[toc] | [prev] | [next] | [standalone]
| From | Rob Herring <robh@kernel.org> |
|---|---|
| Date | 2016-03-17 19:00 +0100 |
| Message-ID | <rdKnh-22V-13@gated-at.bofh.it> |
| In reply to | #1360062 |
On Thu, Mar 17, 2016 at 12:11 PM, Arnd Bergmann <arnd@arndb.de> wrote: > On Thursday 17 March 2016 12:06:40 Rob Herring wrote: >> > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/soc/fsl/guts.txt >> > similarity index 91% >> > rename from Documentation/devicetree/bindings/powerpc/fsl/guts.txt >> > rename to Documentation/devicetree/bindings/soc/fsl/guts.txt >> > index b71b203..07adca9 100644 >> > --- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt >> > +++ b/Documentation/devicetree/bindings/soc/fsl/guts.txt >> > @@ -25,6 +25,9 @@ Recommended properties: >> > - fsl,liodn-bits : Indicates the number of defined bits in the LIODN >> > registers, for those SOCs that have a PAMU device. >> > >> > + - little-endian : Indicates that the global utilities block is little >> > + endian. The default is big endian. >> >> The default is "the native endianness of the system". > > This may be what is currently documented, but not what we are doing > in practice, as there is no "native endianess" for either PowerPC or > ARM -- both allow running big-endian or little-endian kernels and the > device registers are fixed. Notice I said system, not architecture. The way the device registers are fixed is what I mean by native endianness. If the purpose of adding this property now is to support GUTS on the ARM SoCs, then I'd argue using this property is probably wrong. If the PPC systems are designed with BE device registers and ARM systems with LE, then this property is not needed. > I think the property here is fine. Unless you have studied the FSL ARM based SoCs, then there is not enough information here to tell. Rob
[toc] | [prev] | [next] | [standalone]
| From | Leo Li <pku.leo@gmail.com> |
|---|---|
| Date | 2016-03-17 22:40 +0100 |
| Message-ID | <rdNOa-4sC-5@gated-at.bofh.it> |
| In reply to | #1360095 |
On Thu, Mar 17, 2016 at 12:57 PM, Rob Herring <robh@kernel.org> wrote: > On Thu, Mar 17, 2016 at 12:11 PM, Arnd Bergmann <arnd@arndb.de> wrote: >> On Thursday 17 March 2016 12:06:40 Rob Herring wrote: >>> > diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/soc/fsl/guts.txt >>> > similarity index 91% >>> > rename from Documentation/devicetree/bindings/powerpc/fsl/guts.txt >>> > rename to Documentation/devicetree/bindings/soc/fsl/guts.txt >>> > index b71b203..07adca9 100644 >>> > --- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt >>> > +++ b/Documentation/devicetree/bindings/soc/fsl/guts.txt >>> > @@ -25,6 +25,9 @@ Recommended properties: >>> > - fsl,liodn-bits : Indicates the number of defined bits in the LIODN >>> > registers, for those SOCs that have a PAMU device. >>> > >>> > + - little-endian : Indicates that the global utilities block is little >>> > + endian. The default is big endian. >>> >>> The default is "the native endianness of the system". >> >> This may be what is currently documented, but not what we are doing >> in practice, as there is no "native endianess" for either PowerPC or >> ARM -- both allow running big-endian or little-endian kernels and the >> device registers are fixed. > > Notice I said system, not architecture. The way the device registers > are fixed is what I mean by native endianness. I think sometimes it's also hard to define the native endianess of the system too. For whatever reason, we have hardware that having big-endian registers on some on-chip devices but using little-endian registers on other devices. Even if all the devices on certain hardware use registers of the same endianess, it is also hard for the device driver to know what the native endianess really is. > > If the purpose of adding this property now is to support GUTS on the > ARM SoCs, then I'd argue using this property is probably wrong. If the > PPC systems are designed with BE device registers and ARM systems with > LE, then this property is not needed. > >> I think the property here is fine. > > Unless you have studied the FSL ARM based SoCs, then there is not > enough information here to tell. Recent FSL ARM SoCs seems to have more weird endianess issue. :( The same IP could have registers of different endianess on different ARM SoCs. That why we need to define the endianess explicitly in device tree. Regards, Leo
[toc] | [prev] | [next] | [standalone]
| From | Scott Wood <scott.wood@nxp.com> |
|---|---|
| Date | 2016-03-18 19:20 +0100 |
| Message-ID | <re7aa-4li-19@gated-at.bofh.it> |
| In reply to | #1360057 |
On 03/17/2016 12:06 PM, Rob Herring wrote:
> On Wed, Mar 09, 2016 at 06:08:49PM +0800, Yangbo Lu wrote:
>> Move guts devicetree doc to Documentation/devicetree/bindings/soc/fsl/
>> since it's used by not only PowerPC but also ARM. And add a specification
>> for 'little-endian' property.
>>
>> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
>> ---
>> Changes for v2:
>> - None
>> Changes for v3:
>> - None
>> Changes for v4:
>> - Added this patch
>> Changes for v5:
>> - Modified the description for little-endian property
>> Changes for v6:
>> - None
>> ---
>> Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt | 3 +++
>> 1 file changed, 3 insertions(+)
>> rename Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt (91%)
>>
>> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/soc/fsl/guts.txt
>> similarity index 91%
>> rename from Documentation/devicetree/bindings/powerpc/fsl/guts.txt
>> rename to Documentation/devicetree/bindings/soc/fsl/guts.txt
>> index b71b203..07adca9 100644
>> --- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
>> +++ b/Documentation/devicetree/bindings/soc/fsl/guts.txt
>> @@ -25,6 +25,9 @@ Recommended properties:
>> - fsl,liodn-bits : Indicates the number of defined bits in the LIODN
>> registers, for those SOCs that have a PAMU device.
>>
>> + - little-endian : Indicates that the global utilities block is little
>> + endian. The default is big endian.
>
> The default is "the native endianness of the system". So absence on an
> ARM system would be LE.
No. For this binding, the default is big-endian, because that's what
existed for this device before an endian property was added.
"endianness of the system" is not a well-defined concept.
> This property is valid for any simple-bus device,
Since when does simple-bus mean anything more than that the nodes
underneath it can be used without bus-specific knowledge?
> so it isn't really required to document per device. You can, but
> your description had better match the documented behaviour.
Documented where?
In fact, Documentation/devicetree/bindings/common-properties.txt
explicitly says of the endian properties, "If a binding supports these
properties, then the binding should also specify the default behavior if
none of these properties are present."
-Scott
[toc] | [prev] | [next] | [standalone]
| From | Yangbo Lu <yangbo.lu@nxp.com> |
|---|---|
| Date | 2016-03-25 08:00 +0100 |
| Message-ID | <rgtSW-6iV-5@gated-at.bofh.it> |
| In reply to | #1360856 |
> -----Original Message-----
> From: Scott Wood
> Sent: Saturday, March 19, 2016 2:16 AM
> To: Rob Herring; Yangbo Lu
> Cc: devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> linux-kernel@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; linux-
> clk@vger.kernel.org; linux-i2c@vger.kernel.org; iommu@lists.linux-
> foundation.org; netdev@vger.kernel.org; linux-mmc@vger.kernel.org;
> Russell King; Jochen Friedrich; Joerg Roedel; Claudiu Manoil;
> ulf.hansson@linaro.org; Bhupesh Sharma; Zhao Qiang; Kumar Gala; Santosh
> Shilimkar; Yang-Leo Li; Xiaobo Xie
> Subject: Re: [v6, 3/5] dt: move guts devicetree doc out of powerpc
> directory
>
> On 03/17/2016 12:06 PM, Rob Herring wrote:
> > On Wed, Mar 09, 2016 at 06:08:49PM +0800, Yangbo Lu wrote:
> >> Move guts devicetree doc to
> >> Documentation/devicetree/bindings/soc/fsl/
> >> since it's used by not only PowerPC but also ARM. And add a
> >> specification for 'little-endian' property.
> >>
> >> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
> >> ---
> >> Changes for v2:
> >> - None
> >> Changes for v3:
> >> - None
> >> Changes for v4:
> >> - Added this patch
> >> Changes for v5:
> >> - Modified the description for little-endian property Changes for
> >> v6:
> >> - None
> >> ---
> >> Documentation/devicetree/bindings/{powerpc => soc}/fsl/guts.txt | 3
> >> +++
> >> 1 file changed, 3 insertions(+)
> >> rename Documentation/devicetree/bindings/{powerpc =>
> >> soc}/fsl/guts.txt (91%)
> >>
> >> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
> >> b/Documentation/devicetree/bindings/soc/fsl/guts.txt
> >> similarity index 91%
> >> rename from Documentation/devicetree/bindings/powerpc/fsl/guts.txt
> >> rename to Documentation/devicetree/bindings/soc/fsl/guts.txt
> >> index b71b203..07adca9 100644
> >> --- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt
> >> +++ b/Documentation/devicetree/bindings/soc/fsl/guts.txt
> >> @@ -25,6 +25,9 @@ Recommended properties:
> >> - fsl,liodn-bits : Indicates the number of defined bits in the LIODN
> >> registers, for those SOCs that have a PAMU device.
> >>
> >> + - little-endian : Indicates that the global utilities block is
> little
> >> + endian. The default is big endian.
> >
> > The default is "the native endianness of the system". So absence on an
> > ARM system would be LE.
>
> No. For this binding, the default is big-endian, because that's what
> existed for this device before an endian property was added.
>
> "endianness of the system" is not a well-defined concept.
>
> > This property is valid for any simple-bus device,
>
> Since when does simple-bus mean anything more than that the nodes
> underneath it can be used without bus-specific knowledge?
>
> > so it isn't really required to document per device. You can, but your
> > description had better match the documented behaviour.
>
> Documented where?
>
> In fact, Documentation/devicetree/bindings/common-properties.txt
> explicitly says of the endian properties, "If a binding supports these
> properties, then the binding should also specify the default behavior if
> none of these properties are present."
>
> -Scott
[Lu Yangbo-B47093] So, Rob, could you accept this patch after so much discussion?
:)
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web