powerpc/85xx: fix various PCI node compatible strings
Subsystems (3)
PATCH 1/2 powerpc/85xx: fix various PCI node compatible strings
From: Timur Tabi <[email protected]>
Fix and/or improve the compatible strings of the PCI device tree nodes for some Freescale SOCs. This fixes some issues and improves consistency among the SOCs.
Specifically:
1) The P1022 has a v1 PCIe controller, so the compatible property should just say "fsl,mpc8548-pcie". U-Boot does not look for "fsl,p1022-pcie", so it wasn't fixing up the node.
2) The P4080 has a v2.1 PCIe controller, so add that version-specific string to the device tree. Update the kernel to also look for that string. Currently, the kernel looks for "fsl,p4080-pcie" specifically, but eventually that check should be deleted.
3) The P1010 device tree claims compatibility with v2.2 and v2.3, but that's redundant. No other device tree does this. Remove the v2.2 string.
4) The kernel looks for both "fsl,p1023-pcie" and "fsl,qoriq-pcie-v2.2", even though the P1023 device trees has always included both strings. Remove the search for "fsl,p1023-pcie".
--- arch/powerpc/boot/dts/fsl/p1010si-post.dtsi | 4 ++-- arch/powerpc/boot/dts/fsl/p1022si-post.dtsi | 6 +++--- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 6 +++--- arch/powerpc/sysdev/fsl_pci.c | 15 ++++++++++----- 4 files changed, 18 insertions(+), 13 deletions(-)
arch/powerpc/boot/dts/fsl/p1010si-post.dtsi +2 -2
@@ -41,7 +41,7 @@ /* controller at 0x9000 */ &pci0 { - compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3", "fsl,qoriq-pcie-v2.2"; + compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3"; device_type = "pci"; #size-cells = <2>; #address-cells = <3>;
@@ -69,7 +69,7 @@ /* controller at 0xa000 */ &pci1 { - compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3", "fsl,qoriq-pcie-v2.2"; + compatible = "fsl,p1010-pcie", "fsl,qoriq-pcie-v2.3"; device_type = "pci"; #size-cells = <2>; #address-cells = <3>;
arch/powerpc/boot/dts/fsl/p1022si-post.dtsi +3 -3
@@ -45,7 +45,7 @@ /* controller at 0x9000 */ &pci0 { - compatible = "fsl,p1022-pcie"; + compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #size-cells = <2>; #address-cells = <3>;
@@ -73,7 +73,7 @@ /* controller at 0xa000 */ &pci1 { - compatible = "fsl,p1022-pcie"; + compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #size-cells = <2>; #address-cells = <3>;
@@ -102,7 +102,7 @@ /* controller at 0xb000 */ &pci2 { - compatible = "fsl,p1022-pcie"; + compatible = "fsl,mpc8548-pcie"; device_type = "pci"; #size-cells = <2>; #address-cells = <3>;
arch/powerpc/boot/dts/fsl/p4080si-post.dtsi +3 -3
@@ -41,7 +41,7 @@ /* controller at 0x200000 */ &pci0 { - compatible = "fsl,p4080-pcie"; + compatible = "fsl,p4080-pcie", "fsl,qoriq-pcie-v2.1"; device_type = "pci"; #size-cells = <2>; #address-cells = <3>;
@@ -68,7 +68,7 @@ /* controller at 0x201000 */ &pci1 { - compatible = "fsl,p4080-pcie"; + compatible = "fsl,p4080-pcie", "fsl,qoriq-pcie-v2.1"; device_type = "pci"; #size-cells = <2>; #address-cells = <3>;
@@ -95,7 +95,7 @@ /* controller at 0x202000 */ &pci2 { - compatible = "fsl,p4080-pcie"; + compatible = "fsl,p4080-pcie", "fsl,qoriq-pcie-v2.1"; device_type = "pci"; #size-cells = <2>; #address-cells = <3>;
arch/powerpc/sysdev/fsl_pci.c +10 -5
@@ -827,13 +827,18 @@ static const struct of_device_id pci_ids[] = { { .compatible = "fsl,mpc8548-pcie", }, { .compatible = "fsl,mpc8610-pci", }, { .compatible = "fsl,mpc8641-pcie", }, + { .compatible = "fsl,qoriq-pcie-v2.1", }, + { .compatible = "fsl,qoriq-pcie-v2.2", }, + { .compatible = "fsl,qoriq-pcie-v2.3", }, + { .compatible = "fsl,qoriq-pcie-v2.4", }, + + /* + * The following entries are for compatibility with older device + * trees. + */ { .compatible = "fsl,p1022-pcie", }, - { .compatible = "fsl,p1010-pcie", }, - { .compatible = "fsl,p1023-pcie", }, { .compatible = "fsl,p4080-pcie", }, - { .compatible = "fsl,qoriq-pcie-v2.4", }, - { .compatible = "fsl,qoriq-pcie-v2.3", }, - { .compatible = "fsl,qoriq-pcie-v2.2", }, + {}, };
Signature · 1 line
1.7.3.4
PATCH 2/2 powerpc/85xx: describe the PAMU topology in the device tree
From: Timur Tabi <[email protected]>
The PAMU caches use the LIODNs to determine which cache lines hold the entries for the corresponding LIODs. The LIODNs must therefore be carefully assigned to avoid cache thrashing -- two active LIODs with LIODNs that put them in the same cache line.
Currently, LIODNs are statically assigned by U-Boot, but this has limitations. LIODNs are assigned even for devices that may be disabled or unused by the kernel. Static assignments also do not allow for device drivers which may know which LIODs can be used simultaneously. In other words, we really should assign LIODNs dynamically in Linux.
To do that, we need to describe the PAMU device and cache topologies in the device trees.
--- .../devicetree/bindings/powerpc/fsl/guts.txt | 14 ++- .../devicetree/bindings/powerpc/fsl/pamu.txt | 142 ++++++++++++++++++++ arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 87 +++++++++++-- arch/powerpc/boot/dts/fsl/p3041si-post.dtsi | 87 +++++++++++-- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 68 +++++++++- arch/powerpc/boot/dts/fsl/p5020si-post.dtsi | 92 +++++++++++-- arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | 92 +++++++++++-- 7 files changed, 533 insertions(+), 49 deletions(-) create mode 100644 Documentation/devicetree/bindings/powerpc/fsl/pamu.txt
Documentation/devicetree/bindings/powerpc/fsl/guts.txt +13 -1
@@ -17,9 +17,21 @@ Recommended properties: contains a functioning "reset control register" (i.e. the board is wired to reset upon setting the HRESET_REQ bit in this register). -Example: + - fsl,liodn-bits : Indicates the number of defined bits in the LIODN + registers, for those SOCs that have a PAMU device. + +Examples: global-utilities@e0000 { /* global utilities block */ compatible = "fsl,mpc8548-guts"; reg = <e0000 1000>; fsl,has-rstcr; }; + + guts: global-utilities@e0000 { + compatible = "fsl,qoriq-device-config-1.0"; + reg = <0xe0000 0xe00>; + fsl,has-rstcr; + #sleep-cells = <1>; + fsl,liodn-bits = <12>; + }; +
Documentation/devicetree/bindings/powerpc/fsl/pamu.txt new file +142 -0
142 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi +76 -11
155 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/p3041si-post.dtsi +76 -11
155 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/p4080si-post.dtsi +67 -1
140 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/p5020si-post.dtsi +81 -11
167 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/p5040si-post.dtsi +78 -14
139 lines not on this page · raw message
Signature · 1 line
1.7.3.4
Re: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
Quoted 16 lines · Timur Tabi
From: Timur Tabi <[email protected]>
=20
The PAMU caches use the LIODNs to determine which cache lines hold the entries for the corresponding LIODs. The LIODNs must therefore be carefully assigned to avoid cache thrashing -- two active LIODs with LIODNs that put them in the same cache line.
=20
Currently, LIODNs are statically assigned by U-Boot, but this has limitations. LIODNs are assigned even for devices that may be disabled or unused by the kernel. Static assignments also do not allow for device drivers which may know which LIODs can be used simultaneously. In other words, we really should assign LIODNs dynamically in Linux. =20
To do that, we need to describe the PAMU device and cache topologies in the device trees.
=20
Quoted 4 lines
Signed-off-by Timur Tabi <[email protected]>---
.../devicetree/bindings/powerpc/fsl/guts.txt| 14 ++-.../devicetree/bindings/powerpc/fsl/pamu.txt| 142 +++++++++++++++=
+++++
Quoted 7 lines
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 87 +++++++++++-- arch/powerpc/boot/dts/fsl/p3041si-post.dtsi | 87 +++++++++++-- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 68 +++++++++- arch/powerpc/boot/dts/fsl/p5020si-post.dtsi | 92 +++++++++++-- arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | 92 +++++++++++-- 7 files changed, 533 insertions(+), 49 deletions(-)create mode 100644
Documentation/devicetree/bindings/powerpc/fsl/pamu.txt
Scott, Stuart, does this have your guys Ack?
- k=
Re: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
Quoted 34 lines · On 01/23/2013 11:27:29 AM, Gala Kumar-B11780 wrote:
=20
On Jan 17, 2013, at 4:34 PM, Timur Tabi wrote:
=20Quoted 3 lines
From: Timur Tabi <[email protected]>
The PAMU caches use the LIODNs to determine which cache lines hold =20
the
Quoted 6 lines
entries for the corresponding LIODs. The LIODNs must therefore be carefully assigned to avoid cache thrashing -- two active LIODs with LIODNs that put them in the same cache line.
Currently, LIODNs are statically assigned by U-Boot, but this has limitations. LIODNs are assigned even for devices that may be =20
disabled
Quoted 1 line
or unused by the kernel. Static assignments also do not allow for =20
device
Quoted 4 lines
drivers which may know which LIODs can be used simultaneously. In other words, we really should assign LIODNs dynamically in Linux.
To do that, we need to describe the PAMU device and cache =20
topologies in
Quoted 6 lines
the device trees.
Signed-off-by Timur Tabi <[email protected]>---
.../devicetree/bindings/powerpc/fsl/guts.txt| 14 ++-.../devicetree/bindings/powerpc/fsl/pamu.txt| 142 =20++++++++++++++++++++
Quoted 1 line
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi| 87 =20+++++++++++--
Quoted 1 line
arch/powerpc/boot/dts/fsl/p3041si-post.dtsi| 87 =20+++++++++++--
Quoted 2 lines
arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 68 +++++++++- arch/powerpc/boot/dts/fsl/p5020si-post.dtsi | 92 =20
Quoted 8 lines
+++++++++++--
Quoted 1 line
arch/powerpc/boot/dts/fsl/p5040si-post.dtsi| 92 =20+++++++++++--
Quoted 2 lines
7 files changed, 533 insertions(+), 49 deletions(-)create mode 100644 =20
Documentation/devicetree/bindings/powerpc/fsl/pamu.txt=20
Scott, Stuart, does this have your guys Ack?
ACK
-Scott=
RE: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
In reply to Gala Kumar-B11780Quoted 8 lines
-----Original Message-----
From: Gala Kumar-B11780
Sent: Wednesday, January 23, 2013 11:27 AM
To: Wood Scott-B07421; Yoder Stuart-B08248
Cc: [email protected] list; Timur Tabi
Subject: Re: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the =
device tree
Quoted 14 lines
=20
=20
On Jan 17, 2013, at 4:34 PM, Timur Tabi wrote:
=20Quoted 10 lines
From: Timur Tabi <[email protected]>
The PAMU caches use the LIODNs to determine which cache lines hold the entries for the corresponding LIODs. The LIODNs must therefore be carefully assigned to avoid cache thrashing -- two active LIODs with LIODNs that put them in the same cache line.
Currently, LIODNs are statically assigned by U-Boot, but this has limitations. LIODNs are assigned even for devices that may be disabled or unused by the kernel. Static assignments also do not allow for devi=
ce
Quoted 10 lines
Quoted 10 lines
drivers which may know which LIODs can be used simultaneously. In other words, we really should assign LIODNs dynamically in Linux.
To do that, we need to describe the PAMU device and cache topologies in the device trees.
Signed-off-by Timur Tabi <[email protected]>---
.../devicetree/bindings/powerpc/fsl/guts.txt| 14 ++-.../devicetree/bindings/powerpc/fsl/pamu.txt| 142 +++++++++++++=
+++++++
Quoted 7 lines
Quoted 7 lines
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 87 +++++++++++-- arch/powerpc/boot/dts/fsl/p3041si-post.dtsi | 87 +++++++++++-- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 68 +++++++++- arch/powerpc/boot/dts/fsl/p5020si-post.dtsi | 92 +++++++++++-- arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | 92 +++++++++++-- 7 files changed, 533 insertions(+), 49 deletions(-)create mode 100644 Documentation/devicetree/bindings/powerpc/fsl/pamu.t=
xt
Quoted 2 lines
=20
Scott, Stuart, does this have your guys Ack?
Ack
Gala Kumar-B11780
AppliedRe: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
In reply to Timur TabiQuoted 16 lines · Timur Tabi
From: Timur Tabi <[email protected]>
=20
The PAMU caches use the LIODNs to determine which cache lines hold the entries for the corresponding LIODs. The LIODNs must therefore be carefully assigned to avoid cache thrashing -- two active LIODs with LIODNs that put them in the same cache line.
=20
Currently, LIODNs are statically assigned by U-Boot, but this has limitations. LIODNs are assigned even for devices that may be disabled or unused by the kernel. Static assignments also do not allow for device drivers which may know which LIODs can be used simultaneously. In other words, we really should assign LIODNs dynamically in Linux. =20
To do that, we need to describe the PAMU device and cache topologies in the device trees.
=20
Quoted 4 lines
Signed-off-by Timur Tabi <[email protected]>---
.../devicetree/bindings/powerpc/fsl/guts.txt| 14 ++-.../devicetree/bindings/powerpc/fsl/pamu.txt| 142 +++++++++++++++=
+++++
Quoted 7 lines
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 87 +++++++++++-- arch/powerpc/boot/dts/fsl/p3041si-post.dtsi | 87 +++++++++++-- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 68 +++++++++- arch/powerpc/boot/dts/fsl/p5020si-post.dtsi | 92 +++++++++++-- arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | 92 +++++++++++-- 7 files changed, 533 insertions(+), 49 deletions(-)create mode 100644
Documentation/devicetree/bindings/powerpc/fsl/pamu.txt
applied to next
- k=
Gala Kumar-B11780
AppliedQuoted 3 lines · Timur Tabi
From: Timur Tabi <[email protected]>
=20
Fix and/or improve the compatible strings of the PCI device tree nodes fo=
r
Quoted 1 line
some Freescale SOCs. This fixes some issues and improves consistency amo=
ng
Quoted 5 lines
the SOCs.
=20
Specifically:
=20
1) The P1022 has a v1 PCIe controller, so the compatible property should =
just
Quoted 4 lines
say "fsl,mpc8548-pcie". U-Boot does not look for "fsl,p1022-pcie", so it wasn't fixing up the node.
=20
2) The P4080 has a v2.1 PCIe controller, so add that version-specific str=
ing
Quoted 5 lines
to the device tree. Update the kernel to also look for that string. Currently, the kernel looks for "fsl,p4080-pcie" specifically, but eventually that check should be deleted.
=20
3) The P1010 device tree claims compatibility with v2.2 and v2.3, but tha=
t's
Quoted 4 lines
redundant. No other device tree does this. Remove the v2.2 string. =20
4) The kernel looks for both "fsl,p1023-pcie" and "fsl,qoriq-pcie-v2.2", even though the P1023 device trees has always included both strings. Rem=
ove
Quoted 9 lines
the search for "fsl,p1023-pcie".
=20Signed-off-by Timur Tabi <[email protected]>---
arch/powerpc/boot/dts/fsl/p1010si-post.dtsi | 4 ++-- arch/powerpc/boot/dts/fsl/p1022si-post.dtsi | 6 +++--- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 6 +++--- arch/powerpc/sysdev/fsl_pci.c | 15 ++++++++++----- 4 files changed, 18 insertions(+), 13 deletions(-)
applied to next
- k=