* [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
@ 2022-05-04 18:08 Pali Rohár
2022-05-05 15:40 ` Rob Herring
2022-07-29 13:02 ` Michael Ellerman
0 siblings, 2 replies; 12+ messages in thread
From: Pali Rohár @ 2022-05-04 18:08 UTC (permalink / raw)
To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
Rob Herring, Krzysztof Kozlowski
Cc: linuxppc-dev, linux-kernel
DT law_trgt_if property defines Local Access Window Target Interface.
Local Access Window Target Interface is used for identifying individual
peripheral and mapping its memory to CPU. Interface id is defined by
hardware itself.
U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory
mapping of individual PCIe controllers.
Linux kernel fsl_pci.c driver currently does not touch Local Access Window
and expects that U-Boot configures it properly.
Add law_trgt_if property to PCIe DT nodes for P2020. This allows usage of
kernel P2020 PCIe DT nodes in U-Boot. And therefore allows to share P2020
DTS files between Linux kernel and U-Boot.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
arch/powerpc/boot/dts/fsl/p2020si-post.dtsi | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/boot/dts/fsl/p2020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p2020si-post.dtsi
index 884e01bcb243..6345629524fe 100644
--- a/arch/powerpc/boot/dts/fsl/p2020si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p2020si-post.dtsi
@@ -48,6 +48,7 @@
bus-range = <0 255>;
clock-frequency = <33333333>;
interrupts = <26 2 0 0>;
+ law_trgt_if = <2>;
pcie@0 {
reg = <0 0 0 0 0>;
@@ -76,6 +77,7 @@
bus-range = <0 255>;
clock-frequency = <33333333>;
interrupts = <25 2 0 0>;
+ law_trgt_if = <1>;
pcie@0 {
reg = <0 0 0 0 0>;
@@ -105,6 +107,7 @@
bus-range = <0 255>;
clock-frequency = <33333333>;
interrupts = <24 2 0 0>;
+ law_trgt_if = <0>;
pcie@0 {
reg = <0 0 0 0 0>;
--
2.20.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
2022-05-04 18:08 [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes Pali Rohár
@ 2022-05-05 15:40 ` Rob Herring
2022-07-29 13:02 ` Michael Ellerman
1 sibling, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-05-05 15:40 UTC (permalink / raw)
To: Pali Rohár
Cc: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
Krzysztof Kozlowski, linuxppc-dev, linux-kernel
On Wed, May 4, 2022 at 1:09 PM Pali Rohár <pali@kernel.org> wrote:
>
> DT law_trgt_if property defines Local Access Window Target Interface.
Documentation?
fsl,law-trgt-if would be the preferred form.
> Local Access Window Target Interface is used for identifying individual
> peripheral and mapping its memory to CPU. Interface id is defined by
> hardware itself.
Normally, we avoid instance indices like this, but if it is more than
just documentation convention maybe that's fine.
Rob
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
@ 2022-05-05 15:40 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-05-05 15:40 UTC (permalink / raw)
To: Pali Rohár
Cc: linux-kernel, Paul Mackerras, Krzysztof Kozlowski, linuxppc-dev
On Wed, May 4, 2022 at 1:09 PM Pali Rohár <pali@kernel.org> wrote:
>
> DT law_trgt_if property defines Local Access Window Target Interface.
Documentation?
fsl,law-trgt-if would be the preferred form.
> Local Access Window Target Interface is used for identifying individual
> peripheral and mapping its memory to CPU. Interface id is defined by
> hardware itself.
Normally, we avoid instance indices like this, but if it is more than
just documentation convention maybe that's fine.
Rob
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
2022-05-05 15:40 ` Rob Herring
@ 2022-05-05 15:47 ` Pali Rohár
-1 siblings, 0 replies; 12+ messages in thread
From: Pali Rohár @ 2022-05-05 15:47 UTC (permalink / raw)
To: Rob Herring
Cc: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras,
Krzysztof Kozlowski, linuxppc-dev, linux-kernel
On Thursday 05 May 2022 10:40:09 Rob Herring wrote:
> On Wed, May 4, 2022 at 1:09 PM Pali Rohár <pali@kernel.org> wrote:
> >
> > DT law_trgt_if property defines Local Access Window Target Interface.
>
> Documentation?
I was not able to find it :-( So the only documentation for me was the
source code and decoding how it works and how it is used.
> fsl,law-trgt-if would be the preferred form.
>
> > Local Access Window Target Interface is used for identifying individual
> > peripheral and mapping its memory to CPU. Interface id is defined by
> > hardware itself.
>
> Normally, we avoid instance indices like this, but if it is more than
> just documentation convention maybe that's fine.
>
> Rob
It is id defined by HW. Software needs to know how to pair DT node with
address range defined in "ranges" to the correct HW PCIe controller.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
@ 2022-05-05 15:47 ` Pali Rohár
0 siblings, 0 replies; 12+ messages in thread
From: Pali Rohár @ 2022-05-05 15:47 UTC (permalink / raw)
To: Rob Herring
Cc: linux-kernel, Paul Mackerras, Krzysztof Kozlowski, linuxppc-dev
On Thursday 05 May 2022 10:40:09 Rob Herring wrote:
> On Wed, May 4, 2022 at 1:09 PM Pali Rohár <pali@kernel.org> wrote:
> >
> > DT law_trgt_if property defines Local Access Window Target Interface.
>
> Documentation?
I was not able to find it :-( So the only documentation for me was the
source code and decoding how it works and how it is used.
> fsl,law-trgt-if would be the preferred form.
>
> > Local Access Window Target Interface is used for identifying individual
> > peripheral and mapping its memory to CPU. Interface id is defined by
> > hardware itself.
>
> Normally, we avoid instance indices like this, but if it is more than
> just documentation convention maybe that's fine.
>
> Rob
It is id defined by HW. Software needs to know how to pair DT node with
address range defined in "ranges" to the correct HW PCIe controller.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
2022-05-04 18:08 [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes Pali Rohár
2022-05-05 15:40 ` Rob Herring
@ 2022-07-29 13:02 ` Michael Ellerman
2022-07-29 13:46 ` Rob Herring
1 sibling, 1 reply; 12+ messages in thread
From: Michael Ellerman @ 2022-07-29 13:02 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Pali Rohár, Rob Herring, Krzysztof Kozlowski
Cc: linuxppc-dev, linux-kernel
On Wed, 4 May 2022 20:08:22 +0200, Pali Rohár wrote:
> DT law_trgt_if property defines Local Access Window Target Interface.
>
> Local Access Window Target Interface is used for identifying individual
> peripheral and mapping its memory to CPU. Interface id is defined by
> hardware itself.
>
> U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory
> mapping of individual PCIe controllers.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
https://git.kernel.org/powerpc/c/1f00b5ab992c122c51bc37662b3b4df5963462f3
cheers
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
2022-07-29 13:02 ` Michael Ellerman
@ 2022-07-29 13:46 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-07-29 13:46 UTC (permalink / raw)
To: Michael Ellerman
Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
Pali Rohár, Krzysztof Kozlowski, linux-kernel, linuxppc-dev
On Fri, Jul 29, 2022 at 7:17 AM Michael Ellerman
<patch-notifications@ellerman.id.au> wrote:
>
> On Wed, 4 May 2022 20:08:22 +0200, Pali Rohár wrote:
> > DT law_trgt_if property defines Local Access Window Target Interface.
> >
> > Local Access Window Target Interface is used for identifying individual
> > peripheral and mapping its memory to CPU. Interface id is defined by
> > hardware itself.
> >
> > U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory
> > mapping of individual PCIe controllers.
> >
> > [...]
>
> Applied to powerpc/next.
>
> [1/1] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
> https://git.kernel.org/powerpc/c/1f00b5ab992c122c51bc37662b3b4df5963462f3
Why? Minimally, it needs a vendor prefix and s/_/-/ as I commented.
Rob
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
@ 2022-07-29 13:46 ` Rob Herring
0 siblings, 0 replies; 12+ messages in thread
From: Rob Herring @ 2022-07-29 13:46 UTC (permalink / raw)
To: Michael Ellerman
Cc: linuxppc-dev, linux-kernel, Paul Mackerras, Krzysztof Kozlowski,
Pali Rohár
On Fri, Jul 29, 2022 at 7:17 AM Michael Ellerman
<patch-notifications@ellerman.id.au> wrote:
>
> On Wed, 4 May 2022 20:08:22 +0200, Pali Rohár wrote:
> > DT law_trgt_if property defines Local Access Window Target Interface.
> >
> > Local Access Window Target Interface is used for identifying individual
> > peripheral and mapping its memory to CPU. Interface id is defined by
> > hardware itself.
> >
> > U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory
> > mapping of individual PCIe controllers.
> >
> > [...]
>
> Applied to powerpc/next.
>
> [1/1] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
> https://git.kernel.org/powerpc/c/1f00b5ab992c122c51bc37662b3b4df5963462f3
Why? Minimally, it needs a vendor prefix and s/_/-/ as I commented.
Rob
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
2022-07-29 13:46 ` Rob Herring
@ 2022-08-01 3:38 ` Michael Ellerman
-1 siblings, 0 replies; 12+ messages in thread
From: Michael Ellerman @ 2022-08-01 3:38 UTC (permalink / raw)
To: Rob Herring, Michael Ellerman
Cc: Benjamin Herrenschmidt, Paul Mackerras, Pali Rohár,
Krzysztof Kozlowski, linux-kernel, linuxppc-dev
Rob Herring <robh+dt@kernel.org> writes:
> On Fri, Jul 29, 2022 at 7:17 AM Michael Ellerman
> <patch-notifications@ellerman.id.au> wrote:
>>
>> On Wed, 4 May 2022 20:08:22 +0200, Pali Rohár wrote:
>> > DT law_trgt_if property defines Local Access Window Target Interface.
>> >
>> > Local Access Window Target Interface is used for identifying individual
>> > peripheral and mapping its memory to CPU. Interface id is defined by
>> > hardware itself.
>> >
>> > U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory
>> > mapping of individual PCIe controllers.
>> >
>> > [...]
>>
>> Applied to powerpc/next.
>>
>> [1/1] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
>> https://git.kernel.org/powerpc/c/1f00b5ab992c122c51bc37662b3b4df5963462f3
>
> Why? Minimally, it needs a vendor prefix and s/_/-/ as I commented.
OK. I misread your "maybe that's fine" as approval.
Pali can you send a fixup patch please?
cheers
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
@ 2022-08-01 3:38 ` Michael Ellerman
0 siblings, 0 replies; 12+ messages in thread
From: Michael Ellerman @ 2022-08-01 3:38 UTC (permalink / raw)
To: Rob Herring, Michael Ellerman
Cc: Pali Rohár, linux-kernel, Paul Mackerras,
Krzysztof Kozlowski, linuxppc-dev
Rob Herring <robh+dt@kernel.org> writes:
> On Fri, Jul 29, 2022 at 7:17 AM Michael Ellerman
> <patch-notifications@ellerman.id.au> wrote:
>>
>> On Wed, 4 May 2022 20:08:22 +0200, Pali Rohár wrote:
>> > DT law_trgt_if property defines Local Access Window Target Interface.
>> >
>> > Local Access Window Target Interface is used for identifying individual
>> > peripheral and mapping its memory to CPU. Interface id is defined by
>> > hardware itself.
>> >
>> > U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory
>> > mapping of individual PCIe controllers.
>> >
>> > [...]
>>
>> Applied to powerpc/next.
>>
>> [1/1] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
>> https://git.kernel.org/powerpc/c/1f00b5ab992c122c51bc37662b3b4df5963462f3
>
> Why? Minimally, it needs a vendor prefix and s/_/-/ as I commented.
OK. I misread your "maybe that's fine" as approval.
Pali can you send a fixup patch please?
cheers
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
2022-08-01 3:38 ` Michael Ellerman
@ 2022-08-01 7:55 ` Pali Rohár
-1 siblings, 0 replies; 12+ messages in thread
From: Pali Rohár @ 2022-08-01 7:55 UTC (permalink / raw)
To: Michael Ellerman
Cc: Rob Herring, Michael Ellerman, Benjamin Herrenschmidt,
Paul Mackerras, Krzysztof Kozlowski, linux-kernel, linuxppc-dev
On Monday 01 August 2022 13:38:32 Michael Ellerman wrote:
> Rob Herring <robh+dt@kernel.org> writes:
> > On Fri, Jul 29, 2022 at 7:17 AM Michael Ellerman
> > <patch-notifications@ellerman.id.au> wrote:
> >>
> >> On Wed, 4 May 2022 20:08:22 +0200, Pali Rohár wrote:
> >> > DT law_trgt_if property defines Local Access Window Target Interface.
> >> >
> >> > Local Access Window Target Interface is used for identifying individual
> >> > peripheral and mapping its memory to CPU. Interface id is defined by
> >> > hardware itself.
> >> >
> >> > U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory
> >> > mapping of individual PCIe controllers.
> >> >
> >> > [...]
> >>
> >> Applied to powerpc/next.
> >>
> >> [1/1] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
> >> https://git.kernel.org/powerpc/c/1f00b5ab992c122c51bc37662b3b4df5963462f3
> >
> > Why? Minimally, it needs a vendor prefix and s/_/-/ as I commented.
>
> OK. I misread your "maybe that's fine" as approval.
>
> Pali can you send a fixup patch please?
>
> cheers
No I cannot. This is how this property is used by bootloaders for at
least 10 years. There are underlines (not hyphens) and there is no
vendor prefix.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
@ 2022-08-01 7:55 ` Pali Rohár
0 siblings, 0 replies; 12+ messages in thread
From: Pali Rohár @ 2022-08-01 7:55 UTC (permalink / raw)
To: Michael Ellerman
Cc: Michael Ellerman, linux-kernel, Rob Herring, Paul Mackerras,
Krzysztof Kozlowski, linuxppc-dev
On Monday 01 August 2022 13:38:32 Michael Ellerman wrote:
> Rob Herring <robh+dt@kernel.org> writes:
> > On Fri, Jul 29, 2022 at 7:17 AM Michael Ellerman
> > <patch-notifications@ellerman.id.au> wrote:
> >>
> >> On Wed, 4 May 2022 20:08:22 +0200, Pali Rohár wrote:
> >> > DT law_trgt_if property defines Local Access Window Target Interface.
> >> >
> >> > Local Access Window Target Interface is used for identifying individual
> >> > peripheral and mapping its memory to CPU. Interface id is defined by
> >> > hardware itself.
> >> >
> >> > U-Boot uses law_trgt_if DT property in PCIe nodes for configuring memory
> >> > mapping of individual PCIe controllers.
> >> >
> >> > [...]
> >>
> >> Applied to powerpc/next.
> >>
> >> [1/1] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes
> >> https://git.kernel.org/powerpc/c/1f00b5ab992c122c51bc37662b3b4df5963462f3
> >
> > Why? Minimally, it needs a vendor prefix and s/_/-/ as I commented.
>
> OK. I misread your "maybe that's fine" as approval.
>
> Pali can you send a fixup patch please?
>
> cheers
No I cannot. This is how this property is used by bootloaders for at
least 10 years. There are underlines (not hyphens) and there is no
vendor prefix.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2022-08-01 7:56 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-04 18:08 [PATCH] powerpc/85xx: P2020: Add law_trgt_if property to PCIe DT nodes Pali Rohár
2022-05-05 15:40 ` Rob Herring
2022-05-05 15:40 ` Rob Herring
2022-05-05 15:47 ` Pali Rohár
2022-05-05 15:47 ` Pali Rohár
2022-07-29 13:02 ` Michael Ellerman
2022-07-29 13:46 ` Rob Herring
2022-07-29 13:46 ` Rob Herring
2022-08-01 3:38 ` Michael Ellerman
2022-08-01 3:38 ` Michael Ellerman
2022-08-01 7:55 ` Pali Rohár
2022-08-01 7:55 ` Pali Rohár
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.