diff mbox

arm64: dts: marvell: cp110: add required clocks for mdio interface

Message ID 1496743035-4618-1-git-send-email-thomas.petazzoni@free-electrons.com (mailing list archive)
State New, archived
Headers show

Commit Message

Thomas Petazzoni June 6, 2017, 9:57 a.m. UTC
From: Russell King <rmk+kernel@armlinux.org.uk>

Add the three required clocks for the MDIO interface to be functional
on Armada 8k platforms.  Without this, the CPU hangs, causing RCU
stalls or the system to become unresponsive.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
[Thomas:
 - remove mg_core_clock, since it's a parent of mg_clock
 - also add clock references to the slave CP mdio instance]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 +
 arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  | 1 +
 2 files changed, 2 insertions(+)

Comments

Marc Zyngier June 6, 2017, 10:02 a.m. UTC | #1
On 06/06/17 10:57, Thomas Petazzoni wrote:
> From: Russell King <rmk+kernel@armlinux.org.uk>
> 
> Add the three required clocks for the MDIO interface to be functional
> on Armada 8k platforms.  Without this, the CPU hangs, causing RCU
> stalls or the system to become unresponsive.
> 
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> [Thomas:
>  - remove mg_core_clock, since it's a parent of mg_clock
>  - also add clock references to the slave CP mdio instance]
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Tested-by: Marc Zyngier <marc.zyngier@arm.com>

Thanks,

	M.
Gregory CLEMENT June 6, 2017, 10:05 a.m. UTC | #2
Hi Thomas,
 
 On mar., juin 06 2017, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> From: Russell King <rmk+kernel@armlinux.org.uk>
>
> Add the three required clocks for the MDIO interface to be functional

You should also maybe update the commit log and speaking of two clocks
as you removed the third one.


> on Armada 8k platforms.  Without this, the CPU hangs, causing RCU
> stalls or the system to become unresponsive.

According to this comment, I guess this patch is a fix and should be
applied in v4.12-rc.

Gregory

>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> [Thomas:
>  - remove mg_core_clock, since it's a parent of mg_clock
>  - also add clock references to the slave CP mdio instance]
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 +
>  arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> index 00af338..c33e891 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> @@ -95,6 +95,7 @@
>  				#size-cells = <0>;
>  				compatible = "marvell,orion-mdio";
>  				reg = <0x12a200 0x10>;
> +				clocks = <&cpm_syscon0 1 9>, <&cpm_syscon0 1 5>;
>  			};
>  
>  			cpm_icu: interrupt-controller@1e0000 {
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> index bee48ae..2a99ff8 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> @@ -100,6 +100,7 @@
>  				#size-cells = <0>;
>  				compatible = "marvell,orion-mdio";
>  				reg = <0x12a200 0x10>;
> +				clocks = <&cps_syscon0 1 9>, <&cps_syscon0 1 5>;
>  			};
>  
>  			cps_icu: interrupt-controller@1e0000 {
> -- 
> 2.7.4
>
Russell King (Oracle) June 6, 2017, 10:13 a.m. UTC | #3
On Tue, Jun 06, 2017 at 12:05:24PM +0200, Gregory CLEMENT wrote:
> Hi Thomas,
>  
>  On mar., juin 06 2017, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> 
> > From: Russell King <rmk+kernel@armlinux.org.uk>
> >
> > Add the three required clocks for the MDIO interface to be functional
> 
> You should also maybe update the commit log and speaking of two clocks
> as you removed the third one.

When I came up with the patch, I tried to find the minimum number of
clocks, and it seemed to be the three that were in my original commit.

If people are finding that without the patch, they see hangs, but this
iteration of the patch fixes it for them, then that's good.

However, with Thomas' comment after my sign-off, I don't think there's
a need to update the commit text - that comment explains that there
were originally three clocks, and it's now reduced down to two.  It
also indicates that the patch has been modified.
Gregory CLEMENT June 8, 2017, 5:13 p.m. UTC | #4
Hi Thomas,
 
 On mar., juin 06 2017, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> From: Russell King <rmk+kernel@armlinux.org.uk>
>
> Add the three required clocks for the MDIO interface to be functional
> on Armada 8k platforms.  Without this, the CPU hangs, causing RCU
> stalls or the system to become unresponsive.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> [Thomas:
>  - remove mg_core_clock, since it's a parent of mg_clock
>  - also add clock references to the slave CP mdio instance]
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi | 1 +
>  arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi  | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> index 00af338..c33e891 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
> @@ -95,6 +95,7 @@
>  				#size-cells = <0>;
>  				compatible = "marvell,orion-mdio";
>  				reg = <0x12a200 0x10>;
> +				clocks = <&cpm_syscon0 1 9>, <&cpm_syscon0 1 5>;
>  			};
>  
>  			cpm_icu: interrupt-controller@1e0000 {
> diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> index bee48ae..2a99ff8 100644
> --- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
> @@ -100,6 +100,7 @@
>  				#size-cells = <0>;
>  				compatible = "marvell,orion-mdio";
>  				reg = <0x12a200 0x10>;
> +				clocks = <&cps_syscon0 1 9>, <&cps_syscon0 1 5>;
>  			};
>  
>  			cps_icu: interrupt-controller@1e0000 {
> -- 
> 2.7.4
>
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
index 00af338..c33e891 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
@@ -95,6 +95,7 @@ 
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
+				clocks = <&cpm_syscon0 1 9>, <&cpm_syscon0 1 5>;
 			};
 
 			cpm_icu: interrupt-controller@1e0000 {
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
index bee48ae..2a99ff8 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
@@ -100,6 +100,7 @@ 
 				#size-cells = <0>;
 				compatible = "marvell,orion-mdio";
 				reg = <0x12a200 0x10>;
+				clocks = <&cps_syscon0 1 9>, <&cps_syscon0 1 5>;
 			};
 
 			cps_icu: interrupt-controller@1e0000 {