Re: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
On Jan 17, 2013, at 4:34 PM, Timur Tabi wrote: > From: Timur Tabi > > 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. > > Signed-off-by: Timur Tabi > --- > .../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 applied to next - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
RE: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
> -Original Message- > From: Gala Kumar-B11780 > Sent: Wednesday, January 23, 2013 11:27 AM > To: Wood Scott-B07421; Yoder Stuart-B08248 > Cc: linuxppc-...@ozlabs.org list; Timur Tabi > Subject: Re: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the > device tree > > > On Jan 17, 2013, at 4:34 PM, Timur Tabi wrote: > > > From: Timur Tabi > > > > 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. > > > > Signed-off-by: Timur Tabi > > --- > > .../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 > > Scott, Stuart, does this have your guys Ack? Ack ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
On 01/23/2013 11:27:29 AM, Gala Kumar-B11780 wrote: On Jan 17, 2013, at 4:34 PM, Timur Tabi wrote: > From: Timur Tabi > > 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. > > Signed-off-by: Timur Tabi > --- > .../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 Scott, Stuart, does this have your guys Ack? ACK -Scott ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
On Jan 17, 2013, at 4:34 PM, Timur Tabi wrote: > From: Timur Tabi > > 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. > > Signed-off-by: Timur Tabi > --- > .../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 Scott, Stuart, does this have your guys Ack? - k ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH 2/2] powerpc/85xx: describe the PAMU topology in the device tree
From: Timur Tabi 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. Signed-off-by: Timur Tabi --- .../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 diff --git a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt b/Documentation/devicetree/bindings/powerpc/fsl/guts.txt index 9e7a241..1970542 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/guts.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/guts.txt @@ -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@e {/* global utilities block */ compatible = "fsl,mpc8548-guts"; reg = ; fsl,has-rstcr; }; + + guts: global-utilities@e { + compatible = "fsl,qoriq-device-config-1.0"; + reg = <0xe 0xe00>; + fsl,has-rstcr; + #sleep-cells = <1>; + fsl,liodn-bits = <12>; + }; + diff --git a/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt new file mode 100644 index 000..4826268 --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt @@ -0,0 +1,142 @@ +Freescale Peripheral Management Access Unit (PAMU) Device Tree Binding + +DESCRIPTION + +The PAMU is an I/O MMU that provides device-to-memory access control and +address translation capabilities. + +Required properties: + +- compatible : + First entry is a version-specific string, such as + "fsl,pamu-v1.0". The second is "fsl,pamu". +- ranges : + A standard property. Utilized to describe the memory mapped + I/O space utilized by the controller. The size should + be set to the total size of the register space of all + physically present PAMU controllers. For example, for + PAMU v1.0, on an SOC that has five PAMU devices, the size + is 0x5000. +- interrupts : + Interrupt mappings. The first tuple is the normal PAMU + interrupt, used for reporting access violations. The second + is for PAMU hardware errors, such as PAMU operation errors + and ECC errors. +- #address-cells: + A standard property. +- #size-cells : + A standard property. + +Optional properties: +- reg : + A standard property. It represents the CCSR registers of + all child PAMUs combined. Include it to provide support + for legacy drivers. +- interrupt-parent : + Phandle to interrupt controller + +Child nodes: + +Each child node represents one PAMU controller. Each SOC device that is +connected to a specific PAMU device should have a "fsl,pamu-phandle" property +that links to the corresponding specific child PAMU controller. + +- reg : + A standard property. Specifies the physical address and + length (relative to the parent 'ranges' property) of this + PAMU controller's configuration registers. The size should + be set to the size of this PAMU controllers's register space. + For PAMU v1.0, this size is 0x1000. +- fsl,primary-cache-geometry + : + Two cells that specify the geometry of the primary PAMU + cache. The first is the number of cache lines