* [PATCH v4 07/13] ARM: dts: mvebu: Add a new set of registers to the PMSU node [not found] ` <1392312816-17657-1-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> @ 2014-02-13 17:33 ` Gregory CLEMENT 2014-02-17 2:57 ` Jason Cooper [not found] ` <1392312816-17657-8-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> 0 siblings, 2 replies; 5+ messages in thread From: Gregory CLEMENT @ 2014-02-13 17:33 UTC (permalink / raw) To: Daniel Lezcano, Rafael J. Wysocki, linux-pm-u79uwXL29TY76Z2rM5mHXA, Lorenzo Pieralisi, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Gregory CLEMENT Cc: Thomas Petazzoni, Ezequiel Garcia, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Lior Amsalem, Tawfik Bayouk, Nadav Haklai, devicetree-u79uwXL29TY76Z2rM5mHXA The Power Management Unit Service block also controls the Coherency Fabric subsystem. This new set of registers is needed for the CPU idle implementation for the Armada XP, it allows to enter in a deep CPU idle state where the Coherency Fabric and the L2 cache are powerdown. Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Gregory CLEMENT <gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> --- Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt | 12 +++++++----- arch/arm/boot/dts/armada-xp.dtsi | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt index 926b4d6aae7e..8a9db0c32ba5 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt @@ -7,14 +7,16 @@ Required properties: - compatible: "marvell,armada-370-xp-pmsu" - reg: Should contain PMSU registers location and length. First pair - for the per-CPU SW Reset Control registers, second pair for the - Power Management Service Unit. + for the per-CPU SW Reset Control registers, second pair for the CPU + Power Management Service Unit registers, third pair for the Fabric Power + Management Service Unit registers. Example: -armada-370-xp-pmsu@d0022000 { +armada-370-xp-pmsu@22000 { compatible = "marvell,armada-370-xp-pmsu"; - reg = <0xd0022100 0x430>, - <0xd0020800 0x20>; + reg = <0x22100 0x430>, + <0x20800 0x20>, + <0x22000 0x24>; }; diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi index b8b84a22f0f3..f717da4f4d97 100644 --- a/arch/arm/boot/dts/armada-xp.dtsi +++ b/arch/arm/boot/dts/armada-xp.dtsi @@ -113,7 +113,7 @@ armada-370-xp-pmsu@22000 { compatible = "marvell,armada-370-xp-pmsu"; - reg = <0x22100 0x400>, <0x20800 0x20>; + reg = <0x22100 0x400>, <0x20800 0x20>, <0x22000 0x24>; }; eth2: ethernet@30000 { -- 1.8.1.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v4 07/13] ARM: dts: mvebu: Add a new set of registers to the PMSU node 2014-02-13 17:33 ` [PATCH v4 07/13] ARM: dts: mvebu: Add a new set of registers to the PMSU node Gregory CLEMENT @ 2014-02-17 2:57 ` Jason Cooper [not found] ` <1392312816-17657-8-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> 1 sibling, 0 replies; 5+ messages in thread From: Jason Cooper @ 2014-02-17 2:57 UTC (permalink / raw) To: Gregory CLEMENT Cc: Daniel Lezcano, Rafael J. Wysocki, linux-pm, Lorenzo Pieralisi, Andrew Lunn, Sebastian Hesselbarth, Thomas Petazzoni, Lior Amsalem, Tawfik Bayouk, devicetree, Nadav Haklai, Ezequiel Garcia, linux-arm-kernel On Thu, Feb 13, 2014 at 06:33:30PM +0100, Gregory CLEMENT wrote: > The Power Management Unit Service block also controls the Coherency > Fabric subsystem. This new set of registers is needed for the CPU idle > implementation for the Armada XP, it allows to enter in a deep CPU > idle state where the Coherency Fabric and the L2 cache are powerdown. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> > --- > Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt | 12 +++++++----- > arch/arm/boot/dts/armada-xp.dtsi | 2 +- > 2 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt > index 926b4d6aae7e..8a9db0c32ba5 100644 > --- a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt > +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt > @@ -7,14 +7,16 @@ Required properties: > - compatible: "marvell,armada-370-xp-pmsu" > > - reg: Should contain PMSU registers location and length. First pair > - for the per-CPU SW Reset Control registers, second pair for the > - Power Management Service Unit. > + for the per-CPU SW Reset Control registers, second pair for the CPU > + Power Management Service Unit registers, third pair for the Fabric Power > + Management Service Unit registers. Please mention explicitly that previous versions of this binding only specified the first two registers. I haven't dug through the rest of this series yet, but I assume the driver will behave sanely when encountering an old dtb w/o the third reg entry? thx, Jason. > > Example: > > -armada-370-xp-pmsu@d0022000 { > +armada-370-xp-pmsu@22000 { > compatible = "marvell,armada-370-xp-pmsu"; > - reg = <0xd0022100 0x430>, > - <0xd0020800 0x20>; > + reg = <0x22100 0x430>, > + <0x20800 0x20>, > + <0x22000 0x24>; > }; > > diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi > index b8b84a22f0f3..f717da4f4d97 100644 > --- a/arch/arm/boot/dts/armada-xp.dtsi > +++ b/arch/arm/boot/dts/armada-xp.dtsi > @@ -113,7 +113,7 @@ > > armada-370-xp-pmsu@22000 { > compatible = "marvell,armada-370-xp-pmsu"; > - reg = <0x22100 0x400>, <0x20800 0x20>; > + reg = <0x22100 0x400>, <0x20800 0x20>, <0x22000 0x24>; > }; > > eth2: ethernet@30000 { > -- > 1.8.1.2 > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1392312816-17657-8-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>]
* Re: [PATCH v4 07/13] ARM: dts: mvebu: Add a new set of registers to the PMSU node [not found] ` <1392312816-17657-8-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> @ 2014-02-19 16:00 ` Thomas Petazzoni 2014-02-19 17:49 ` Gregory CLEMENT 0 siblings, 1 reply; 5+ messages in thread From: Thomas Petazzoni @ 2014-02-19 16:00 UTC (permalink / raw) To: Gregory CLEMENT Cc: Daniel Lezcano, Rafael J. Wysocki, linux-pm-u79uwXL29TY76Z2rM5mHXA, Lorenzo Pieralisi, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Lior Amsalem, Tawfik Bayouk, devicetree-u79uwXL29TY76Z2rM5mHXA, Nadav Haklai, Ezequiel Garcia, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Dear Gregory CLEMENT, On Thu, 13 Feb 2014 18:33:30 +0100, Gregory CLEMENT wrote: > - reg: Should contain PMSU registers location and length. First pair > - for the per-CPU SW Reset Control registers, second pair for the > - Power Management Service Unit. > + for the per-CPU SW Reset Control registers, second pair for the CPU > + Power Management Service Unit registers, third pair for the Fabric Power > + Management Service Unit registers. > > Example: > > -armada-370-xp-pmsu@d0022000 { > +armada-370-xp-pmsu@22000 { > compatible = "marvell,armada-370-xp-pmsu"; > - reg = <0xd0022100 0x430>, > - <0xd0020800 0x20>; > + reg = <0x22100 0x430>, > + <0x20800 0x20>, > + <0x22000 0x24>; I am not too happy with this because: *) We have to remove the second register pair from the PMSU. I haven't yet posted the patches on LAKML for SMP on 375 and 38x, but the 375 doesn't have a PMSU. It however has the same CPU reset control registers as 370 and XP. Therefore, these 0x20800 registers have to be handled by a separate driver (that uses the reset framework), and not handled by the PMSU driver. This way, Armada 370/XP can use PMSU+CPU reset, while 375 will only use CPU reset. *) I think making the PMSU register start at 0x22100 was a mistake. The PMSU registers actually start at 0x22000 and they seem to go all the way to 0x23000. So we should have only one register pair. This of course raises some backward compatibility questions for the DT. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4 07/13] ARM: dts: mvebu: Add a new set of registers to the PMSU node 2014-02-19 16:00 ` Thomas Petazzoni @ 2014-02-19 17:49 ` Gregory CLEMENT 2014-02-19 18:21 ` Thomas Petazzoni 0 siblings, 1 reply; 5+ messages in thread From: Gregory CLEMENT @ 2014-02-19 17:49 UTC (permalink / raw) To: Thomas Petazzoni Cc: Daniel Lezcano, linux-pm, Lorenzo Pieralisi, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Lior Amsalem, Tawfik Bayouk, devicetree, Nadav Haklai, Ezequiel Garcia, linux-arm-kernel On 19/02/2014 17:00, Thomas Petazzoni wrote: > Dear Gregory CLEMENT, > > On Thu, 13 Feb 2014 18:33:30 +0100, Gregory CLEMENT wrote: > >> - reg: Should contain PMSU registers location and length. First pair >> - for the per-CPU SW Reset Control registers, second pair for the >> - Power Management Service Unit. >> + for the per-CPU SW Reset Control registers, second pair for the CPU >> + Power Management Service Unit registers, third pair for the Fabric Power >> + Management Service Unit registers. >> >> Example: >> >> -armada-370-xp-pmsu@d0022000 { >> +armada-370-xp-pmsu@22000 { >> compatible = "marvell,armada-370-xp-pmsu"; >> - reg = <0xd0022100 0x430>, >> - <0xd0020800 0x20>; >> + reg = <0x22100 0x430>, >> + <0x20800 0x20>, >> + <0x22000 0x24>; > > I am not too happy with this because: > > *) We have to remove the second register pair from the PMSU. I haven't > yet posted the patches on LAKML for SMP on 375 and 38x, but the 375 > doesn't have a PMSU. It however has the same CPU reset control > registers as 370 and XP. Therefore, these 0x20800 registers have to > be handled by a separate driver (that uses the reset framework), > and not handled by the PMSU driver. This way, Armada 370/XP can use > PMSU+CPU reset, while 375 will only use CPU reset. > > *) I think making the PMSU register start at 0x22100 was a mistake. > The PMSU registers actually start at 0x22000 and they seem to go all > the way to 0x23000. So we should have only one register pair. This > of course raises some backward compatibility questions for the DT. I agree to use something like: armada-370-xp-pmsu@22000 { compatible = "marvell,armada-xp-pmsu"; /* new compatible string */ reg = <0x22000 0x1000>; }; and I think the best option would be to introduce a new compatible string for this. In the same time we continue to support the old compatible string but we print a big warning during the kernel boot that this compatible string is deprecated, and we will finally remove it a few release. Thanks, Gregory > > Thomas > -- Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com +33 602 196 044 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v4 07/13] ARM: dts: mvebu: Add a new set of registers to the PMSU node 2014-02-19 17:49 ` Gregory CLEMENT @ 2014-02-19 18:21 ` Thomas Petazzoni 0 siblings, 0 replies; 5+ messages in thread From: Thomas Petazzoni @ 2014-02-19 18:21 UTC (permalink / raw) To: Gregory CLEMENT Cc: Daniel Lezcano, linux-pm, Lorenzo Pieralisi, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Lior Amsalem, Tawfik Bayouk, devicetree, Nadav Haklai, Ezequiel Garcia, linux-arm-kernel Dear Gregory CLEMENT, On Wed, 19 Feb 2014 18:49:13 +0100, Gregory CLEMENT wrote: > I agree to use something like: > > armada-370-xp-pmsu@22000 { > compatible = "marvell,armada-xp-pmsu"; /* new compatible string */ But this PMSU is identical on 370, no? So the marvell,armada-xp-pmsu compatible string is maybe not the most appropriate one? > reg = <0x22000 0x1000>; > }; > > > and I think the best option would be to introduce a new compatible string > for this. In the same time we continue to support the old compatible string > but we print a big warning during the kernel boot that this compatible string > is deprecated, and we will finally remove it a few release. How do you support the new features of the L2 stuff with the old compatible string? By substracting 0x100 to the register base address? Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-19 18:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1392312816-17657-1-git-send-email-gregory.clement@free-electrons.com>
[not found] ` <1392312816-17657-1-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-02-13 17:33 ` [PATCH v4 07/13] ARM: dts: mvebu: Add a new set of registers to the PMSU node Gregory CLEMENT
2014-02-17 2:57 ` Jason Cooper
[not found] ` <1392312816-17657-8-git-send-email-gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2014-02-19 16:00 ` Thomas Petazzoni
2014-02-19 17:49 ` Gregory CLEMENT
2014-02-19 18:21 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).